Go to the documentation of this file.
30 #include <QStringList>
38 const Ogre::Quaternion& default_value,
39 const QString& description,
43 , ignore_child_updates_(false)
83 QStringList strings = new_value.toString().split(
';');
84 if (strings.size() >= 4)
87 float x = strings[0].toFloat(&x_ok);
89 float y = strings[1].toFloat(&y_ok);
91 float z = strings[2].toFloat(&z_ok);
93 float w = strings[3].toFloat(&w_ok);
94 if (x_ok && y_ok && z_ok && w_ok)
125 value_ = QString(
"%1; %2; %3; %4")
135 if (
config.mapGetFloat(
"X", &x) &&
config.mapGetFloat(
"Y", &y) &&
config.mapGetFloat(
"Z", &z) &&
136 config.mapGetFloat(
"W", &w))
void updateFromChildren()
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,...
QuaternionProperty(const QString &name=QString(), const Ogre::Quaternion &default_value=Ogre::Quaternion::IDENTITY, const QString &description=QString(), Property *parent=nullptr)
void setReadOnly(bool read_only) override
Overridden from Property to propagate read-only-ness to children.
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
Property(const QString &name=QString(), const QVariant &default_value=QVariant(), const QString &description=QString(), Property *parent=nullptr)
Constructor.
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.
void load(const Config &config) override
Load the value of this property and/or its children from the given Config node.
void emitDataChanged(Property *property, bool emit_config_changed=true)
virtual bool setValue(const QVariant &new_value)
Set the new value for this property. Returns true if the new value is different from the old value,...
bool ignore_child_updates_
virtual bool setQuaternion(const Ogre::Quaternion &quaternion)
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
virtual void setReadOnly(bool read_only)
Prevent or allow users to edit this property from a PropertyTreeWidget.
void changed()
Emitted by setValue() just after the value has changed.
Ogre::Quaternion quaternion_
QVariant value_
This is the central property value. If you set it directly in a subclass, do so with care because man...
void aboutToChange()
Emitted by setValue() just before the value has changed.
void save(Config config) const override
Write the value of this property and/or its children into the given Config reference.
Configuration data storage class.
virtual bool getReadOnly() const
Return the read-only-ness of this property.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02