52 QHash<QString, StatusProperty*>::iterator child_iter =
status_children_.find(name);
61 child = child_iter.value();
98 for (
int i = 0; i < to_be_deleted.size(); i++)
100 delete to_be_deleted[i];
110 QHash<QString, StatusProperty*>::iterator iter;
113 Level child_level = iter.value()->getLevel();
114 if (child_level > new_level)
116 new_level = child_level;
virtual void setLevel(Level level)
A single element of a property tree, with a name, value, description, and possibly children...
bool setValue(const QVariant &new_value) override
Set the status text. Overridden from Property.
virtual void setName(const QString &name)
Set the name.
virtual Level getLevel() const
void setName(const QString &name) override
Set the prefix of the name.
void setShouldBeSaved(bool save)
If save is true and getReadOnly() is false, shouldBeSaved will return true; otherwise false...
StatusList(const QString &name=QString("Status"), Property *parent=nullptr)
virtual int numChildren() const
Return the number of child objects (Property or otherwise).
void setStatus(Level level, const QString &name, const QString &text)
static QString statusWord(Level level)
Return the word appropriate for the given status level: "Ok", "Warn", or "Error". ...
void updateLabel()
Update the label text based on the name_prefix_ and the current status level.
void setLevel(Level level) override
StatusProperty(const QString &name, const QString &text, Level level, Property *parent)
QHash< QString, StatusProperty * > status_children_
void deleteStatus(const QString &name)