diff options
author | Arno <am@disconnect.de> | 2013-07-06 19:24:04 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-07-06 19:24:04 +0200 |
commit | b039fbf6aaef0e961490f8267a91976866ac2e0a (patch) | |
tree | 270fbd374dbb0d2cc524ba24328da537f30213a7 /archiveview.h | |
parent | bd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10 (diff) | |
download | SheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.tar.gz SheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.tar.bz2 SheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.zip |
Lots of Display Changes
* Save header states
* Implement delegates for columns
* unify size and duration to 1 column
* colorize View
... and lots of other things I forgot :)
Diffstat (limited to 'archiveview.h')
-rw-r--r-- | archiveview.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/archiveview.h b/archiveview.h index de9875d..7507320 100644 --- a/archiveview.h +++ b/archiveview.h @@ -12,6 +12,7 @@ #include <QRegExp> #include <QSortFilterProxyModel> #include <QWidget> +#include <QStyledItemDelegate> #include "archivemodel.h" #include "smtreeview.h" @@ -80,7 +81,7 @@ class ArchiveTree : public SmTreeView { class ArchiveFiles : public SmTreeView { public: - explicit ArchiveFiles(QWidget *parent = 0); + explicit ArchiveFiles(const QString &headerSettings = "afilesheaders", QWidget *parent = 0); }; class ArchiveProxy : public QSortFilterProxyModel { @@ -105,4 +106,40 @@ class ArchiveFilesProxy : public QSortFilterProxyModel { explicit ArchiveFilesProxy(QObject *parent = 0); }; +class FileTypeDelegate : public QStyledItemDelegate { + Q_OBJECT + public: + explicit FileTypeDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; +}; + +class DvdNoDelegate : public QStyledItemDelegate { + Q_OBJECT + public: + explicit DvdNoDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; +}; + +class SizeDelegate : public QStyledItemDelegate { + Q_OBJECT + public: + explicit SizeDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; +}; + +class DurationDelegate : public QStyledItemDelegate { + Q_OBJECT + public: + explicit DurationDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; +}; + +class EmptyDelegate : public QStyledItemDelegate { + Q_OBJECT + public: + explicit EmptyDelegate(QObject *parent = 0) : QStyledItemDelegate(parent) {}; + virtual QString displayText(const QVariant &value, const QLocale &locale) const; +}; + + #endif // ARCHIVEVIEW_H |