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_formbuilder_p.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//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef QDESIGNER_FORMBUILDER_H
17#define QDESIGNER_FORMBUILDER_H
18
22
23#include <QtDesigner/formbuilder.h>
24
25#include <QtCore/qmap.h>
26#include <QtCore/qset.h>
27
29
30class QDesignerFormEditorInterface;
31class QDesignerFormWindowInterface;
32
33class QPixmap;
34class QtResourceSet;
35
36namespace qdesigner_internal {
37
38/* Form builder used for previewing forms and widget box.
39 * It applies the system settings to its toplevel window. */
40
42{
43public:
46
49
51
52 QString systemStyle() const;
53
54 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
55 // Experimental, depending on script support.
57 const QString &appStyleSheet /* ="" */,
60 // Convenience that pops up message boxes in case of failures.
62 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
64 // Convenience that pops up message boxes in case of failures.
66
67 // Create a preview image
69
70protected:
72 using QFormBuilder::create;
73
79
83
84 virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath);
85 virtual QPixmap nameToPixmap(const QString &filePath, const QString &qrcPath);
86
88
90
92
94
95private:
97
98 using WidgetSet = QSet<QWidget *>;
100
102
107 bool m_mainWidget;
108};
109
110// Form builder for a new form widget (preview). To allow for promoted
111// widgets in the template, it implements the handling of custom widgets
112// (adding of them to the widget database).
113
122
123
124} // namespace qdesigner_internal
125
126QT_END_NAMESPACE
127
128#endif // QDESIGNER_FORMBUILDER_H
friend class QWidget
Definition qpainter.h:432
WidgetBoxDnDItem(QDesignerFormEditorInterface *core, DomUI *dom_ui, const QPoint &global_mouse_pos)
QWidget * createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name) override
void createCustomWidgets(DomCustomWidgets *) override
QWidget * create(DomWidget *ui_widget, QWidget *parents) override
QWidget * createUI(DomUI *ui, QWidget *parents)
WidgetBoxResource(QDesignerFormEditorInterface *core)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static DeviceProfile currentDeviceProfile(const QDesignerFormEditorInterface *core)
static QSize geometryProp(const DomWidget *dw)
static QWidget * decorationFromDomWidget(DomUI *dom_ui, QDesignerFormEditorInterface *core)
static QSize domWidgetSize(const DomWidget *dw)
#define QDESIGNER_SHARED_EXPORT