akonadi
entitytreeviewstatesaver.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ENTITYTREEVIEWSTATESAVER_H
00021 #define AKONADI_ENTITYTREEVIEWSTATESAVER_H
00022
00023 #include "akonadi_export.h"
00024
00025 #include <QtCore/QObject>
00026
00027 class QTreeView;
00028 class KConfigGroup;
00029
00030 namespace Akonadi {
00031
00032 class EntityTreeViewStateSaverPrivate;
00033
00087 class AKONADI_EXPORT EntityTreeViewStateSaver : public QObject
00088 {
00089 Q_OBJECT
00090
00091 public:
00097 explicit EntityTreeViewStateSaver( QTreeView* view );
00098
00102 ~EntityTreeViewStateSaver();
00103
00109 void saveState( KConfigGroup &configGroup ) const;
00110
00118 void restoreState( const KConfigGroup &configGroup ) const;
00119
00120 private:
00121
00122 EntityTreeViewStateSaverPrivate* const d;
00123 Q_PRIVATE_SLOT( d, void rowsInserted( const QModelIndex&, int, int ) )
00124 Q_PRIVATE_SLOT( d, void restoreScrollBarState() )
00125
00126 };
00127
00128 }
00129
00130 #endif