44 :
Property( name, text, text, parent )
61 if ( (
getViewFlags(column) & Qt::ItemIsEnabled) && column == 0 && role == Qt::ForegroundRole )
65 if( column == 0 && role == Qt::DecorationRole )
virtual void setLevel(Level level)
PropertyTreeModel * model_
Pointer to the PropertyTreeModel managing this property tree.
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...
A single element of a property tree, with a name, value, description, and possibly children...
virtual QVariant getViewData(int column, int role) const
Return data appropriate for the given column (0 or 1) and role for this Property. ...
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 StatusProperty.
static QString status_words_[3]
static QColor statusColor(Level level)
Return the color appropriate for the given status level.
QIcon statusIcon(Level level) const
void setShouldBeSaved(bool save)
If save is true and getReadOnly() is false, shouldBeSaved will return true; otherwise false...
virtual QVariant getViewData(int column, int role) const
Return data appropriate for the given column (0 or 1) and role for this StatusProperty.
static QString statusWord(Level level)
Return the word appropriate for the given status level: "Ok", "Warn", or "Error". ...
void emitDataChanged(Property *property)
static QColor status_colors_[3]
StatusProperty(const QString &name, const QString &text, Level level, Property *parent)
QPixmap loadPixmap(QString url, bool fill_cache)
virtual bool setValue(const QVariant &new_value)
Set the status text. Overridden from Property.
virtual Qt::ItemFlags getViewFlags(int column) const
Return item flags appropriate for the given column (0 or 1) for this Property.