KViewStateMaintainer

Search for usage in LXR

KViewStateMaintainer< StateSaver > Class Template Reference

#include <KViewStateMaintainer>

Inherits KViewStateMaintainerBase.

Public Member Functions

 KViewStateMaintainer (const KConfigGroup &configGroup, QObject *parent=nullptr)
 
void restoreState ()
 
void saveState ()
 

Detailed Description

template<typename StateSaver>
class KViewStateMaintainer< StateSaver >

Encapsulates the maintenance of state between resets of QAbstractItemModel.

m_collectionViewStateMaintainer = new KViewStateMaintainer<Akonadi::ETMViewStateSaver>(KSharedConfig::openConfig()->group("collectionView"));
m_collectionViewStateMaintainer->setView(m_collectionView);
m_collectionCheckStateMaintainer = new KViewStateMaintainer<Akonadi::ETMViewStateSaver>(KSharedConfig::openConfig()->group("collectionCheckState"));
m_collectionCheckStateMaintainer->setSelectionModel(m_checkableProxy->selectionModel());
See also
KConfigViewStateSaver

Definition at line 33 of file kviewstatemaintainer.h.


The documentation for this class was generated from the following file:
static KSharedConfig::Ptr openConfig(const QString &fileName=QString(), OpenFlags mode=FullConfig, QStandardPaths::StandardLocation type=QStandardPaths::GenericConfigLocation)
Encapsulates the maintenance of state between resets of QAbstractItemModel.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Nov 28 2023 03:49:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.