41 #ifndef OPTIKA_TREEITEM_HPP_
42 #define OPTIKA_TREEITEM_HPP_
114 return parameterEntry != null;
145 QVariant
data(
int column,
int role = Qt::DisplayRole)
const;
RCP< const T > getConst() const
void appendChild(TreeItem *child)
Appends a child TreeItem to the TreeItem.
QVariant data(int column, int role=Qt::DisplayRole) const
Returns the data located in a particular column.
int childCount() const
Gets the number of child nodes this item has.
bool changeValue(QVariant value)
Changes the value of the TreeItem. Should only be used with TreeItems that represent Parameters...
QString getCurrentInvalidValueMessage() const
Gets a message desribing the error with the current value.
bool isHeader
Whether or not this is a header treeitem.
TreeItem(const QString &name, RCP< ParameterEntry > parameterEntry, TreeItem *parent=0, bool isHeader=false)
Constructs a TreeItem object.
void printOut() const
Prints out the values in the TreeItem.
TreeItem * child(int row)
Returns the child treeitem in the row specified by the row argument.
const QString name
the name of the tree item.
RCP< const ParameterEntry > getEntry() const
Gets the ParameterEntry associated with this TreeItem.
The TreeItem class is the item class used by the TreeModel class.
bool hasValidValue() const
Determines whether or not the current value associated with the TreeItem is valid.
QList< TreeItem * > childItems
The childitems of the TreeItem.
~TreeItem()
Deconstrcutor for the TreeItem.
TreeItem * parentItem
The parent TreeItem.
void changeValueForArray(QVariant value, QString type, bool twoD=false)
Changes the value of an array.
int columnCount() const
How man columns the TreeItem has. Should always be 3.
QString myTypeId
The type id associated with this TreeItem.
RCP< ParameterEntry > parameterEntry
The ParameterEntry being represented by the TreeItem.
static QString getTypeId(const RCP< const ParameterEntry > parameter)
Gets the type id to be used for the TreeItem.
bool hasEntry() const
Returns whether or not this TreeItem has a ParameterEntry associated with it.
int row() const
Returns the row in which this TreeItem is located.
const QList< TreeItem * > getChildItems()
Gets a list of all the child items.
QString docString
The docString for the TreeItem.
TreeItem * parent()
Gets the parent TreeItem.
void setValidator(RCP< const ParameterEntryValidator > validator)
Sets the validator for the parameter the TreeItem represents.