45 Q_INTERFACES(QDesignerPropertySheetExtension QDesignerDynamicPropertySheetExtension)
47 explicit QDesignerPropertySheet(QObject *object, QObject *parent =
nullptr);
48 ~QDesignerPropertySheet() override;
50 int indexOf(
const QString &name)
const override;
52 int count()
const override;
53 QString propertyName(
int index)
const override;
55 QString propertyGroup(
int index)
const override;
56 void setPropertyGroup(
int index,
const QString &group) override;
58 bool hasReset(
int index)
const override;
59 bool reset(
int index) override;
61 bool isAttribute(
int index)
const override;
62 void setAttribute(
int index,
bool b) override;
64 bool isVisible(
int index)
const override;
65 void setVisible(
int index,
bool b) override;
67 QVariant property(
int index)
const override;
68 void setProperty(
int index,
const QVariant &value) override;
70 bool isChanged(
int index)
const override;
72 void setChanged(
int index,
bool changed) override;
74 bool dynamicPropertiesAllowed()
const override;
75 int addDynamicProperty(
const QString &propertyName,
const QVariant &value) override;
76 bool removeDynamicProperty(
int index) override;
77 bool isDynamicProperty(
int index)
const override;
78 bool canAddDynamicProperty(
const QString &propertyName)
const override;
80 bool isDefaultDynamicProperty(
int index)
const;
82 bool isResourceProperty(
int index)
const;
83 QVariant defaultResourceProperty(
int index)
const;
85 qdesigner_internal::DesignerPixmapCache *pixmapCache()
const;
86 void setPixmapCache(qdesigner_internal::DesignerPixmapCache *cache);
87 qdesigner_internal::DesignerIconCache *iconCache()
const;
88 void setIconCache(qdesigner_internal::DesignerIconCache *cache);
89 int createFakeProperty(
const QString &propertyName,
const QVariant &value = QVariant());
91 bool isEnabled(
int index)
const override;
92 QObject *object()
const;
94 static bool internalDynamicPropertiesEnabled();
95 static void setInternalDynamicPropertiesEnabled(
bool v);
97 static QDesignerFormEditorInterface *formEditorForObject(QObject *o);
100 bool isAdditionalProperty(
int index)
const;
101 bool isFakeProperty(
int index)
const;
102 QVariant resolvePropertyValue(
int index,
const QVariant &value)
const;
103 QVariant metaProperty(
int index)
const;
104 void setFakeProperty(
int index,
const QVariant &value);
105 void clearFakeProperties();
107 bool isFakeLayoutProperty(
int index)
const;
108 bool isDynamic(
int index)
const;
109 qdesigner_internal::FormWindowBase *formWindowBase()
const;
110 QDesignerFormEditorInterface *core()
const;
113 enum PropertyType { PropertyNone,
114 PropertyLayoutObjectName,
115 PropertyLayoutLeftMargin,
116 PropertyLayoutTopMargin,
117 PropertyLayoutRightMargin,
118 PropertyLayoutBottomMargin,
119 PropertyLayoutSpacing,
120 PropertyLayoutHorizontalSpacing,
121 PropertyLayoutVerticalSpacing,
122 PropertyLayoutSizeConstraint,
123 PropertyLayoutFieldGrowthPolicy,
124 PropertyLayoutRowWrapPolicy,
125 PropertyLayoutLabelAlignment,
126 PropertyLayoutFormAlignment,
127 PropertyLayoutBoxStretch,
128 PropertyLayoutGridRowStretch,
129 PropertyLayoutGridColumnStretch,
130 PropertyLayoutGridRowMinimumHeight,
131 PropertyLayoutGridColumnMinimumWidth,
133 PropertyAccessibility,
140 PropertyWindowFilePath,
141 PropertyWindowOpacity,
142 PropertyWindowIconText,
143 PropertyWindowModality,
144 PropertyWindowModified,
149 enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget };
152 CheckableProperty = 0x1
154 Q_DECLARE_FLAGS(ObjectFlags, ObjectFlag)
156 static ObjectType objectTypeFromObject(
const QObject *o);
157 static ObjectFlags objectFlagsFromObject(
const QObject *o);
158 static PropertyType propertyTypeFromName(
const QString &name);
161 PropertyType propertyType(
int index)
const;
162 ObjectType objectType()
const;
165 QDesignerPropertySheetPrivate *d;
176 Q_INTERFACES(QAbstractExtensionFactory)
178 explicit QDesignerAbstractPropertySheetFactory(QExtensionManager *parent =
nullptr);
179 ~QDesignerAbstractPropertySheetFactory() override;
181 QObject *extension(QObject *object,
const QString &iid)
const override;
184 void objectDestroyed(QObject *object);
187 virtual QObject *createPropertySheet(QObject *qObject, QObject *parent)
const = 0;
189 struct PropertySheetFactoryPrivate;
190 PropertySheetFactoryPrivate *m_impl;
void insertWidget(int index, QWidget *widget) override
QWidget * createPage(QWidget *parent) override