KDEUI
kviewstatesaver.cpp
Go to the documentation of this file.
67 if ( m_horizontalScrollBarValue >= 0 && m_horizontalScrollBarValue <= m_scrollArea->horizontalScrollBar()->maximum() ) {
71 if ( m_verticalScrollBarValue >= 0 && m_verticalScrollBarValue <= m_scrollArea->verticalScrollBar()->maximum() ) {
83 return !m_pendingCurrent.isEmpty() || !m_pendingExpansions.isEmpty() || !m_pendingSelections.isEmpty();
262 QModelIndex currentIndex = q->indexFromConfigString(m_selectionModel->model(), m_pendingCurrent);
404 return qMakePair(d->m_scrollArea->verticalScrollBar()->value(), d->m_scrollArea->horizontalScrollBar()->value());
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
QItemSelectionModel * selectionModel() const
The QItemSelectionModel whose state is persisted.
Definition: kviewstatesaver.cpp:152
QString currentIndexKey() const
Returns a QString describing the current index in the selection model.
Definition: kviewstatesaver.cpp:370
QItemSelectionModel * selectionModel() const
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
void restoreCurrentItem(const QString &indexString)
Make the index described by indexString the currentIndex in the selectionModel.
Definition: kviewstatesaver.cpp:273
QSet< T > toSet() const
QStringList selectionKeys() const
Returns a QStringList describing the selection in the selectionModel.
Definition: kviewstatesaver.cpp:387
bool isValid() const
static const char * scrollStateHorizontalKey
Definition: kviewstatesaver.cpp:36
void restoreScrollState(int verticalScoll, int horizontalScroll)
Restores the scroll state of the QAbstractScrollArea to the verticalScoll and horizontalScroll.
Definition: kviewstatesaver.cpp:323
bool isEmpty() const
bool isEmpty() const
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
QStringList expansionKeys() const
Returns a QStringList representing the expanded indexes in the QTreeView.
Definition: kviewstatesaver.cpp:378
void deleteLater()
QPair< int, int > scrollState() const
Returns the vertical and horizontal scroll of the QAbstractScrollArea.
Definition: kviewstatesaver.cpp:401
void restoreExpanded(const QStringList &indexStrings)
Expand the indexes described by indexStrings in the QTreeView.
Definition: kviewstatesaver.cpp:308
iterator begin()
iterator erase(iterator pos)
const QAbstractItemModel * model() const
void setSelectionModel(QItemSelectionModel *selectionModel)
Sets the QItemSelectionModel whose state is persisted.
Definition: kviewstatesaver.cpp:158
iterator end()
void restoreSelection(const QStringList &indexStrings)
Select the indexes described by indexStrings.
Definition: kviewstatesaver.cpp:354
virtual QString indexToConfigString(const QModelIndex &index) const =0
Reimplement to return a unique string for the index.
QAbstractItemView * view() const
The view whose state is persisted.
Definition: kviewstatesaver.cpp:146
void restoreState(const KConfigGroup &configGroup)
Restores the state from the configGroup.
Definition: kviewstatesaver.cpp:196
T readEntry(const QString &key, const T &aDefault) const
Object for saving and restoring state in QTreeViews and QItemSelectionModels.
Definition: kviewstatesaver.h:169
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.