From a4054f1c7b38e5996081efd7583c06ebf7758e61 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 20 Oct 2012 07:46:11 +0200 Subject: Make headers in PictureView configurable Save state of QHeaderView and restore it on startup. Maybe it's time for a SmTreeView Class implementing these generic functions... --- pictureswidget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pictureswidget.h') diff --git a/pictureswidget.h b/pictureswidget.h index 9618e6e..4d8db73 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -28,6 +28,7 @@ class QEvent; class HoverWindow; class PictureViewer2; class QAction; +class QActionGroup; struct MappingData; class PicturesWidget : public QWidget { @@ -69,6 +70,7 @@ 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); @@ -77,6 +79,9 @@ 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 *); @@ -101,6 +106,7 @@ class PictureView : public QTreeView { QList mFilesMappings; PictureViewer2 *mPV; MappingTreeModel *mMappingTreeModel; + QActionGroup *mHeaderGroup; }; #endif // PICTURESWIDGET_H -- cgit v1.2.3-70-g09d2