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
4
#
ifndef
QDESIGNER_APPEARANCEOPTIONS_H
5
#
define
QDESIGNER_APPEARANCEOPTIONS_H
6
7
#
include
"designer_enums.h"
8
#
include
"qdesigner_toolwindow.h"
9
10
#
include
<
QtDesigner
/
abstractoptionspage
.
h
>
11
12
#
include
<
QtCore
/
qcompare
.
h
>
13
#
include
<
QtCore
/
qobject
.
h
>
14
#
include
<
QtCore
/
qpointer
.
h
>
15
#
include
<
QtWidgets
/
qwidget
.
h
>
16
17
QT_BEGIN_NAMESPACE
18
19
class
QDesignerFormEditorInterface;
20
class
QDesignerSettings
;
21
22
namespace
Ui
{
23
class
AppearanceOptionsWidget;
24
}
25
26
/* AppearanceOptions data */
27
struct
AppearanceOptions
28
{
29
void
toSettings
(
QDesignerSettings
&)
const
;
30
void
fromSettings
(
const
QDesignerSettings
&);
31
32
UIMode
uiMode
{
DockedMode
};
33
ToolWindowFontSettings
toolWindowFontSettings
;
34
35
friend
bool
comparesEqual
(
const
AppearanceOptions
&lhs,
36
const
AppearanceOptions
&rhs)
noexcept
37
{
38
return
lhs
.
uiMode
== rhs
.
uiMode
39
&& lhs.toolWindowFontSettings == rhs.toolWindowFontSettings;
40
}
41
Q_DECLARE_EQUALITY_COMPARABLE
(
AppearanceOptions
)
42
};
43
44
/* QDesignerAppearanceOptionsWidget: Let the user edit AppearanceOptions */
45
class
QDesignerAppearanceOptionsWidget
:
public
QWidget
46
{
47
Q_OBJECT
48
public
:
49
explicit
QDesignerAppearanceOptionsWidget
(
QWidget
*
parent
=
nullptr
);
50
~
QDesignerAppearanceOptionsWidget
();
51
52
AppearanceOptions
appearanceOptions
()
const
;
53
void
setAppearanceOptions
(
const
AppearanceOptions
&ao);
54
55
signals
:
56
void
uiModeChanged
(
bool
modified
);
57
58
private
slots
:
59
void
slotUiModeComboChanged
();
60
61
private
:
62
UIMode
uiMode()
const
;
63
64
Ui
::AppearanceOptionsWidget *m_ui;
65
UIMode
m_initialUIMode =
NeutralMode
;
66
};
67
68
/* The options page for appearance options. */
69
70
class
QDesignerAppearanceOptionsPage
:
public
QObject
,
public
QDesignerOptionsPageInterface
71
{
72
Q_OBJECT
73
74
public
:
75
QDesignerAppearanceOptionsPage
(
QDesignerFormEditorInterface
*
core
);
76
77
QString
name
()
const
override
;
78
QWidget
*
createPage
(QWidget *parent)
override
;
79
void
apply
()
override
;
80
void
finish
()
override
;
81
82
signals
:
83
void
settingsChanged
();
84
85
private
:
86
QDesignerFormEditorInterface *m_core;
87
QPointer<QDesignerAppearanceOptionsWidget> m_widget;
88
AppearanceOptions
m_initialOptions;
89
};
90
91
QT_END_NAMESPACE
92
93
#
endif
// QDESIGNER_APPEARANCEOPTIONS_H
PreferencesDialog
Definition
preferencesdialog.h:20
PreferencesDialog::~PreferencesDialog
~PreferencesDialog()
Definition
preferencesdialog.cpp:38
QDesignerAppearanceOptionsPage
Definition
qdesigner_appearanceoptions.h:71
QDesignerAppearanceOptionsPage::name
QString name() const override
Definition
qdesigner_appearanceoptions.cpp:86
QDesignerAppearanceOptionsPage::apply
void apply() override
Definition
qdesigner_appearanceoptions.cpp:100
QDesignerAppearanceOptionsPage::finish
void finish() override
Definition
qdesigner_appearanceoptions.cpp:113
QDesignerAppearanceOptionsPage::createPage
QWidget * createPage(QWidget *parent) override
Definition
qdesigner_appearanceoptions.cpp:92
QDesignerAppearanceOptionsWidget
Definition
qdesigner_appearanceoptions.h:46
QDesignerAppearanceOptionsWidget::~QDesignerAppearanceOptionsWidget
~QDesignerAppearanceOptionsWidget()
Definition
qdesigner_appearanceoptions.cpp:46
QDesignerAppearanceOptionsWidget::setAppearanceOptions
void setAppearanceOptions(const AppearanceOptions &ao)
Definition
qdesigner_appearanceoptions.cpp:66
QDesignerAppearanceOptionsWidget::appearanceOptions
AppearanceOptions appearanceOptions() const
Definition
qdesigner_appearanceoptions.cpp:56
QDesignerFormEditorInterface
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
Definition
abstractformeditor.h:40
QDesignerSettings
Definition
qdesigner_settings.h:21
UIMode
UIMode
Definition
designer_enums.h:8
NeutralMode
@ NeutralMode
Definition
designer_enums.h:9
DockedMode
@ DockedMode
Definition
designer_enums.h:11
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
Ui
Definition
deviceprofiledialog.h:23
AppearanceOptions
Definition
qdesigner_appearanceoptions.h:28
AppearanceOptions::toSettings
void toSettings(QDesignerSettings &) const
Definition
qdesigner_appearanceoptions.cpp:17
AppearanceOptions::toolWindowFontSettings
ToolWindowFontSettings toolWindowFontSettings
Definition
qdesigner_appearanceoptions.h:33
AppearanceOptions::fromSettings
void fromSettings(const QDesignerSettings &)
Definition
qdesigner_appearanceoptions.cpp:23
AppearanceOptions::comparesEqual
friend bool comparesEqual(const AppearanceOptions &lhs, const AppearanceOptions &rhs) noexcept
Definition
qdesigner_appearanceoptions.h:35
AppearanceOptions::uiMode
UIMode uiMode
Definition
qdesigner_appearanceoptions.h:32
ToolWindowFontSettings
Definition
qdesigner_toolwindow.h:17
qttools
src
designer
src
designer
qdesigner_appearanceoptions.h
Generated on Sat Sep 21 2024 00:50:15 for Qt by
1.12.0