diff options
Diffstat (limited to 'smtreemodel.h')
-rw-r--r-- | smtreemodel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/smtreemodel.h b/smtreemodel.h index 73abe64..f23e767 100644 --- a/smtreemodel.h +++ b/smtreemodel.h @@ -11,6 +11,7 @@ #include <QAbstractItemModel> #include <QStringList> #include <QHash> +#include <QIcon> class SmTreeItem; @@ -48,6 +49,10 @@ class SmTreeModel : public QAbstractItemModel { virtual bool removeRows(int row, int count, const QModelIndex &parent); bool addRow(const QList<QVariant> &data, const QModelIndex &parent); + //misc + void setDecorationIcon(const QIcon &icon) { mDecorationIcon = icon; } + const QIcon decorationIcon() const { return mDecorationIcon; } + protected: SmTreeItem *itemAt(const QModelIndex &index) const; @@ -55,6 +60,7 @@ class SmTreeModel : public QAbstractItemModel { QStringList mHeaders; SmTreeItem *mRootItem; QHash<QString, int> mHeaderData; + QIcon mDecorationIcon; }; #endif |