Go to the documentation of this file.
30 #include <QApplication>
45 :
Property(name, text, text, parent), level_(level)
64 if ((
getViewFlags(column) & Qt::ItemIsEnabled) && column == 0 && role == Qt::ForegroundRole)
68 if (column == 0 && role == Qt::DecorationRole)
virtual QVariant getViewData(int column, int role) const
Return data appropriate for the given column (0 or 1) and role for this Property.
static QString status_words_[3]
StatusProperty(const QString &name, const QString &text, Level level, Property *parent)
QPixmap loadPixmap(const QString &url, bool fill_cache)
bool setValue(const QVariant &new_value) override
Set the status text. Overridden from Property.
A single element of a property tree, with a name, value, description, and possibly children.
static QColor statusColor(Level level)
Return the color appropriate for the given status level.
void setShouldBeSaved(bool save)
If save is false, neither the property nor its children will get saved. If true (the default),...
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,...
QVariant getViewData(int column, int role) const override
Return data appropriate for the given column (0 or 1) and role for this StatusProperty.
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
virtual void setDescription(const QString &description)
Set the description.
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.
virtual void setLevel(Level level)
static QColor status_colors_[3]
static QString statusWord(Level level)
Return the word appropriate for the given status level: "Ok", "Warn", or "Error".
Qt::ItemFlags getViewFlags(int column) const override
Return item flags appropriate for the given column (0 or 1) for this StatusProperty.
QIcon statusIcon(Level level) const
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:03