32 Q_PROPERTY(QString headerSuffix READ headerSuffix WRITE setHeaderSuffix)
33 Q_PROPERTY(
bool headerLowercase READ isHeaderLowercase WRITE setHeaderLowercase)
34 Q_PROPERTY(QVersionNumber qtVersion READ qtVersion WRITE setQtVersion)
37 enum ResourceFileWatcherBehaviour
39 NoResourceFileWatcher,
40 ReloadResourceFileSilently,
41 PromptToReloadResourceFile
43 Q_ENUM(ResourceFileWatcherBehaviour)
47 ResourceEditorFeature = 0x1,
48 SlotNavigationFeature = 0x2,
49 DefaultWidgetActionFeature = 0x4,
50 DefaultFeature = ResourceEditorFeature | DefaultWidgetActionFeature
52 Q_DECLARE_FLAGS(Feature, FeatureFlag)
54 explicit QDesignerIntegrationInterface(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
55 ~QDesignerIntegrationInterface() override;
57 QDesignerFormEditorInterface *core()
const;
59 virtual QWidget *containerWindow(QWidget *widget)
const = 0;
62 virtual QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) = 0;
63 virtual QString headerSuffix()
const = 0;
64 virtual void setHeaderSuffix(
const QString &headerSuffix) = 0;
66 virtual bool isHeaderLowercase()
const = 0;
67 virtual void setHeaderLowercase(
bool headerLowerCase) = 0;
69 QVersionNumber qtVersion()
const;
70 void setQtVersion(
const QVersionNumber &qtVersion);
72 virtual Feature features()
const = 0;
73 bool hasFeature(Feature f)
const;
75 virtual ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const = 0;
76 virtual void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) = 0;
78 virtual QString contextHelpId()
const = 0;
80 void emitObjectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
81 const QString &newName,
const QString &oldName);
82 void emitNavigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
83 void emitNavigateToSlot(
const QString &slotSignature);
84 void emitHelpRequested(
const QString &manual,
const QString &document);
87 void propertyChanged(QDesignerFormWindowInterface *formWindow,
const QString &name,
const QVariant &value);
88 void objectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
const QString &newName,
const QString &oldName);
89 void helpRequested(
const QString &manual,
const QString &document);
91 void navigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
92 void navigateToSlot(
const QString &slotSignature);
95 virtual void setFeatures(Feature f) = 0;
96 virtual void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) = 0;
97 virtual void updateProperty(
const QString &name,
const QVariant &value) = 0;
99 virtual void resetProperty(
const QString &name) = 0;
100 virtual void addDynamicProperty(
const QString &name,
const QVariant &value) = 0;
101 virtual void removeDynamicProperty(
const QString &name) = 0;
103 virtual void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
104 virtual void setupFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
105 virtual void updateSelection() = 0;
106 virtual void updateCustomWidgetPlugins() = 0;
109 std::unique_ptr<QDesignerIntegrationInterfacePrivate> d;
116 explicit QDesignerIntegration(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
117 ~QDesignerIntegration() override;
119 QString headerSuffix()
const override;
120 void setHeaderSuffix(
const QString &headerSuffix) override;
122 bool isHeaderLowercase()
const override;
123 void setHeaderLowercase(
bool headerLowerCase) override;
125 Feature features()
const override;
126 void setFeatures(Feature f) override;
128 ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const override;
129 void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) override;
131 QWidget *containerWindow(QWidget *widget)
const override;
134 static void initializePlugins(QDesignerFormEditorInterface *formEditor);
137 QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) override;
139 QString contextHelpId()
const override;
141 void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) override;
142 void updateProperty(
const QString &name,
const QVariant &value) override;
144 void resetProperty(
const QString &name) override;
145 void addDynamicProperty(
const QString &name,
const QVariant &value) override;
146 void removeDynamicProperty(
const QString &name) override;
148 void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) override;
149 void setupFormWindow(QDesignerFormWindowInterface *formWindow) override;
150 void updateSelection() override;
151 void updateCustomWidgetPlugins() override;
154 std::unique_ptr<qdesigner_internal::QDesignerIntegrationPrivate> d;
virtual QString propertyGroup(int index) const =0
virtual int indexOf(const QString &name) const =0