Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qdesigner_appearanceoptions.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QDESIGNER_APPEARANCEOPTIONS_H
6
#
define
QDESIGNER_APPEARANCEOPTIONS_H
7
8
#
include
"designer_enums.h"
9
#
include
"qdesigner_toolwindow.h"
10
11
#
include
<
QtDesigner
/
abstractoptionspage
.
h
>
12
13
#
include
<
QtCore
/
qcompare
.
h
>
14
#
include
<
QtCore
/
qobject
.
h
>
15
#
include
<
QtCore
/
qpointer
.
h
>
16
#
include
<
QtWidgets
/
qwidget
.
h
>
17
18
QT_BEGIN_NAMESPACE
19
20
class
QDesignerFormEditorInterface;
21
class
QDesignerSettings
;
22
23
namespace
Ui
{
24
class
AppearanceOptionsWidget;
25
}
26
27
/* AppearanceOptions data */
28
struct
AppearanceOptions
29
{
30
void
toSettings
(
QDesignerSettings
&)
const
;
31
void
fromSettings
(
const
QDesignerSettings
&);
32
33
UIMode
uiMode
{DockedMode};
34
ToolWindowFontSettings
toolWindowFontSettings
;
35
36
friend
bool
comparesEqual
(
const
AppearanceOptions
&lhs,
37
const
AppearanceOptions
&rhs)
noexcept
38
{
39
return
lhs
.
uiMode
== rhs
.
uiMode
40
&& lhs.toolWindowFontSettings == rhs.toolWindowFontSettings;
41
}
42
Q_DECLARE_EQUALITY_COMPARABLE
(
AppearanceOptions
)
43
};
44
45
/* QDesignerAppearanceOptionsWidget: Let the user edit AppearanceOptions */
46
class
QDesignerAppearanceOptionsWidget
:
public
QWidget
47
{
48
Q_OBJECT
49
public
:
50
explicit
QDesignerAppearanceOptionsWidget
(
QWidget
*
parent
=
nullptr
);
51
~
QDesignerAppearanceOptionsWidget
()
override
;
52
53
AppearanceOptions
appearanceOptions
()
const
;
54
void
setAppearanceOptions
(
const
AppearanceOptions
&ao);
55
56
signals
:
57
void
uiModeChanged
(
bool
modified
);
58
59
private
slots
:
60
void
slotUiModeComboChanged
();
61
62
private
:
63
UIMode uiMode()
const
;
64
65
Ui
::AppearanceOptionsWidget *m_ui;
66
UIMode m_initialUIMode = NeutralMode;
67
};
68
69
/* The options page for appearance options. */
70
71
class
QDesignerAppearanceOptionsPage
:
public
QObject
,
public
QDesignerOptionsPageInterface
72
{
73
Q_OBJECT
74
75
public
:
76
QDesignerAppearanceOptionsPage
(
QDesignerFormEditorInterface
*
core
);
77
78
QString
name
()
const
override
;
79
QWidget
*
createPage
(QWidget *parent)
override
;
80
void
apply
()
override
;
81
void
finish
()
override
;
82
83
signals
:
84
void
settingsChanged
();
85
86
private
:
87
QDesignerFormEditorInterface *m_core;
88
QPointer<QDesignerAppearanceOptionsWidget> m_widget;
89
AppearanceOptions
m_initialOptions;
90
};
91
92
QT_END_NAMESPACE
93
94
#
endif
// QDESIGNER_APPEARANCEOPTIONS_H
PreferencesDialog
Definition
preferencesdialog.h:20
PreferencesDialog::~PreferencesDialog
~PreferencesDialog() override
Definition
preferencesdialog.cpp:39
QDesignerAppearanceOptionsPage
Definition
qdesigner_appearanceoptions.h:72
QDesignerAppearanceOptionsPage::name
QString name() const override
Definition
qdesigner_appearanceoptions.cpp:87
QDesignerAppearanceOptionsPage::apply
void apply() override
Definition
qdesigner_appearanceoptions.cpp:101
QDesignerAppearanceOptionsPage::finish
void finish() override
Definition
qdesigner_appearanceoptions.cpp:114
QDesignerAppearanceOptionsPage::createPage
QWidget * createPage(QWidget *parent) override
Definition
qdesigner_appearanceoptions.cpp:93
QDesignerAppearanceOptionsWidget
Definition
qdesigner_appearanceoptions.h:47
QDesignerAppearanceOptionsWidget::~QDesignerAppearanceOptionsWidget
~QDesignerAppearanceOptionsWidget() override
Definition
qdesigner_appearanceoptions.cpp:47
QDesignerAppearanceOptionsWidget::setAppearanceOptions
void setAppearanceOptions(const AppearanceOptions &ao)
Definition
qdesigner_appearanceoptions.cpp:67
QDesignerAppearanceOptionsWidget::appearanceOptions
AppearanceOptions appearanceOptions() const
Definition
qdesigner_appearanceoptions.cpp:57
QDesignerFormEditorInterface
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
Definition
abstractformeditor.h:43
QDesignerSettings
Definition
qdesigner_settings.h:22
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
Ui
Definition
deviceprofiledialog.h:24
AppearanceOptions
Definition
qdesigner_appearanceoptions.h:29
AppearanceOptions::toSettings
void toSettings(QDesignerSettings &) const
Definition
qdesigner_appearanceoptions.cpp:18
AppearanceOptions::toolWindowFontSettings
ToolWindowFontSettings toolWindowFontSettings
Definition
qdesigner_appearanceoptions.h:34
AppearanceOptions::fromSettings
void fromSettings(const QDesignerSettings &)
Definition
qdesigner_appearanceoptions.cpp:24
AppearanceOptions::comparesEqual
friend bool comparesEqual(const AppearanceOptions &lhs, const AppearanceOptions &rhs) noexcept
Definition
qdesigner_appearanceoptions.h:36
AppearanceOptions::uiMode
UIMode uiMode
Definition
qdesigner_appearanceoptions.h:33
ToolWindowFontSettings
Definition
qdesigner_toolwindow.h:18
qttools
src
designer
src
designer
qdesigner_appearanceoptions.h
Generated on
for Qt by
1.16.1