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#if QT_VERSION < QT_VERSION_CHECK(7
, 0
, 0
)
123 PropertyLayoutSizeConstraint,
125 PropertyLayoutHorizontalSizeConstraint,
126 PropertyLayoutVerticalSizeConstraint,
128 PropertyLayoutFieldGrowthPolicy,
129 PropertyLayoutRowWrapPolicy,
130 PropertyLayoutLabelAlignment,
131 PropertyLayoutFormAlignment,
132 PropertyLayoutBoxStretch,
133 PropertyLayoutGridRowStretch,
134 PropertyLayoutGridColumnStretch,
135 PropertyLayoutGridRowMinimumHeight,
136 PropertyLayoutGridColumnMinimumWidth,
138 PropertyAccessibility,
145 PropertyWindowFilePath,
146 PropertyWindowOpacity,
147 PropertyWindowIconText,
148 PropertyWindowModality,
149 PropertyWindowModified,
154 enum ObjectType { ObjectNone, ObjectLabel, ObjectLayout, ObjectLayoutWidget };
157 CheckableProperty = 0x1
159 Q_DECLARE_FLAGS(ObjectFlags, ObjectFlag)
161 static ObjectType objectTypeFromObject(
const QObject *o);
162 static ObjectFlags objectFlagsFromObject(
const QObject *o);
163 static PropertyType propertyTypeFromName(
const QString &name);
166 PropertyType propertyType(
int index)
const;
167 ObjectType objectType()
const;
170 QDesignerPropertySheetPrivate *d;
void insertWidget(int index, QWidget *widget) override