31 Q_PROPERTY(QString headerSuffix READ headerSuffix WRITE setHeaderSuffix)
32 Q_PROPERTY(
bool headerLowercase READ isHeaderLowercase WRITE setHeaderLowercase)
33 Q_PROPERTY(QVersionNumber qtVersion READ qtVersion WRITE setQtVersion)
36 enum ResourceFileWatcherBehaviour
38 NoResourceFileWatcher,
39 ReloadResourceFileSilently,
40 PromptToReloadResourceFile
42 Q_ENUM(ResourceFileWatcherBehaviour)
46 ResourceEditorFeature = 0x1,
47 SlotNavigationFeature = 0x2,
48 DefaultWidgetActionFeature = 0x4,
49 DefaultFeature = ResourceEditorFeature | DefaultWidgetActionFeature
51 Q_DECLARE_FLAGS(Feature, FeatureFlag)
53 explicit QDesignerIntegrationInterface(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
54 virtual ~QDesignerIntegrationInterface();
56 QDesignerFormEditorInterface *core()
const;
58 virtual QWidget *containerWindow(QWidget *widget)
const = 0;
61 virtual QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) = 0;
62 virtual QString headerSuffix()
const = 0;
63 virtual void setHeaderSuffix(
const QString &headerSuffix) = 0;
65 virtual bool isHeaderLowercase()
const = 0;
66 virtual void setHeaderLowercase(
bool headerLowerCase) = 0;
68 QVersionNumber qtVersion()
const;
69 void setQtVersion(
const QVersionNumber &qtVersion);
71 virtual Feature features()
const = 0;
72 bool hasFeature(Feature f)
const;
74 virtual ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const = 0;
75 virtual void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) = 0;
77 virtual QString contextHelpId()
const = 0;
79 void emitObjectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
80 const QString &newName,
const QString &oldName);
81 void emitNavigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
82 void emitNavigateToSlot(
const QString &slotSignature);
83 void emitHelpRequested(
const QString &manual,
const QString &document);
86 void propertyChanged(QDesignerFormWindowInterface *formWindow,
const QString &name,
const QVariant &value);
87 void objectNameChanged(QDesignerFormWindowInterface *formWindow, QObject *object,
const QString &newName,
const QString &oldName);
88 void helpRequested(
const QString &manual,
const QString &document);
90 void navigateToSlot(
const QString &objectName,
const QString &signalSignature,
const QStringList ¶meterNames);
91 void navigateToSlot(
const QString &slotSignature);
94 virtual void setFeatures(Feature f) = 0;
95 virtual void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) = 0;
96 virtual void updateProperty(
const QString &name,
const QVariant &value) = 0;
98 virtual void resetProperty(
const QString &name) = 0;
99 virtual void addDynamicProperty(
const QString &name,
const QVariant &value) = 0;
100 virtual void removeDynamicProperty(
const QString &name) = 0;
102 virtual void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
103 virtual void setupFormWindow(QDesignerFormWindowInterface *formWindow) = 0;
104 virtual void updateSelection() = 0;
105 virtual void updateCustomWidgetPlugins() = 0;
108 QScopedPointer<QDesignerIntegrationInterfacePrivate> d;
115 explicit QDesignerIntegration(QDesignerFormEditorInterface *core, QObject *parent =
nullptr);
116 virtual ~QDesignerIntegration();
118 QString headerSuffix()
const override;
119 void setHeaderSuffix(
const QString &headerSuffix) override;
121 bool isHeaderLowercase()
const override;
122 void setHeaderLowercase(
bool headerLowerCase) override;
124 Feature features()
const override;
125 virtual void setFeatures(Feature f) override;
127 ResourceFileWatcherBehaviour resourceFileWatcherBehaviour()
const override;
128 void setResourceFileWatcherBehaviour(ResourceFileWatcherBehaviour behaviour) override;
130 virtual QWidget *containerWindow(QWidget *widget)
const override;
133 static void initializePlugins(QDesignerFormEditorInterface *formEditor);
136 QDesignerResourceBrowserInterface *createResourceBrowser(QWidget *parent =
nullptr) override;
138 QString contextHelpId()
const override;
140 void updateProperty(
const QString &name,
const QVariant &value,
bool enableSubPropertyHandling) override;
141 void updateProperty(
const QString &name,
const QVariant &value) override;
143 void resetProperty(
const QString &name) override;
144 void addDynamicProperty(
const QString &name,
const QVariant &value) override;
145 void removeDynamicProperty(
const QString &name) override;
147 void updateActiveFormWindow(QDesignerFormWindowInterface *formWindow) override;
148 void setupFormWindow(QDesignerFormWindowInterface *formWindow) override;
149 void updateSelection() override;
150 void updateCustomWidgetPlugins() override;
153 QScopedPointer<qdesigner_internal::QDesignerIntegrationPrivate> d;
virtual QString propertyGroup(int index) const =0
virtual int indexOf(const QString &name) const =0