FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
Helper that keeps track of selected items in any kind of view (not specific to Qt) More...
#include <qttools/gui/indexed_selection_model.h>
Public Slots | |
virtual void | clear () |
Untoggle all selected items, this will emit selectionCleared() at the end. More... | |
void | toggleItem (int id) |
Toggle the item's selection state of index id . More... | |
Signals | |
void | selectionCleared () |
void | itemToggled (int id, bool on) |
void | selectionChanged () |
Public Member Functions | |
IndexedSelectionModel (QObject *parent=NULL) | |
const QSet< int > & | selectedItems () const |
Indexes of the items being selected in the view. More... | |
virtual bool | hasSelection () const |
Is the selection not empty ? More... | |
virtual bool | isValidIndex (int id) const |
Protected Member Functions | |
void | beginClear () |
void | clearItems () |
void | endClear () |
Helper that keeps track of selected items in any kind of view (not specific to Qt)
View items are each referenced by an index that the caller must provide.
qtgui::IndexedSelectionModel::IndexedSelectionModel | ( | QObject * | parent = NULL | ) |
|
protected |
|
virtualslot |
Untoggle all selected items, this will emit selectionCleared() at the end.
Signal selectionCleared() is emitted only if hasSelection() returned true
.
|
protected |
|
protected |
|
virtual |
Is the selection not empty ?
|
virtual |
Is index id
valid ?
By default only indexes >= 0 are valid.
|
signal |
const QSet< int > & qtgui::IndexedSelectionModel::selectedItems | ( | ) | const |
Indexes of the items being selected in the view.
|
signal |
|
signal |
|
slot |
Toggle the item's selection state of index id
.