cf12defd28
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
34 lines
766 B
C++
34 lines
766 B
C++
|
|
#ifndef KCONFIGVIEWSTATESAVER_H
|
|
#define KCONFIGVIEWSTATESAVER_H
|
|
|
|
#include <KViewStateSerializer>
|
|
|
|
#include "kconfigwidgets_export.h"
|
|
|
|
class KConfigGroup;
|
|
|
|
/**
|
|
* @class KConfigViewStateSaver kconfigviewstatesaver.h KConfigViewStateSaver
|
|
*
|
|
* @brief Base class for saving and restoring state in QTreeViews and QItemSelectionModels using KConfig as storage
|
|
*/
|
|
class KCONFIGWIDGETS_EXPORT KConfigViewStateSaver : public KViewStateSerializer
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit KConfigViewStateSaver(QObject *parent = nullptr);
|
|
|
|
/**
|
|
Saves the state to the @p configGroup
|
|
*/
|
|
void saveState(KConfigGroup &configGroup);
|
|
|
|
/**
|
|
Restores the state from the @p configGroup
|
|
*/
|
|
void restoreState(const KConfigGroup &configGroup);
|
|
};
|
|
|
|
#endif
|