Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtpropertybrowserutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QTPROPERTYBROWSERUTILS_H
16#define QTPROPERTYBROWSERUTILS_H
17
18#include <QtCore/QMap>
19#include <QtGui/QIcon>
20#include <QtWidgets/QWidget>
21#include <QtCore/QStringList>
22
23QT_BEGIN_NAMESPACE
24
25class QMouseEvent;
26class QCheckBox;
27class QLineEdit;
28
30{
31public:
33 void clear();
34
36 QMap<int, QIcon> cursorShapeIcons() const;
37 QString cursorToShapeName(const QCursor &cursor) const;
38 QIcon cursorToShapeIcon(const QCursor &cursor) const;
39 int cursorToValue(const QCursor &cursor) const;
40#ifndef QT_NO_CURSOR
41 QCursor valueToCursor(int value) const;
42#endif
43
44 static QtCursorDatabase *instance();
45
46private:
47 void appendCursor(Qt::CursorShape shape, const QString &name, const QIcon &icon);
48 QStringList m_cursorNames;
49 QMap<int, QIcon> m_cursorIcons;
50 QMap<int, Qt::CursorShape> m_valueToCursorShape;
51 QMap<Qt::CursorShape, int> m_cursorShapeToValue;
52};
53
55{
56public:
57 static QPixmap brushValuePixmap(const QBrush &b);
58 static QIcon brushValueIcon(const QBrush &b);
59 static QString colorValueText(QColor c);
60 static QPixmap fontValuePixmap(const QFont &f);
61 static QIcon fontValueIcon(const QFont &f);
62 static QString fontValueText(const QFont &f);
63 static QString dateFormat();
64 static QString timeFormat();
65 static QString dateTimeFormat();
66};
67
68class QtBoolEdit : public QWidget {
70public:
72
73 bool textVisible() const { return m_textVisible; }
74 void setTextVisible(bool textVisible);
75
76 Qt::CheckState checkState() const;
77 void setCheckState(Qt::CheckState state);
78
79 bool isChecked() const;
80 void setChecked(bool c);
81
82 bool blockCheckBoxSignals(bool block);
83
85 void toggled(bool);
86
87protected:
88 void mousePressEvent(QMouseEvent * event) override;
89
90private:
91 QCheckBox *m_checkBox;
92 bool m_textVisible;
93};
94
95QT_END_NAMESPACE
96
97#endif
static const char * brushStyles[]
The QtAbstractEditorFactoryBase provides an interface for editor factories.
virtual void breakConnection(QtAbstractPropertyManager *manager)=0
The QtAbstractEditorFactory is the base template class for editor factories.
void removePropertyManager(PropertyManager *manager)
Removes the given manager from this factory's set of managers.
virtual void disconnectPropertyManager(PropertyManager *manager)=0
Disconnects this factory from the given manager's signals.
void breakConnection(QtAbstractPropertyManager *manager) override
PropertyManager * propertyManager(QtProperty *property) const
Returns the property manager for the given property, or 0 if the given property doesn't belong to any...
QSet< PropertyManager * > propertyManagers() const
Returns the factory's set of associated managers.
void addPropertyManager(PropertyManager *manager)
Adds the given manager to this factory's set of managers, making this factory produce editing widgets...
virtual void connectPropertyManager(PropertyManager *manager)=0
Connects this factory to the given manager's signals.
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
QtBrowserItem * currentItem() const
Returns the current item in the property browser.
QList< QtBrowserItem * > items(QtProperty *property) const
Returns the property browser's list of all items associated with the given property.
virtual void itemInserted(QtBrowserItem *item, QtBrowserItem *afterItem)=0
This function is called to update the widget whenever a property is inserted or added to the property...
QList< QtBrowserItem * > topLevelItems() const
Returns the list of top-level items.
QList< QtProperty * > properties() const
Returns the property browser's list of top level properties.
QtBrowserItem * topLevelItem(QtProperty *property) const
Returns the top-level items associated with the given property.
void removeProperty(QtProperty *property)
Removes the specified property (and its subproperties) from the property browser's list of top level ...
void unsetFactoryForManager(QtAbstractPropertyManager *manager)
Removes the association between the given manager and the factory bound to it, automatically calling ...
void setFactoryForManager(PropertyManager *manager, QtAbstractEditorFactory< PropertyManager > *factory)
Connects the given manager to the given factory, ensuring that properties of the manager's type will ...
virtual void itemRemoved(QtBrowserItem *item)=0
This function is called to update the widget whenever a property is removed from the property browser...
virtual void itemChanged(QtBrowserItem *item)=0
This function is called whenever a property's data changes, passing a pointer to the item of property...
QtBrowserItem * insertProperty(QtProperty *property, QtProperty *afterProperty)
Inserts the given property (and its subproperties) after the specified afterProperty in the browser's...
void setCurrentItem(QtBrowserItem *)
Sets the current item in the property browser to item.
~QtAbstractPropertyBrowser()
Destroys the property browser, and destroys all the items that were created by this property browser.
void clear()
Removes all the properties from the editor, but does not delete them since they can still be used in ...
The QtAbstractPropertyManager provides an interface for property managers.
virtual void initializeProperty(QtProperty *property)=0
This function is called whenever a new valid property pointer has been created, passing the pointer a...
void propertyDestroyed(QtProperty *property)
This signal is emitted when the specified property is about to be destroyed.
virtual QIcon valueIcon(const QtProperty *property) const
Returns an icon representing the current state of the given property.
void propertyChanged(QtProperty *property)
This signal is emitted whenever a property's data changes, passing a pointer to the property as param...
QSet< QtProperty * > properties() const
Returns the set of properties created by this manager.
~QtAbstractPropertyManager()
Destroys the manager.
virtual bool hasValue(const QtProperty *property) const
Returns whether the given property has a value.
QtProperty * addProperty(const QString &name=QString())
Creates a property with the given name which then is owned by this manager.
virtual QtProperty * createProperty()
Creates a property.
void clear() const
Destroys all the properties that this manager has created.
virtual QString valueText(const QtProperty *property) const
Returns a string representing the current state of the given property.
virtual void uninitializeProperty(QtProperty *property)
This function is called just before the specified property is destroyed.
void propertyRemoved(QtProperty *property, QtProperty *parent)
This signal is emitted when a subproperty is removed, passing pointers to the removed property and th...
bool textVisible() const
void mousePressEvent(QMouseEvent *event) override
This event handler, for event event, can be reimplemented in a subclass to receive mouse press events...
Qt::CheckState checkState() const
void setTextVisible(bool textVisible)
bool blockCheckBoxSignals(bool block)
void setCheckState(Qt::CheckState state)
The QtBoolPropertyManager class provides and manages boolean properties.
QIcon valueIcon(const QtProperty *property) const override
\reimp
bool value(const QtProperty *property) const
Returns the given property's value.
~QtBoolPropertyManager()
Destroys this manager, and all the properties it has created.
QString valueText(const QtProperty *property) const override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
The QtBrowserItem class represents a property in a property browser instance.
QtProperty * property() const
Returns the property which is accosiated with this item.
QtAbstractPropertyBrowser * browser() const
Returns the property browser which owns this item.
QList< QtBrowserItem * > children() const
Returns the children items of this item.
QtBrowserItem * parent() const
Returns the parent item of this item.
The QtCharPropertyManager provides and manages QChar properties.
void uninitializeProperty(QtProperty *property) override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
QChar value(const QtProperty *property) const
Returns the given property's value.
~QtCharPropertyManager()
Destroys this manager, and all the properties it has created.
QString valueText(const QtProperty *property) const override
\reimp
The QtColorPropertyManager provides and manages QColor properties.
~QtColorPropertyManager()
Destroys this manager, and all the properties it has created.
void initializeProperty(QtProperty *property) override
\reimp
QIcon valueIcon(const QtProperty *property) const override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that produces the nested red, green and blue subproperties.
QColor value(const QtProperty *property) const
Returns the given property's value.
QString valueText(const QtProperty *property) const override
\reimp
QCursor valueToCursor(int value) const
QStringList cursorShapeNames() const
int cursorToValue(const QCursor &cursor) const
QString cursorToShapeName(const QCursor &cursor) const
QIcon cursorToShapeIcon(const QCursor &cursor) const
static QtCursorDatabase * instance()
QMap< int, QIcon > cursorShapeIcons() const
The QtCursorPropertyManager provides and manages QCursor properties.
QString valueText(const QtProperty *property) const override
\reimp
QIcon valueIcon(const QtProperty *property) const override
\reimp
~QtCursorPropertyManager()
Destroys this manager, and all the properties it has created.
void uninitializeProperty(QtProperty *property) override
\reimp
QCursor value(const QtProperty *property) const
Returns the given property's value.
void initializeProperty(QtProperty *property) override
\reimp
The QtDatePropertyManager provides and manages QDate properties.
void rangeChanged(QtProperty *property, QDate minVal, QDate maxVal)
This signal is emitted whenever a property created by this manager changes its range of valid dates,...
void setMaximum(QtProperty *property, QDate maxVal)
Sets the maximum value for the given property to maxVal.
void uninitializeProperty(QtProperty *property) override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
void setMinimum(QtProperty *property, QDate minVal)
Sets the minimum value for the given property to minVal.
~QtDatePropertyManager()
Destroys this manager, and all the properties it has created.
void setRange(QtProperty *property, QDate minVal, QDate maxVal)
Sets the range of valid dates.
QDate minimum(const QtProperty *property) const
Returns the given property's minimum date.
QDate maximum(const QtProperty *property) const
Returns the given property's maximum date.
QDate value(const QtProperty *property) const
Returns the given property's value.
The QtDateTimePropertyManager provides and manages QDateTime properties.
void uninitializeProperty(QtProperty *property) override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
QDateTime value(const QtProperty *property) const
Returns the given property's value.
~QtDateTimePropertyManager()
Destroys this manager, and all the properties it has created.
QString valueText(const QtProperty *property) const override
\reimp
The QtDoublePropertyManager provides and manages double properties.
QString valueText(const QtProperty *property) const override
\reimp
double singleStep(const QtProperty *property) const
Returns the given property's step value.
int decimals(const QtProperty *property) const
Returns the given property's precision, in decimals.
void singleStepChanged(QtProperty *property, double step)
This signal is emitted whenever a property created by this manager changes its single step property,...
void setMaximum(QtProperty *property, double maxVal)
Sets the maximum value for the given property to maxVal.
void uninitializeProperty(QtProperty *property) override
\reimp
void decimalsChanged(QtProperty *property, int prec)
This signal is emitted whenever a property created by this manager changes its precision of value,...
void setDecimals(QtProperty *property, int prec)
Sets the precision of the given property to prec.
double minimum(const QtProperty *property) const
Returns the given property's minimum value.
~QtDoublePropertyManager()
Destroys this manager, and all the properties it has created.
double value(const QtProperty *property) const
Returns the given property's value.
void setSingleStep(QtProperty *property, double step)
Sets the step value for the given property to step.
void initializeProperty(QtProperty *property) override
\reimp
void setMinimum(QtProperty *property, double minVal)
Sets the minimum value for the given property to minVal.
void rangeChanged(QtProperty *property, double minVal, double maxVal)
This signal is emitted whenever a property created by this manager changes its range of valid values,...
double maximum(const QtProperty *property) const
Returns the given property's maximum value.
void setRange(QtProperty *property, double minVal, double maxVal)
Sets the range of valid values.
The QtEnumPropertyManager provides and manages enum properties.
void setEnumIcons(QtProperty *property, const QMap< int, QIcon > &icons)
Sets the given property's map of enum values to their icons to enumIcons.
QMap< int, QIcon > enumIcons(const QtProperty *property) const
Returns the given property's map of enum values to their icons.
void enumIconsChanged(QtProperty *property, const QMap< int, QIcon > &icons)
This signal is emitted whenever a property created by this manager changes its enum icons,...
void enumNamesChanged(QtProperty *property, const QStringList &names)
This signal is emitted whenever a property created by this manager changes its enum names,...
QStringList enumNames(const QtProperty *property) const
Returns the given property's list of enum names.
QString valueText(const QtProperty *property) const override
\reimp
QIcon valueIcon(const QtProperty *property) const override
\reimp
void setEnumNames(QtProperty *property, const QStringList &names)
Sets the given property's list of enum names to enumNames.
void initializeProperty(QtProperty *property) override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
~QtEnumPropertyManager()
Destroys this manager, and all the properties it has created.
int value(const QtProperty *property) const
Returns the given property's value which is an index in the list returned by enumNames()
The QtFlagPropertyManager provides and manages flag properties.
~QtFlagPropertyManager()
Destroys this manager, and all the properties it has created.
void uninitializeProperty(QtProperty *property) override
\reimp
void flagNamesChanged(QtProperty *property, const QStringList &names)
This signal is emitted whenever a property created by this manager changes its flag names,...
QString valueText(const QtProperty *property) const override
\reimp
QtBoolPropertyManager * subBoolPropertyManager() const
Returns the manager that produces the nested boolean subproperties representing each flag.
void setFlagNames(QtProperty *property, const QStringList &names)
Sets the given property's list of flag names to flagNames.
void initializeProperty(QtProperty *property) override
\reimp
QStringList flagNames(const QtProperty *property) const
Returns the given property's list of flag names.
int value(const QtProperty *property) const
Returns the given property's value.
The QtFontPropertyManager provides and manages QFont properties.
void uninitializeProperty(QtProperty *property) override
\reimp
QFont value(const QtProperty *property) const
Returns the given property's value.
void initializeProperty(QtProperty *property) override
\reimp
QtBoolPropertyManager * subBoolPropertyManager() const
Returns the manager that creates the bold, italic, underline, strikeOut and kerning subproperties.
QIcon valueIcon(const QtProperty *property) const override
\reimp
QtEnumPropertyManager * subEnumPropertyManager() const
Returns the manager that create the family subproperty.
QString valueText(const QtProperty *property) const override
\reimp
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that creates the pointSize subproperty.
~QtFontPropertyManager()
Destroys this manager, and all the properties it has created.
The QtGroupPropertyManager provides and manages group properties.
bool hasValue(const QtProperty *property) const override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
~QtGroupPropertyManager()
Destroys this manager, and all the properties it has created.
The QtIntPropertyManager provides and manages int properties.
void uninitializeProperty(QtProperty *property) override
\reimp
~QtIntPropertyManager()
Destroys this manager, and all the properties it has created.
void rangeChanged(QtProperty *property, int minVal, int maxVal)
This signal is emitted whenever a property created by this manager changes its range of valid values,...
void setRange(QtProperty *property, int minVal, int maxVal)
Sets the range of valid values.
void singleStepChanged(QtProperty *property, int step)
This signal is emitted whenever a property created by this manager changes its single step property,...
int singleStep(const QtProperty *property) const
Returns the given property's step value.
int minimum(const QtProperty *property) const
Returns the given property's minimum value.
QString valueText(const QtProperty *property) const override
\reimp
int value(const QtProperty *property) const
Returns the given property's value.
void setMaximum(QtProperty *property, int maxVal)
Sets the maximum value for the given property to maxVal.
void setMinimum(QtProperty *property, int minVal)
Sets the minimum value for the given property to minVal.
int maximum(const QtProperty *property) const
Returns the given property's maximum value.
void setSingleStep(QtProperty *property, int step)
Sets the step value for the given property to step.
void initializeProperty(QtProperty *property) override
\reimp
The QtKeySequencePropertyManager provides and manages QKeySequence properties.
void uninitializeProperty(QtProperty *property) override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
QKeySequence value(const QtProperty *property) const
Returns the given property's value.
QString valueText(const QtProperty *property) const override
\reimp
~QtKeySequencePropertyManager()
Destroys this manager, and all the properties it has created.
The QtLocalePropertyManager provides and manages QLocale properties.
void uninitializeProperty(QtProperty *property) override
\reimp
~QtLocalePropertyManager()
Destroys this manager, and all the properties it has created.
QString valueText(const QtProperty *property) const override
\reimp
QtEnumPropertyManager * subEnumPropertyManager() const
Returns the manager that creates the nested language and territory subproperties.
void initializeProperty(QtProperty *property) override
\reimp
QLocale value(const QtProperty *property) const
Returns the given property's value.
The QtPointFPropertyManager provides and manages QPointF properties.
void initializeProperty(QtProperty *property) override
\reimp
void decimalsChanged(QtProperty *property, int prec)
This signal is emitted whenever a property created by this manager changes its precision of value,...
void setDecimals(QtProperty *property, int prec)
Sets the precision of the given property to prec.
void uninitializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
QPointF value(const QtProperty *property) const
Returns the given property's value.
QtDoublePropertyManager * subDoublePropertyManager() const
Returns the manager that creates the nested x and y subproperties.
~QtPointFPropertyManager()
Destroys this manager, and all the properties it has created.
int decimals(const QtProperty *property) const
Returns the given property's precision, in decimals.
The QtPointPropertyManager provides and manages QPoint properties.
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that creates the nested x and y subproperties.
~QtPointPropertyManager()
Destroys this manager, and all the properties it has created.
void initializeProperty(QtProperty *property) override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
QPoint value(const QtProperty *property) const
Returns the given property's value.
static QPixmap brushValuePixmap(const QBrush &b)
static QPixmap fontValuePixmap(const QFont &f)
static QIcon brushValueIcon(const QBrush &b)
static QIcon fontValueIcon(const QFont &f)
static QString colorValueText(QColor c)
static QString fontValueText(const QFont &f)
The QtProperty class encapsulates an instance of a property.
void setModified(bool modified)
Sets the property's modified state according to the passed modified value.
void setToolTip(const QString &text)
void addSubProperty(QtProperty *property)
Appends the given property to this property's subproperties.
QString propertyName() const
Returns the property's name.
bool isEnabled() const
Returns whether the property is enabled.
void setEnabled(bool enable)
Enables or disables the property according to the passed enable value.
QString toolTip() const
bool hasValue() const
Returns whether the property has a value.
void insertSubProperty(QtProperty *property, QtProperty *afterProperty)
Inserts the given property after the specified precedingProperty into this property's list of subprop...
QList< QtProperty * > subProperties() const
Returns the set of subproperties.
QString whatsThis() const
Returns the property's "What's This" help text.
void removeSubProperty(QtProperty *property)
Removes the given property from the list of subproperties without deleting it.
void setValueToolTip(const QString &text)
Sets the property value's tool tip to the given text.
QString statusTip() const
Returns the property's status tip.
QIcon valueIcon() const
Returns an icon representing the current state of this property.
bool isModified() const
Returns whether the property is modified.
virtual ~QtProperty()
Destroys this property.
void setPropertyName(const QString &text)
Sets the property's name to the given name.
void setDescriptionToolTip(const QString &text)
Sets the property description's tool tip to the given text.
QString valueText() const
Returns a string representing the current state of this property.
QString valueToolTip() const
Returns the property value's tool tip.
void setStatusTip(const QString &text)
Sets the property's status tip to the given text.
QtProperty(QtAbstractPropertyManager *manager)
Creates a property with the given manager.
void setWhatsThis(const QString &text)
Sets the property's "What's This" help text to the given text.
QString descriptionToolTip() const
Returns the property description's tool tip.
QtAbstractPropertyManager * propertyManager() const
Returns a pointer to the manager that owns this property.
The QtRectFPropertyManager provides and manages QRectF properties.
void constraintChanged(QtProperty *property, const QRectF &constraint)
This signal is emitted whenever property changes its constraint rectangle, passing a pointer to the p...
QRectF constraint(const QtProperty *property) const
Returns the given property's constraining rectangle.
QRectF value(const QtProperty *property) const
Returns the given property's value.
QtDoublePropertyManager * subDoublePropertyManager() const
Returns the manager that creates the nested x, y, width and height subproperties.
void uninitializeProperty(QtProperty *property) override
\reimp
int decimals(const QtProperty *property) const
Returns the given property's precision, in decimals.
void initializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
void decimalsChanged(QtProperty *property, int prec)
This signal is emitted whenever a property created by this manager changes its precision of value,...
void setDecimals(QtProperty *property, int prec)
Sets the precision of the given property to prec.
void setConstraint(QtProperty *property, const QRectF &constraint)
Sets the given property's constraining rectangle to constraint.
~QtRectFPropertyManager()
Destroys this manager, and all the properties it has created.
The QtRectPropertyManager provides and manages QRect properties.
QRect value(const QtProperty *property) const
Returns the given property's value.
void initializeProperty(QtProperty *property) override
\reimp
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that creates the nested x, y, width and height subproperties.
~QtRectPropertyManager()
Destroys this manager, and all the properties it has created.
QString valueText(const QtProperty *property) const override
\reimp
void constraintChanged(QtProperty *property, const QRect &constraint)
This signal is emitted whenever property changes its constraint rectangle, passing a pointer to the p...
QRect constraint(const QtProperty *property) const
Returns the given property's constraining rectangle.
void setConstraint(QtProperty *property, QRect constraint)
Sets the given property's constraining rectangle to constraint.
void uninitializeProperty(QtProperty *property) override
\reimp
The QtSizeFPropertyManager provides and manages QSizeF properties.
QSizeF value(const QtProperty *property) const
Returns the given property's value.
~QtSizeFPropertyManager()
Destroys this manager, and all the properties it has created.
void setDecimals(QtProperty *property, int prec)
Sets the precision of the given property to prec.
QSizeF maximum(const QtProperty *property) const
Returns the given property's maximum size value.
int decimals(const QtProperty *property) const
Returns the given property's precision, in decimals.
void initializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
QSizeF minimum(const QtProperty *property) const
Returns the given property's minimum size value.
void rangeChanged(QtProperty *property, QSizeF minVal, QSizeF maxVal)
This signal is emitted whenever a property created by this manager changes its range of valid sizes,...
void setMinimum(QtProperty *property, QSizeF minVal)
Sets the minimum size value for the given property to minVal.
QtDoublePropertyManager * subDoublePropertyManager() const
Returns the manager that creates the nested width and height subproperties.
void uninitializeProperty(QtProperty *property) override
\reimp
void setRange(QtProperty *property, QSizeF minVal, QSizeF maxVal)
Sets the range of valid values.
void setMaximum(QtProperty *property, QSizeF maxVal)
Sets the maximum size value for the given property to maxVal.
void decimalsChanged(QtProperty *property, int prec)
This signal is emitted whenever a property created by this manager changes its precision of value,...
The QtSizePolicyPropertyManager provides and manages QSizePolicy properties.
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that creates the nested horizontalStretch and verticalStretch subproperties.
QtEnumPropertyManager * subEnumPropertyManager() const
Returns the manager that creates the nested horizontalPolicy and verticalPolicy subproperties.
~QtSizePolicyPropertyManager()
Destroys this manager, and all the properties it has created.
void uninitializeProperty(QtProperty *property) override
\reimp
void initializeProperty(QtProperty *property) override
\reimp
QSizePolicy value(const QtProperty *property) const
Returns the given property's value.
QString valueText(const QtProperty *property) const override
\reimp
The QtSizePropertyManager provides and manages QSize properties.
void rangeChanged(QtProperty *property, QSize minVal, QSize maxVal)
This signal is emitted whenever a property created by this manager changes its range of valid sizes,...
QSize value(const QtProperty *property) const
Returns the given property's value.
void uninitializeProperty(QtProperty *property) override
\reimp
void setMaximum(QtProperty *property, QSize maxVal)
Sets the maximum size value for the given property to maxVal.
void setRange(QtProperty *property, QSize minVal, QSize maxVal)
Sets the range of valid values.
void initializeProperty(QtProperty *property) override
\reimp
QSize maximum(const QtProperty *property) const
Returns the given property's maximum size value.
void setMinimum(QtProperty *property, QSize minVal)
Sets the minimum size value for the given property to minVal.
QString valueText(const QtProperty *property) const override
\reimp
QSize minimum(const QtProperty *property) const
Returns the given property's minimum size value.
~QtSizePropertyManager()
Destroys this manager, and all the properties it has created.
QtIntPropertyManager * subIntPropertyManager() const
Returns the manager that creates the nested width and height subproperties.
The QtStringPropertyManager provides and manages QString properties.
QString value(const QtProperty *property) const
Returns the given property's value.
QRegularExpression regExp(const QtProperty *property) const
Returns the given property's currently set regular expression.
void setRegExp(QtProperty *property, const QRegularExpression &regExp)
Sets the regular expression of the given property to regExp.
~QtStringPropertyManager()
Destroys this manager, and all the properties it has created.
void initializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
void uninitializeProperty(QtProperty *property) override
\reimp
void regExpChanged(QtProperty *property, const QRegularExpression &regExp)
This signal is emitted whenever a property created by this manager changes its currenlty set regular ...
The QtTimePropertyManager provides and manages QTime properties.
void initializeProperty(QtProperty *property) override
\reimp
~QtTimePropertyManager()
Destroys this manager, and all the properties it has created.
QTime value(const QtProperty *property) const
Returns the given property's value.
void uninitializeProperty(QtProperty *property) override
\reimp
QString valueText(const QtProperty *property) const override
\reimp
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
QWidget * createEditor(QtVariantPropertyManager *manager, QtProperty *property, QWidget *parent) override
void disconnectPropertyManager(QtVariantPropertyManager *manager) override
void connectPropertyManager(QtVariantPropertyManager *manager) override
~QtVariantEditorFactory()
Destroys this factory, and all the widgets it has created.
The QtVariantPropertyManager class provides and manages QVariant based properties.
static int iconMapTypeId()
Returns the type id for a icon map attribute.
virtual QVariant value(const QtProperty *property) const
Returns the given property's value.
QString valueText(const QtProperty *property) const override
void initializeProperty(QtProperty *property) override
int propertyType(const QtProperty *property) const
Returns the given property's type.
static int groupTypeId()
Returns the type id for a group property.
static int enumTypeId()
Returns the type id for an enum property.
virtual int valueType(int propertyType) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool hasValue(const QtProperty *property) const override
QtVariantProperty * variantProperty(const QtProperty *property) const
Returns the given property converted into a QtVariantProperty.
int valueType(const QtProperty *property) const
Returns the given property's value type.
QtProperty * createProperty() override
void uninitializeProperty(QtProperty *property) override
QIcon valueIcon(const QtProperty *property) const override
~QtVariantPropertyManager()
Destroys this manager, and all the properties it has created.
virtual bool isPropertyTypeSupported(int propertyType) const
Returns true if the given propertyType is supported by this variant manager; otherwise false.
virtual QStringList attributes(int propertyType) const
Returns a list of the given propertyType 's attributes.
static int flagTypeId()
Returns the type id for a flag property.
The QtVariantProperty class is a convenience class handling QVariant based properties.
QVariant value() const
Returns the property's current value.
int propertyType() const
Returns this property's type.
QtVariantProperty(QtVariantPropertyManager *manager)
Creates a variant property using the given manager.
~QtVariantProperty()
Destroys this property.
int valueType() const
Returns the type of this property's value.
int valueChanged(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
bool valueIcon(const QtProperty *property, QIcon *icon) const
bool valueText(const QtProperty *property, QString *text) const
void initializeProperty(QtVariantPropertyManager *vm, QtProperty *property, int enumTypeId)
bool value(const QtProperty *property, QVariant *v) const
int setValue(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
void connectPropertyManager(QtVariantPropertyManager *manager) override
QWidget * createEditor(QtVariantPropertyManager *manager, QtProperty *property, QWidget *parent) override
void disconnectPropertyManager(QtVariantPropertyManager *manager) override
bool isPropertyTypeSupported(int propertyType) const override
Returns true if the given propertyType is supported by this variant manager; otherwise false.
void uninitializeProperty(QtProperty *property) override
This function is called just before the specified property is destroyed.
QVariant attributeValue(const QtProperty *property, const QString &attribute) const override
Returns the given property's value for the specified attribute.
void initializeProperty(QtProperty *property) override
This function is called whenever a new valid property pointer has been created, passing the pointer a...
QIcon valueIcon(const QtProperty *property) const override
Returns an icon representing the current state of the given property.
int attributeType(int propertyType, const QString &attribute) const override
Returns the type of the specified attribute of the given propertyType.
int valueType(int propertyType) const override
This is an overloaded member function, provided for convenience. It differs from the above function o...
static uint alignDefault(const QtVariantProperty *prop)
DesignerPropertyManager(QDesignerFormEditorInterface *core, QObject *parent=nullptr)
QStringList attributes(int propertyType) const override
Returns a list of the given propertyType 's attributes.
QVariant value(const QtProperty *property) const override
Returns the given property's value.
void setValue(QtProperty *property, const QVariant &value) override
QString valueText(const QtProperty *property) const override
Returns a string representing the current state of the given property.
bool resetFontSubProperty(QtVariantPropertyManager *vm, QtProperty *subProperty)
void setValue(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
void postInitializeProperty(QtVariantPropertyManager *vm, QtProperty *property, int type, int enumTypeId)
int valueChanged(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
void preInitializeProperty(QtProperty *property, int type, ResetMap &resetMap)
static bool readFamilyMapping(NameMap *rc, QString *errorMessage)
void connectPropertyManager(QtAbstractPropertyManager *manager)
void disconnectPropertyManager(QtAbstractPropertyManager *manager)
QWidget * editor(QWidget *subEditor, bool resettable, QtAbstractPropertyManager *manager, QtProperty *property, QWidget *parent)
bool value(const QtProperty *property, QVariant *rc) const
void initialize(QtVariantPropertyManager *m, QtProperty *property, const PropertySheetValue &value)
int valueChanged(QtVariantPropertyManager *m, QtProperty *property, const QVariant &value)
int setValue(QtVariantPropertyManager *m, QtProperty *property, int expectedTypeId, const QVariant &value)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.