33 Q_PROPERTY(QString headerSuffix READ headerSuffix WRITE setHeaderSuffix)
34 Q_PROPERTY(
bool headerLowercase READ isHeaderLowercase WRITE setHeaderLowercase)
35 Q_PROPERTY(QVersionNumber qtVersion READ qtVersion WRITE setQtVersion)
38 enum ResourceFileWatcherBehaviour
40 NoResourceFileWatcher,
41 ReloadResourceFileSilently,
42 PromptToReloadResourceFile
44 Q_ENUM(ResourceFileWatcherBehaviour)
48 ResourceEditorFeature = 0x1,
49 SlotNavigationFeature = 0x2,
50 DefaultWidgetActionFeature = 0x4,
51 DefaultFeature = ResourceEditorFeature | DefaultWidgetActionFeature
53 Q_DECLARE_FLAGS(Feature, FeatureFlag)
55 explicit QDesignerIntegrationInterface(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
56 ~QDesignerIntegrationInterface() override;
58 QDesignerFormEditorInterface *core()
const;
60 virtual QWidget *containerWindow(QWidget *widget)
const = 0;
63 virtual QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) = 0;
64 virtual QString headerSuffix()
const = 0;
65 virtual void setHeaderSuffix(
const QString &headerSuffix) = 0;
67 virtual bool isHeaderLowercase()
const = 0;
68 virtual void setHeaderLowercase(
bool headerLowerCase) = 0;
70 QVersionNumber qtVersion()
const;
71 void setQtVersion(
const QVersionNumber &qtVersion);
73 virtual Feature features()
const = 0;
74 bool hasFeature(Feature f)
const;
76 virtual ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const = 0;
77 virtual void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) = 0;
79 virtual QString contextHelpId()
const = 0;
81 void emitObjectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
82 const QString &newName,
const QString &oldName);
83 void emitNavigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
84 void emitNavigateToSlot(
const QString &slotSignature);
85 void emitHelpRequested(
const QString &manual,
const QString &document);
88 void propertyChanged(QDesignerFormWindowInterface *formWindow,
const QString &name,
const QVariant &value);
89 void objectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
const QString &newName,
const QString &oldName);
90 void helpRequested(
const QString &manual,
const QString &document);
92 void navigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
93 void navigateToSlot(
const QString &slotSignature);
96 virtual void setFeatures(Feature f) = 0;
97 virtual void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) = 0;
98 virtual void updateProperty(
const QString &name,
const QVariant &value) = 0;
100 virtual void resetProperty(
const QString &name) = 0;
101 virtual void addDynamicProperty(
const QString &name,
const QVariant &value) = 0;
102 virtual void removeDynamicProperty(
const QString &name) = 0;
104 virtual void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
105 virtual void setupFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
106 virtual void updateSelection() = 0;
107 virtual void updateCustomWidgetPlugins() = 0;
110 std::unique_ptr<QDesignerIntegrationInterfacePrivate> d;
117 explicit QDesignerIntegration(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
118 ~QDesignerIntegration() override;
120 QString headerSuffix()
const override;
121 void setHeaderSuffix(
const QString &headerSuffix) override;
123 bool isHeaderLowercase()
const override;
124 void setHeaderLowercase(
bool headerLowerCase) override;
126 Feature features()
const override;
127 void setFeatures(Feature f) override;
129 ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const override;
130 void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) override;
132 QWidget *containerWindow(QWidget *widget)
const override;
135 static void initializePlugins(QDesignerFormEditorInterface *formEditor);
138 QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) override;
140 QString contextHelpId()
const override;
142 void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) override;
143 void updateProperty(
const QString &name,
const QVariant &value) override;
145 void resetProperty(
const QString &name) override;
146 void addDynamicProperty(
const QString &name,
const QVariant &value) override;
147 void removeDynamicProperty(
const QString &name) override;
149 void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) override;
150 void setupFormWindow(QDesignerFormWindowInterface *formWindow) override;
151 void updateSelection() override;
152 void updateCustomWidgetPlugins() override;
155 std::unique_ptr<qdesigner_internal::QDesignerIntegrationPrivate> d;
virtual QString propertyGroup(int index) const =0
virtual int indexOf(const QString &name) const =0