40 #pragma GCC system_header 
   42 #ifndef QTVARIANTPROPERTY_H 
   43 #define QTVARIANTPROPERTY_H 
   45 #include <QtCore/QVariant> 
   46 #include <QtGui/QIcon> 
   51 #if QT_VERSION >= 0x040400 
   64     QVariant value() 
const;
 
   65     QVariant attributeValue(
const QString &attribute) 
const;
 
   66     int valueType() 
const;
 
   67     int propertyType() 
const;
 
   69     void setValue(
const QVariant &value);
 
   70     void setAttribute(
const QString &attribute, 
const QVariant &value);
 
  101         const QString &name = QString());
 
  103     int propertyType(
const QtProperty *property) 
const;
 
  104     int valueType(
const QtProperty *property) 
const;
 
  107     virtual bool isPropertyTypeSupported(
int propertyType) 
const;
 
  108     virtual int valueType(
int propertyType) 
const;
 
  109     virtual QStringList attributes(
int propertyType) 
const;
 
  110     virtual int attributeType(
int propertyType, 
const QString &attribute) 
const;
 
  112     virtual QVariant value(
const QtProperty *property) 
const;
 
  113     virtual QVariant attributeValue(
const QtProperty *property,
 
  114         const QString &attribute) 
const;
 
  116     static int enumTypeId();
 
  117     static int flagTypeId();
 
  118     static int groupTypeId();
 
  119     static int iconMapTypeId();
 
  121       virtual void setValue(
QtProperty *property, 
const QVariant &val);
 
  122     virtual void setAttribute(
QtProperty *property,
 
  123         const QString &attribute, 
const QVariant &value);
 
  125     void valueChanged(
QtProperty *property, 
const QVariant &val);
 
  127         const QString &attribute, 
const QVariant &val);
 
  137     Q_PRIVATE_SLOT(d_func(), 
void slotValueChanged(
QtProperty *, 
int))
 
  138       Q_PRIVATE_SLOT(d_func(), 
void slotRangeChanged(
QtProperty *, 
int, 
int))
 
  139       Q_PRIVATE_SLOT(d_func(), 
void slotSingleStepChanged(
QtProperty *, 
int))
 
  140       Q_PRIVATE_SLOT(d_func(), 
void slotValueChanged(
QtProperty *, 
double))
 
  141       Q_PRIVATE_SLOT(d_func(),
 
  142           void slotRangeChanged(
QtProperty *, 
double, 
double))
 
  143       Q_PRIVATE_SLOT(d_func(),
 
  144           void slotSingleStepChanged(
QtProperty *, 
double))
 
  145       Q_PRIVATE_SLOT(d_func(),
 
  147       Q_PRIVATE_SLOT(d_func(),
 
  149       Q_PRIVATE_SLOT(d_func(),
 
  150           void slotValueChanged(
QtProperty *, 
const QString &))
 
  151       Q_PRIVATE_SLOT(d_func(),
 
  152           void slotRegExpChanged(
QtProperty *, 
const QRegExp &))
 
  153       Q_PRIVATE_SLOT(d_func(),
 
  155       Q_PRIVATE_SLOT(d_func(),
 
  156           void slotValueChanged(
QtProperty *, 
const QDate &))
 
  157       Q_PRIVATE_SLOT(d_func(),
 
  158           void slotRangeChanged(
QtProperty *, 
const QDate &, 
const QDate &))
 
  159       Q_PRIVATE_SLOT(d_func(),
 
  160           void slotValueChanged(
QtProperty *, 
const QTime &))
 
  161       Q_PRIVATE_SLOT(d_func(),
 
  162           void slotValueChanged(
QtProperty *, 
const QDateTime &))
 
  163       Q_PRIVATE_SLOT(d_func(),
 
  164           void slotValueChanged(
QtProperty *, 
const QKeySequence &))
 
  165       Q_PRIVATE_SLOT(d_func(),
 
  166           void slotValueChanged(
QtProperty *, 
const QChar &))
 
  167       Q_PRIVATE_SLOT(d_func(),
 
  168           void slotValueChanged(
QtProperty *, 
const QLocale &))
 
  169       Q_PRIVATE_SLOT(d_func(),
 
  170           void slotValueChanged(
QtProperty *, 
const QPoint &))
 
  171       Q_PRIVATE_SLOT(d_func(),
 
  172           void slotValueChanged(
QtProperty *, 
const QPointF &))
 
  173       Q_PRIVATE_SLOT(d_func(),
 
  174           void slotValueChanged(
QtProperty *, 
const QSize &))
 
  175       Q_PRIVATE_SLOT(d_func(),
 
  176           void slotRangeChanged(
QtProperty *, 
const QSize &, 
const QSize &))
 
  177       Q_PRIVATE_SLOT(d_func(),
 
  178           void slotValueChanged(
QtProperty *, 
const QSizeF &))
 
  179       Q_PRIVATE_SLOT(d_func(),
 
  180           void slotRangeChanged(
QtProperty *, 
const QSizeF &, 
const QSizeF &))
 
  181       Q_PRIVATE_SLOT(d_func(),
 
  182           void slotValueChanged(
QtProperty *, 
const QRect &))
 
  183       Q_PRIVATE_SLOT(d_func(),
 
  184           void slotConstraintChanged(
QtProperty *, 
const QRect &))
 
  185       Q_PRIVATE_SLOT(d_func(),
 
  186           void slotValueChanged(
QtProperty *, 
const QRectF &))
 
  187       Q_PRIVATE_SLOT(d_func(),
 
  188           void slotConstraintChanged(
QtProperty *, 
const QRectF &))
 
  189       Q_PRIVATE_SLOT(d_func(),
 
  190           void slotValueChanged(
QtProperty *, 
const QColor &))
 
  191       Q_PRIVATE_SLOT(d_func(),
 
  192           void slotEnumNamesChanged(
QtProperty *, 
const QStringList &))
 
  193       Q_PRIVATE_SLOT(d_func(),
 
  194           void slotEnumIconsChanged(
QtProperty *, 
const QMap<int, QIcon> &))
 
  195       Q_PRIVATE_SLOT(d_func(),
 
  196           void slotValueChanged(
QtProperty *, 
const QSizePolicy &))
 
  197       Q_PRIVATE_SLOT(d_func(),
 
  198           void slotValueChanged(
QtProperty *, 
const QFont &))
 
  199       Q_PRIVATE_SLOT(d_func(),
 
  200           void slotValueChanged(
QtProperty *, 
const QCursor &))
 
  201       Q_PRIVATE_SLOT(d_func(),
 
  202           void slotFlagNamesChanged(
QtProperty *, 
const QStringList &))
 
  204       Q_PRIVATE_SLOT(d_func(),
 
  206       Q_PRIVATE_SLOT(d_func(),
 
  219     bool m_creatingProperty;
 
  220     bool m_creatingSubProperties;
 
  221     bool m_destroyingSubProperties;
 
  224     void slotValueChanged(
QtProperty *property, 
int val);
 
  226     void slotSingleStepChanged(
QtProperty *property, 
int step);
 
  227     void slotValueChanged(
QtProperty *property, 
double val);
 
  228     void slotRangeChanged(
QtProperty *property, 
double min, 
double max);
 
  229     void slotSingleStepChanged(
QtProperty *property, 
double step);
 
  230     void slotDecimalsChanged(
QtProperty *property, 
int prec);
 
  231     void slotValueChanged(
QtProperty *property, 
bool val);
 
  232     void slotValueChanged(
QtProperty *property, 
const QString &val);
 
  233     void slotRegExpChanged(
QtProperty *property, 
const QRegExp ®Exp);
 
  234     void slotEchoModeChanged(
QtProperty *property, 
int);
 
  235     void slotValueChanged(
QtProperty *property, 
const QDate &val);
 
  237         const QDate &min, 
const QDate &max);
 
  238     void slotValueChanged(
QtProperty *property, 
const QTime &val);
 
  239     void slotValueChanged(
QtProperty *property, 
const QDateTime &val);
 
  240     void slotValueChanged(
QtProperty *property, 
const QKeySequence &val);
 
  241     void slotValueChanged(
QtProperty *property, 
const QChar &val);
 
  242     void slotValueChanged(
QtProperty *property, 
const QLocale &val);
 
  243     void slotValueChanged(
QtProperty *property, 
const QPoint &val);
 
  244     void slotValueChanged(
QtProperty *property, 
const QPointF &val);
 
  245     void slotValueChanged(
QtProperty *property, 
const QSize &val);
 
  247         const QSize &min, 
const QSize &max);
 
  248     void slotValueChanged(
QtProperty *property, 
const QSizeF &val);
 
  249     void slotRangeChanged(
QtProperty *property, 
const QSizeF &min,
 
  251     void slotValueChanged(
QtProperty *property, 
const QRect &val);
 
  252     void slotConstraintChanged(
QtProperty *property, 
const QRect &val);
 
  253     void slotValueChanged(
QtProperty *property, 
const QRectF &val);
 
  254     void slotConstraintChanged(
QtProperty *property, 
const QRectF &val);
 
  255     void slotValueChanged(
QtProperty *property, 
const QColor &val);
 
  256     void slotEnumChanged(
QtProperty *property, 
int val);
 
  257     void slotEnumNamesChanged(
QtProperty *property,
 
  258         const QStringList &enumNames);
 
  259     void slotEnumIconsChanged(
QtProperty *property,
 
  260         const QMap<int, QIcon> &enumIcons);
 
  261     void slotValueChanged(
QtProperty *property, 
const QSizePolicy &val);
 
  262     void slotValueChanged(
QtProperty *property, 
const QFont &val);
 
  263     void slotValueChanged(
QtProperty *property, 
const QCursor &val);
 
  264     void slotFlagChanged(
QtProperty *property, 
int val);
 
  265     void slotFlagNamesChanged(
QtProperty *property,
 
  266         const QStringList &flagNames);
 
  271     void valueChanged(
QtProperty *property, 
const QVariant &val);
 
  273     int internalPropertyToType(
QtProperty *property) 
const;
 
  278     QMap<int, QtAbstractPropertyManager *> m_typeToPropertyManager;
 
  279     QMap<int, QMap<QString, int> > m_typeToAttributeToAttributeType;
 
  281     QMap<const QtProperty *, QPair<QtVariantProperty *, int> >
 
  284     QMap<int, int> m_typeToValueType;
 
  287     QMap<QtProperty *, QtVariantProperty *> m_internalToProperty;
 
  289     const QString m_constraintAttribute;
 
  290     const QString m_singleStepAttribute;
 
  291     const QString m_decimalsAttribute;
 
  292     const QString m_enumIconsAttribute;
 
  293     const QString m_enumNamesAttribute;
 
  294     const QString m_flagNamesAttribute;
 
  295     const QString m_maximumAttribute;
 
  296     const QString m_minimumAttribute;
 
  297     const QString m_regExpAttribute;
 
  298     const QString m_echoModeAttribute;
 
  327       m_spinBoxFactory(
NULL),
 
  328       m_doubleSpinBoxFactory(
NULL),
 
  329       m_checkBoxFactory(
NULL),
 
  330       m_lineEditFactory(
NULL),
 
  331       m_dateEditFactory(
NULL),
 
  332       m_timeEditFactory(
NULL),
 
  333       m_dateTimeEditFactory(
NULL),
 
  334       m_keySequenceEditorFactory(
NULL),
 
  335       m_charEditorFactory(
NULL),
 
  336       m_comboBoxFactory(
NULL),
 
  337       m_cursorEditorFactory(
NULL),
 
  338       m_colorEditorFactory(
NULL),
 
  339       m_fontEditorFactory(
NULL) {}
 
  356     QMap<QtAbstractEditorFactoryBase *, int> m_factoryToType;
 
  357     QMap<int, QtAbstractEditorFactoryBase *> m_typeToFactory;
 
  380 #if QT_VERSION >= 0x040400 
  384   Q_DECLARE_METATYPE(QIcon)
 
virtual QtProperty * createProperty()
 
Definition: qteditorfactory.h:424
 
QtProperty * addProperty(const QString &name=QString())
 
Definition: qteditorfactory.h:583
 
Definition: qtvariantproperty.h:92
 
Definition: qtpropertybrowser.h:141
 
Definition: qteditorfactory.h:544
 
Definition: qtvariantproperty.h:360
 
virtual void disconnectPropertyManager(PropertyManager *manager)=0
 
T min(const std::vector< T > &_values)
get the minimum value of vector of values 
Definition: Helpers.hh:154
 
virtual QString valueText(const QtProperty *property) const 
 
Definition: qteditorfactory.h:345
 
Definition: qteditorfactory.h:507
 
Definition: qtvariantproperty.h:365
 
QtVariantPropertyPrivate(QtVariantPropertyManager *m)
Definition: qtvariantproperty.h:82
 
Definition: qteditorfactory.h:380
 
Definition: qtpropertybrowser.h:209
 
Definition: qteditorfactory.h:782
 
virtual QIcon valueIcon(const QtProperty *property) const 
 
Definition: qtvariantproperty.h:212
 
QWidget * createEditor(QtProperty *property, QWidget *parent)
Definition: qtpropertybrowser.h:214
 
Definition: qteditorfactory.h:700
 
QMap< int, QIcon > QtIconMap
Definition: qtvariantproperty.h:55
 
virtual void uninitializeProperty(QtProperty *property)
 
Definition: qtvariantproperty.h:370
 
virtual void initializeProperty(QtProperty *property)=0
 
Definition: qteditorfactory.h:745
 
Definition: qteditorfactory.h:621
 
Definition: qtvariantproperty.h:320
 
Definition: qtvariantproperty.h:78
 
#define NULL
Definition: CommonTypes.hh:30
 
#define QT_QTPROPERTYBROWSER_EXPORT
Definition: qtpropertybrowser.h:68
 
virtual bool hasValue(const QtProperty *property) const 
 
Definition: qtvariantproperty.h:60
 
Definition: qteditorfactory.h:227
 
Definition: qtpropertybrowser.h:77
 
Definition: qtvariantproperty.h:302
 
QtVariantPropertyManager * manager
Definition: qtvariantproperty.h:85
 
virtual void connectPropertyManager(PropertyManager *manager)=0
 
T max(const std::vector< T > &_values)
get the maximum value of vector of values 
Definition: Helpers.hh:141
 
Definition: qteditorfactory.h:467
 
Definition: qteditorfactory.h:658