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
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
19
20class QDesignerFormEditorInterface;
22
23namespace Ui {
24 class AppearanceOptionsWidget;
25}
26
27/* AppearanceOptions data */
29{
30 void toSettings(QDesignerSettings &) const;
31 void fromSettings(const QDesignerSettings &);
32
33 UIMode uiMode{DockedMode};
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 }
43};
44
45/* QDesignerAppearanceOptionsWidget: Let the user edit AppearanceOptions */
47{
49public:
52
55
58
59private slots:
61
62private:
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
72{
74
75public:
77
78 QString name() const override;
79 QWidget *createPage(QWidget *parent) override;
80 void apply() override;
81 void finish() override;
82
85
86private:
87 QDesignerFormEditorInterface *m_core;
88 QPointer<QDesignerAppearanceOptionsWidget> m_widget;
89 AppearanceOptions m_initialOptions;
90};
91
92QT_END_NAMESPACE
93
94#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.
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