diff options
author | Arno <am@disconnect.de> | 2013-04-05 21:23:45 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-04-05 21:23:45 +0200 |
commit | 046503ba7830427fcd055da569326f0ac814b979 (patch) | |
tree | d3404b51c054a9f4b4171bbd9641162e8c3333a1 /filestreewidget.h | |
parent | 0f4f0d5860e4a261f37ae6f294c154c3009c4562 (diff) | |
download | SheMov-046503ba7830427fcd055da569326f0ac814b979.tar.gz SheMov-046503ba7830427fcd055da569326f0ac814b979.tar.bz2 SheMov-046503ba7830427fcd055da569326f0ac814b979.zip |
New Class: SmTreeView
Code reusage: all 3 tabs had the same funtions: readHeaderConfig,
writeHeaderConfig and toggleHeader, so turn it into a class derived from
QTreeView.
Unfortunately mATree didn't do things as later added Views, so it took
some time to find the culprit in SheMov::readSettings :( Hopefully I
didn't break too much...
Diffstat (limited to 'filestreewidget.h')
-rw-r--r-- | filestreewidget.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/filestreewidget.h b/filestreewidget.h index 5068b91..6369300 100644 --- a/filestreewidget.h +++ b/filestreewidget.h @@ -9,11 +9,12 @@ #define FILESTREEWIDGET_H #include <QtWidgets/QWidget> -#include <QtWidgets/QTreeView> #include <QtWidgets/QDialog> #include <QPersistentModelIndex> #include <QSortFilterProxyModel> +#include "smtreeview.h" + typedef QList<QPersistentModelIndex> PersistenModelIndexList; class FilesTreeView; @@ -64,17 +65,14 @@ class FilesTreeWidget : public QWidget { qint64 mSelectedSize; }; -class FilesTreeView : public QTreeView { +class FilesTreeView : public SmTreeView { Q_OBJECT public: explicit FilesTreeView(QWidget *parent = 0); - virtual void setModel(QAbstractItemModel *model); public slots: - void readSettings(); - void readHeaderConfig(); - void writeHeaderConfig(); - void toggleHeader(QObject *action); + void readSettings(); + void writeSettings(); protected: virtual void contextMenuEvent(QContextMenuEvent *event); |