diff options
author | Arno <am@disconnect.de> | 2010-06-13 14:52:16 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-06-13 14:52:16 +0200 |
commit | c7e25a4bb75417f1615b71940694f5f4479f9043 (patch) | |
tree | 9774bd30984a8abc0a7c2b66abc5146b5a788d54 /smtreemodel.cpp | |
parent | f0970f64fd92fb65a3e0bd2b07b733f9932d8b35 (diff) | |
download | SheMov-c7e25a4bb75417f1615b71940694f5f4479f9043.tar.gz SheMov-c7e25a4bb75417f1615b71940694f5f4479f9043.tar.bz2 SheMov-c7e25a4bb75417f1615b71940694f5f4479f9043.zip |
Implemented SeriesTreeWidget
Implemented a widget for showing series in a tree. Also implemented
filtering and sorting for this widget.
Some bugfixes and enhancements:
-Show dildo as DecorationRole in SeriesWidget
-removed Quality from SeriesWidget
Diffstat (limited to 'smtreemodel.cpp')
-rw-r--r-- | smtreemodel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/smtreemodel.cpp b/smtreemodel.cpp index fe5482c..c762802 100644 --- a/smtreemodel.cpp +++ b/smtreemodel.cpp @@ -5,6 +5,8 @@ 2 of the License, or (at your option) any later version. */ +#include <QIcon> + #include "smtreemodel.h" #include "smtreeitem.h" @@ -62,7 +64,7 @@ Qt::ItemFlags SmTreeModel::flags(const QModelIndex &index) const{ QVariant SmTreeModel::headerData(int section, Qt::Orientation orientation, int role) const{ if((orientation == Qt::Horizontal) && (role == Qt::DisplayRole)){ - return mRootItem->data(section); + return mHeaders.at(section); } return QVariant(); } @@ -87,6 +89,11 @@ QVariant SmTreeModel::data(const QModelIndex &index, int role) const{ if(role == Qt::EditRole){ return item->data(index.column()); } + if(role == Qt::DecorationRole){ + if(index.column() == 0){ + return QIcon(":/dildo.png"); + } + } return QVariant(); } |