/* 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 class QActionGroup; class SmTreeView : public QTreeView { Q_OBJECT public: SmTreeView(QWidget *parent = 0); SmTreeView(const QString &hSetting, QWidget *parent = 0); virtual void setHeaderGroup(QActionGroup *ag) { mHeaderGroup = ag; } public slots: void readHeaderConfig(); void writeHeaderConfig(); void toggleHeader(QObject *action); protected: virtual void contextMenuEvent(QContextMenuEvent *e); private: const QString mHeaderSetting; QActionGroup *mHeaderGroup; }; #endif // SMTREEVIEW_H