From 046503ba7830427fcd055da569326f0ac814b979 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 5 Apr 2013 21:23:45 +0200 Subject: 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... --- pictureswidget.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pictureswidget.h') diff --git a/pictureswidget.h b/pictureswidget.h index 850d7ae..91bcfa7 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -9,11 +9,11 @@ #define PICTURESWIDGET_H #include -#include #include #include "smtreemodel.h" #include "pictureviewer2.h" +#include "smtreeview.h" class PictureView; class MappingTreeWidget; @@ -62,7 +62,7 @@ class PicturesWidget : public QWidget { QAction *mPicViewerA; }; -class PictureView : public QTreeView { +class PictureView : public SmTreeView { Q_OBJECT public: explicit PictureView(QWidget *parent = 0); @@ -71,7 +71,6 @@ class PictureView : public QTreeView { QSortFilterProxyModel *proxy() { return mProxy; } void setPV(PictureViewer2 *pv) { mPV = pv; } PictureViewer2 *PV() { return mPV; } - void setHeaderGroup(QActionGroup *ag) { mHeaderGroup = ag; } public slots: void mappingChanged(int pMapId); @@ -80,9 +79,6 @@ class PictureView : public QTreeView { void setPVData(int replace = false); void setPVAll(); void setHoverWinVisible(bool visible) const; - void toggleHeader(QObject *action); - void readHeaderConfig(); - void writeHeaderConfig(); protected: virtual void hideEvent(QHideEvent *); @@ -107,7 +103,6 @@ class PictureView : public QTreeView { QList mFilesMappings; PictureViewer2 *mPV; MappingTreeModel *mMappingTreeModel; - QActionGroup *mHeaderGroup; }; #endif // PICTURESWIDGET_H -- cgit v1.2.3-70-g09d2