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// Qt-Security score:significant reason:default
4
5// Copyright (C) 2016 The Qt Company Ltd.
6// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of Qt Designer. This header
14// file may change from version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19
20#ifndef WIDGETFACTORY_H
21#define WIDGETFACTORY_H
22
25
26#include <QtDesigner/abstractwidgetfactory.h>
27
28#include <QtCore/qmap.h>
29#include <QtCore/qhash.h>
30#include <QtCore/qvariant.h>
31
33
34class QObject;
35class QWidget;
36class QLayout;
37class QDesignerFormEditorInterface;
39class QDesignerFormWindowInterface;
40class QStyle;
41
42namespace qdesigner_internal {
43
45{
47public:
50
53
55
58
60 void initialize(QObject *object) const override;
61 void initializeCommon(QWidget *object) const;
62 void initializePreview(QWidget *object) const;
63
64
66
68
70
72
73 // The widget factory maintains a cache of styles which it owns.
74 QString styleName() const;
75 void setStyleName(const QString &styleName);
76
77 /* Return a cached style matching the name or QApplication's style if
78 * it is the default. */
80 // Return the current style used by the factory. This either a cached one
81 // or QApplication's style */
82 QStyle *style() const;
83
84 // Apply one of the cached styles or QApplication's style to a toplevel widget.
87
88 // Return whether object was created by the factory for the form editor.
89 static bool isFormEditorObject(const QObject *o);
90
91 // Boolean dynamic property to set on widgets to prevent custom
92 // styles from interfering
94
95public slots:
96 void loadPlugins();
99
100private:
104
108
109 // Points to the cached style or 0 if the default (qApp) is active
112};
113
114} // namespace qdesigner_internal
115
116QT_END_NAMESPACE
117
118#endif // WIDGETFACTORY_H
friend class QWidget
Definition qpainter.h:432
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)
static QString description(const DeviceProfile &p)
#define QDESIGNER_SHARED_EXPORT