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
qwizard_container.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#ifndef QWIZARD_CONTAINER_H
6#define QWIZARD_CONTAINER_H
7
8#include <QtDesigner/container.h>
9
10#include <qdesigner_propertysheet_p.h>
11#include <extensionfactory_p.h>
12
13#include <QtWidgets/qwizard.h>
14
16
17class QWizardPage;
18
19namespace qdesigner_internal {
20
21// Container for QWizard. Care must be taken to position
22// the QWizard at some valid page after removal/insertion
23// as it is not used to having its pages ripped out.
25{
26 Q_OBJECT
27 Q_INTERFACES(QDesignerContainerExtension)
28public:
29 explicit QWizardContainer(QWizard *widget, QObject *parent = nullptr);
30
31 int count() const override;
32 QWidget *widget(int index) const override;
33 int currentIndex() const override;
34 void setCurrentIndex(int index) override;
35 bool canAddWidget() const override { return true; }
36 void addWidget(QWidget *widget) override;
37 void insertWidget(int index, QWidget *widget) override;
38 bool canRemove(int) const override { return true; }
39 void remove(int index) override;
40
41private:
42 QWizard *m_wizard;
43};
44
45// QWizardPagePropertySheet: Introduces a attribute string fake property
46// "pageId" that allows for specifying enumeration values (uic only).
47// This breaks the pattern of having a "currentSth" property for the
48// container, but was deemed to make sense here since the Page has
49// its own "title" properties.
51{
53public:
55
56 bool reset(int index) override;
57
58 static const char *pageIdProperty;
59
60private:
61 const int m_pageIdIndex;
62};
63
64// QWizardPropertySheet: Hides the "startId" property. It cannot be used
65// as QWizard cannot handle setting it as a property before the actual
66// page is added.
67
69{
71public:
72 explicit QWizardPropertySheet(QWizard *object, QObject *parent = nullptr);
73 bool isVisible(int index) const override;
74
75private:
76 const QString m_startId;
77};
78
79// Factories
83} // namespace qdesigner_internal
84
85QT_END_NAMESPACE
86
87#endif // QWIZARD_CONTAINER_H
virtual bool dynamicPropertiesAllowed() const =0
virtual bool isDynamicProperty(int index) const =0
virtual int addDynamicProperty(const QString &propertyName, const QVariant &value)=0
virtual bool canAddDynamicProperty(const QString &propertyName) const =0
virtual bool removeDynamicProperty(int index)=0
virtual ~QDesignerDynamicPropertySheetExtension()=default
QDesignerPropertySheetFactory(QExtensionManager *parent=nullptr)
static void registerExtension(QExtensionManager *mgr)
friend class QWidget
Definition qpainter.h:432
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
QWidget * createPage(QWidget *parent) override
FormEditor(const QStringList &pluginPaths, QObject *parent=nullptr)
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void addWidget(QWidget *widget) override
static void positionNewMdiChild(const QWidget *area, QWidget *mdiChild)
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
void setProperty(int index, const QVariant &value) override
static bool checkProperty(const QString &propertyName)
QVariant property(int index) const override
void addWidget(QWidget *widget) override
QWidget * widget(int index) const override
void insertWidget(int index, QWidget *widget) override
bool isVisible(int index) const override
QWidget * createPage(QWidget *parent) override
static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent)
#define QT_FORMEDITOR_EXPORT
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
QDesignerPropertySheetFactory< QWizardPage, QWizardPagePropertySheet > QWizardPagePropertySheetFactory
#define QDESIGNER_SHARED_EXPORT