KDEUI
kviewstatesaver.h
Go to the documentation of this file.
259 virtual QModelIndex indexFromConfigString(const QAbstractItemModel *model, const QString &key) const = 0;
virtual QString indexToConfigString(const QModelIndex &index) const =0
Reimplement to return a unique string for the index.
QString currentIndexKey() const
Returns a QString describing the current index in the selection model.
Definition kviewstatesaver.cpp:370
QStringList expansionKeys() const
Returns a QStringList representing the expanded indexes in the QTreeView.
Definition kviewstatesaver.cpp:378
QAbstractItemView * view() const
The view whose state is persisted.
Definition kviewstatesaver.cpp:146
QPair< int, int > scrollState() const
Returns the vertical and horizontal scroll of the QAbstractScrollArea.
Definition kviewstatesaver.cpp:401
void restoreCurrentItem(const QString &indexString)
Make the index described by indexString the currentIndex in the selectionModel.
Definition kviewstatesaver.cpp:273
void restoreSelection(const QStringList &indexStrings)
Select the indexes described by indexStrings.
Definition kviewstatesaver.cpp:354
virtual QModelIndex indexFromConfigString(const QAbstractItemModel *model, const QString &key) const =0
Reimplement to return an index in the model described by the unique key key.
void restoreState(const KConfigGroup &configGroup)
Restores the state from the configGroup.
Definition kviewstatesaver.cpp:196
void setSelectionModel(QItemSelectionModel *selectionModel)
Sets the QItemSelectionModel whose state is persisted.
Definition kviewstatesaver.cpp:158
void saveState(KConfigGroup &configGroup)
Saves the state to the configGroup.
Definition kviewstatesaver.cpp:233
void setView(QAbstractItemView *view)
Sets the view whose state is persisted.
Definition kviewstatesaver.cpp:132
QItemSelectionModel * selectionModel() const
The QItemSelectionModel whose state is persisted.
Definition kviewstatesaver.cpp:152
void restoreScrollState(int verticalScoll, int horizontalScroll)
Restores the scroll state of the QAbstractScrollArea to the verticalScoll and horizontalScroll.
Definition kviewstatesaver.cpp:323
void restoreExpanded(const QStringList &indexStrings)
Expand the indexes described by indexStrings in the QTreeView.
Definition kviewstatesaver.cpp:308
QStringList selectionKeys() const
Returns a QStringList describing the selection in the selectionModel.
Definition kviewstatesaver.cpp:387
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.