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
20
21#include <QtDesigner/formbuilder.h>
22
23#include <QtCore/qmap.h>
24#include <QtCore/qset.h>
25
27
28class QDesignerFormEditorInterface;
29class QDesignerFormWindowInterface;
30
31class QPixmap;
32class QtResourceSet;
33
34namespace qdesigner_internal {
35
36class DesignerPixmapCache;
37class DesignerIconCache;
38
39/* Form builder used for previewing forms and widget box.
40 * It applies the system settings to its toplevel window. */
41
43{
44public:
47
50
52 { return m_core; }
53
54 QString systemStyle() const;
55
56 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
57 // Experimental, depending on script support.
59 const QString &appStyleSheet /* ="" */,
62 // Convenience that pops up message boxes in case of failures.
64 // Create a preview widget (for integrations) or return 0. The widget has to be embedded into a main window.
66 // Convenience that pops up message boxes in case of failures.
68
69 // Create a preview image
71
72protected:
74 using QFormBuilder::create;
75
81
85
86 virtual QIcon nameToIcon(const QString &filePath, const QString &qrcPath);
87 virtual QPixmap nameToPixmap(const QString &filePath, const QString &qrcPath);
88
90
92
94
96
97private:
99
100 using WidgetSet = QSet<QWidget *>;
102
104
109 bool m_mainWidget;
110};
111
112// Form builder for a new form widget (preview). To allow for promoted
113// widgets in the template, it implements the handling of custom widgets
114// (adding of them to the widget database).
115
124
125
126} // namespace qdesigner_internal
127
128QT_END_NAMESPACE
129
130#endif // QDESIGNER_FORMBUILDER_H
friend class QWidget
Definition qpainter.h:421
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