29 #ifndef COLOR_PROPERTY_H 30 #define COLOR_PROPERTY_H 48 const char* changed_slot =
nullptr,
49 QObject* receiver =
nullptr);
51 bool setValue(
const QVariant& new_value)
override;
53 bool paint(QPainter* painter,
const QStyleOptionViewItem& option)
const override;
55 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option)
override;
67 virtual bool setColor(
const QColor& color);
77 #endif // VECTOR_PROPERTY_H bool setValue(const QVariant &new_value) override
Set the new value for this property. Returns true if the new value is different from the old value...
virtual QColor getColor() const
A single element of a property tree, with a name, value, description, and possibly children...
Ogre::ColourValue getOgreColor() const
Ogre::ColourValue qtToOgre(const QColor &c)
ColorProperty(const QString &name=QString(), const QColor &default_value=Qt::black, const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Create an editor widget to edit the value of this property.
virtual bool setColor(const QColor &color)
bool paint(QPainter *painter, const QStyleOptionViewItem &option) const override
Hook to provide custom painting of the value data (right-hand column) in a subclass.