Go to the documentation of this file.
29 #ifndef COLOR_PROPERTY_H
30 #define COLOR_PROPERTY_H
49 template <
typename Func,
typename R>
51 const QColor& default_value,
52 const QString& description,
58 connect(receiver, std::forward<Func>(changed_slot));
62 template <
typename Func,
typename P>
64 const QColor& default_value,
65 const QString& description,
70 connect(parent, std::forward<Func>(changed_slot));
73 bool setValue(
const QVariant& new_value)
override;
75 bool paint(QPainter* painter,
const QStyleOptionViewItem& option)
const override;
77 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option)
override;
89 virtual bool setColor(
const QColor& color);
99 #endif // VECTOR_PROPERTY_H
virtual QColor getColor() const
Ogre::ColourValue qtToOgre(const QColor &c)
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,...
bool paint(QPainter *painter, const QStyleOptionViewItem &option) const override
Hook to provide custom painting of the value data (right-hand column) in a subclass.
ColorProperty(const QString &name=QString(), const QColor &default_value=Qt::black, const QString &description=QString(), Property *parent=nullptr)
QMetaObject::Connection connect(const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection)
Connect changed() signal to given slot of receiver.
A single element of a property tree, with a name, value, description, and possibly children.
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Create an editor widget to edit the value of this property.
ColorProperty(const QString &name, const QColor &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver)
virtual bool setColor(const QColor &color)
ColorProperty(const QString &name, const QColor &default_value, const QString &description, P *parent, Func &&changed_slot)
Ogre::ColourValue getOgreColor() const
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02