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
widgetfactory_p.h
Go to the documentation of this file.
1
2
3
4// Copyright (C) 2016 The Qt Company Ltd.
5// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of Qt Designer. This header
13// file may change from version to version without notice, or even be removed.
14//
15// We mean it.
16//
17
18
19#ifndef WIDGETFACTORY_H
20#define WIDGETFACTORY_H
21
24
25#include <QtDesigner/abstractwidgetfactory.h>
26
27#include <QtCore/qmap.h>
28#include <QtCore/qhash.h>
29#include <QtCore/qvariant.h>
30
32
33class QObject;
34class QWidget;
35class QLayout;
36class QDesignerFormEditorInterface;
38class QDesignerFormWindowInterface;
39class QStyle;
40
41namespace qdesigner_internal {
42
44{
46public:
49
52
54
57
59 void initialize(QObject *object) const override;
60 void initializeCommon(QWidget *object) const;
61 void initializePreview(QWidget *object) const;
62
63
65
67
69
71
72 // The widget factory maintains a cache of styles which it owns.
73 QString styleName() const;
74 void setStyleName(const QString &styleName);
75
76 /* Return a cached style matching the name or QApplication's style if
77 * it is the default. */
79 // Return the current style used by the factory. This either a cached one
80 // or QApplication's style */
81 QStyle *style() const;
82
83 // Apply one of the cached styles or QApplication's style to a toplevel widget.
86
87 // Return whether object was created by the factory for the form editor.
88 static bool isFormEditorObject(const QObject *o);
89
90 // Boolean dynamic property to set on widgets to prevent custom
91 // styles from interfering
93
94public slots:
95 void loadPlugins();
98
99private:
103
107
108 // Points to the cached style or 0 if the default (qApp) is active
111};
112
113} // namespace qdesigner_internal
114
115QT_END_NAMESPACE
116
117#endif // WIDGETFACTORY_H
friend class QWidget
Definition qpainter.h:421
QWidget * createPage(QWidget *parent) override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
bool deviceProfileLessThan(const DeviceProfile &d1, const DeviceProfile &d2)
static bool ask(QWidget *parent, QDesignerDialogGuiInterface *dlgui, const QString &title, const QString &what)
#define QDESIGNER_SHARED_EXPORT