KViewStateMaintainer

Search for usage in LXR

KViewStateMaintainer< StateSaver > Class Template Reference

#include <KViewStateMaintainer>

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());
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.
See also
KConfigViewStateSaver

Definition at line 33 of file kviewstatemaintainer.h.

Constructor & Destructor Documentation

◆ KViewStateMaintainer()

template<typename StateSaver >
KViewStateMaintainer< StateSaver >::KViewStateMaintainer ( const KConfigGroup & configGroup,
QObject * parent = nullptr )
inline

Definition at line 38 of file kviewstatemaintainer.h.

Member Function Documentation

◆ restoreState()

template<typename StateSaver >
void KViewStateMaintainer< StateSaver >::restoreState ( )
inline

Definition at line 53 of file kviewstatemaintainer.h.

◆ saveState()

template<typename StateSaver >
void KViewStateMaintainer< StateSaver >::saveState ( )
inline

Definition at line 44 of file kviewstatemaintainer.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.