KDEUI
kviewstatesaver.cpp
Go to the documentation of this file.
64 if ( m_horizontalScrollBarValue >= 0 && m_horizontalScrollBarValue <= m_scrollArea->horizontalScrollBar()->maximum() ) {
68 if ( m_verticalScrollBarValue >= 0 && m_verticalScrollBarValue <= m_scrollArea->verticalScrollBar()->maximum() ) {
80 return !m_pendingCurrent.isEmpty() || !m_pendingExpansions.isEmpty() || !m_pendingSelections.isEmpty();
259 QModelIndex currentIndex = q->indexFromConfigString(m_selectionModel->model(), m_pendingCurrent);
401 return qMakePair(d->m_scrollArea->verticalScrollBar()->value(), d->m_scrollArea->horizontalScrollBar()->value());
QItemSelectionModel * selectionModel() const
The QItemSelectionModel whose state is persisted.
Definition: kviewstatesaver.cpp:149
QString currentIndexKey() const
Returns a QString describing the current index in the selection model.
Definition: kviewstatesaver.cpp:367
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:270
QStringList selectionKeys() const
Returns a QStringList describing the selection in the selectionModel.
Definition: kviewstatesaver.cpp:384
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:320
void saveState(KConfigGroup &configGroup)
Saves the state to the configGroup.
Definition: kviewstatesaver.cpp:230
void setView(QAbstractItemView *view)
Sets the view whose state is persisted.
Definition: kviewstatesaver.cpp:129
QStringList expansionKeys() const
Returns a QStringList representing the expanded indexes in the QTreeView.
Definition: kviewstatesaver.cpp:375
QPair< int, int > scrollState() const
Returns the vertical and horizontal scroll of the QAbstractScrollArea.
Definition: kviewstatesaver.cpp:398
void restoreExpanded(const QStringList &indexStrings)
Expand the indexes described by indexStrings in the QTreeView.
Definition: kviewstatesaver.cpp:305
void setSelectionModel(QItemSelectionModel *selectionModel)
Sets the QItemSelectionModel whose state is persisted.
Definition: kviewstatesaver.cpp:155
void restoreSelection(const QStringList &indexStrings)
Select the indexes described by indexStrings.
Definition: kviewstatesaver.cpp:351
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:143
void restoreState(const KConfigGroup &configGroup)
Restores the state from the configGroup.
Definition: kviewstatesaver.cpp:193
T readEntry(const QString &key, const T &aDefault) const
Object for saving and restoring state in QTreeViews and QItemSelectionModels.
Definition: kviewstatesaver.h:169
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.