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
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
18
19class QDesignerFormEditorInterface;
21
22namespace Ui {
23 class AppearanceOptionsWidget;
24}
25
26/* AppearanceOptions data */
28{
29 void toSettings(QDesignerSettings &) const;
30 void fromSettings(const QDesignerSettings &);
31
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 }
42};
43
44/* QDesignerAppearanceOptionsWidget: Let the user edit AppearanceOptions */
46{
48public:
51
54
57
58private slots:
60
61private:
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
71{
73
74public:
76
77 QString name() const override;
78 QWidget *createPage(QWidget *parent) override;
79 void apply() override;
80 void finish() override;
81
84
85private:
86 QDesignerFormEditorInterface *m_core;
87 QPointer<QDesignerAppearanceOptionsWidget> m_widget;
88 AppearanceOptions m_initialOptions;
89};
90
91QT_END_NAMESPACE
92
93#endif // QDESIGNER_APPEARANCEOPTIONS_H
QWidget * createPage(QWidget *parent) override
void setAppearanceOptions(const AppearanceOptions &ao)
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
UIMode
@ NeutralMode
@ DockedMode
Combined button and popup list for selecting options.
void toSettings(QDesignerSettings &) const
ToolWindowFontSettings toolWindowFontSettings
void fromSettings(const QDesignerSettings &)
friend bool comparesEqual(const AppearanceOptions &lhs, const AppearanceOptions &rhs) noexcept