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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QDESIGNER_FORMBUILDER_H
16#define QDESIGNER_FORMBUILDER_H
17
21
22#include <QtDesigner/formbuilder.h>
23
24#include <QtCore/qmap.h>
25#include <QtCore/qset.h>
26
28
29class QDesignerFormEditorInterface;
30class QDesignerFormWindowInterface;
31
32class QPixmap;
33class QtResourceSet;
34
35namespace qdesigner_internal {
36
37/* Form builder used for previewing forms and widget box.
38 * It applies the system settings to its toplevel window. */
39
41{
42public:
45
48
50
51 QString systemStyle() const;
52
53 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
54 // Experimental, depending on script support.
56 const QString &appStyleSheet /* ="" */,
59 // Convenience that pops up message boxes in case of failures.
61 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
63 // Convenience that pops up message boxes in case of failures.
65
66 // Create a preview image
68
69protected:
71 using QFormBuilder::create;
72
78
82
83 virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath);
84 virtual QPixmap nameToPixmap(const QString &filePath, const QString &qrcPath);
85
87
89
91
93
94private:
96
97 using WidgetSet = QSet<QWidget *>;
99
101
106 bool m_mainWidget;
107};
108
109// Form builder for a new form widget (preview). To allow for promoted
110// widgets in the template, it implements the handling of custom widgets
111// (adding of them to the widget database).
112
121
122
123} // namespace qdesigner_internal
124
125QT_END_NAMESPACE
126
127#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