Go to the documentation of this file.
29 #ifndef STRING_PROPERTY_H
30 #define STRING_PROPERTY_H
47 template <
typename Func,
typename R>
49 const QString& default_value,
50 const QString& description,
56 connect(receiver, std::forward<Func>(changed_slot));
60 template <
typename Func,
typename P>
62 const QString& default_value,
63 const QString& description,
68 connect(parent, std::forward<Func>(changed_slot));
73 return getValue().toString().toStdString();
87 return setValue(QString::fromStdString(std_str));
93 #endif // STRING_PROPERTY_H
bool setString(const QString &str)
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
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.
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,...
Property specialized for string values.
std::string getStdString()
StringProperty(const QString &name, const QString &default_value, const QString &description, P *parent, Func &&changed_slot)
StringProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr)
bool setStdString(const std::string &std_str)
StringProperty(const QString &name, const QString &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver)
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:03