diff options
Diffstat (limited to 'smtreeview.h')
-rw-r--r-- | smtreeview.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/smtreeview.h b/smtreeview.h new file mode 100644 index 0000000..eff41d5 --- /dev/null +++ b/smtreeview.h @@ -0,0 +1,32 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#ifndef SMTREEVIEW_H +#define SMTREEVIEW_H + +#include <QTreeView> + +class QActionGroup; + +class SmTreeView : public QTreeView { + Q_OBJECT + public: + SmTreeView(QWidget *parent = 0) : QTreeView(parent) {} + SmTreeView(const QString &hSetting, QWidget *parent = 0); + virtual void setHeaderGroup(QActionGroup *ag) { mHeaderGroup = ag; } + + public slots: + void readHeaderConfig(); + void writeHeaderConfig(); + void toggleHeader(QObject *action); + + private: + const QString mHeaderSetting; + QActionGroup *mHeaderGroup; +}; + +#endif // SMTREEVIEW_H |