- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions

# QItemSelectionModel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 127 of file qitemselectionmodel.h.

`#include <qitemselectionmodel.h>`

Inheritance diagram for QItemSelectionModel:
[legend]

List of all members.

## Public Types
enum | SelectionFlag { NoUpdate = 0x0000, Clear = 0x0001, Select = 0x0002, Deselect = 0x0004, Toggle = 0x0008, Current = 0x0010, Rows = 0x0020, Columns = 0x0040, SelectCurrent = Select | Current, ToggleCurrent = Toggle | Current, ClearAndSelect = Clear | Select }
## Public Slots
void | setCurrentIndex (const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
virtual void | select (const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
virtual void | select (const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
virtual void | clear ()
virtual void | reset ()
void | clearSelection ()
## Signals
void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
void | currentChanged (const QModelIndex &current, const QModelIndex &previous)
void | currentRowChanged (const QModelIndex &current, const QModelIndex &previous)
void | currentColumnChanged (const QModelIndex &current, const QModelIndex &previous)
## Public Member Functions
| QItemSelectionModel (QAbstractItemModel *model)
| QItemSelectionModel (QAbstractItemModel *model, QObject *parent)
virtual | ~QItemSelectionModel ()
QModelIndex | currentIndex () const
bool | isSelected (const QModelIndex &index) const
bool | isRowSelected (int row, const QModelIndex &parent) const
bool | isColumnSelected (int column, const QModelIndex &parent) const
bool | rowIntersectsSelection (int row, const QModelIndex &parent) const
bool | columnIntersectsSelection (int column, const QModelIndex &parent) const
bool | hasSelection () const
QModelIndexList | selectedIndexes () const
QModelIndexList | selectedRows (int column=0) const
QModelIndexList | selectedColumns (int row=0) const
const QItemSelection | selection () const
const QAbstractItemModel * | model () const
## Protected Member Functions
| QItemSelectionModel (QItemSelectionModelPrivate &dd, QAbstractItemModel *model)
void | emitSelectionChanged (const QItemSelection &newSelection, const QItemSelection &oldSelection)

## Member Enumeration Documentation

enum SelectionFlag

Search for all occurrences

Enumerator:

  NoUpdate | Search for all occurrences
  Clear | Search for all occurrences
  Select | Search for all occurrences
  Deselect | Search for all occurrences
  Toggle | Search for all occurrences
  Current | Search for all occurrences
  Rows | Search for all occurrences
  Columns | Search for all occurrences
  SelectCurrent | Search for all occurrences
  ToggleCurrent | Search for all occurrences
  ClearAndSelect | Search for all occurrences

Definition at line 135 of file qitemselectionmodel.h.

                           {
            NoUpdate       = 0x0000,
            Clear          = 0x0001,
            Select         = 0x0002,
            Deselect       = 0x0004,
            Toggle         = 0x0008,
            Current        = 0x0010,
            Rows           = 0x0020,
            Columns        = 0x0040,
            SelectCurrent  = Select | Current,
            ToggleCurrent  = Toggle | Current,
            ClearAndSelect = Clear | Select
        };

## Constructor & Destructor Documentation

QItemSelectionModel | ( | QAbstractItemModel * | model | ) | `[explicit]`

QItemSelectionModel | ( | QAbstractItemModel * | model,
|  | QObject * | parent
| ) |  | `[explicit]`

virtual ~QItemSelectionModel | ( |  | ) | `[virtual]`

QItemSelectionModel | ( | QItemSelectionModelPrivate & | dd,
|  | QAbstractItemModel * | model
| ) |  | `[protected]`

## Member Function Documentation

QModelIndex currentIndex | ( |  | ) | const

Search for all occurrences

bool isSelected | ( | const QModelIndex & | index | ) | const

Search for all occurrences

bool isRowSelected | ( | int | row,
|  | const QModelIndex & | parent
| ) |  | const

Search for all occurrences

bool isColumnSelected | ( | int | column,
|  | const QModelIndex & | parent
| ) |  | const

Search for all occurrences

bool rowIntersectsSelection | ( | int | row,
|  | const QModelIndex & | parent
| ) |  | const

Search for all occurrences

bool columnIntersectsSelection | ( | int | column,
|  | const QModelIndex & | parent
| ) |  | const

Search for all occurrences

bool hasSelection | ( |  | ) | const

Search for all occurrences

QModelIndexList selectedIndexes | ( |  | ) | const

Search for all occurrences

QModelIndexList selectedRows | ( | int | column = `0` | ) | const

Search for all occurrences

QModelIndexList selectedColumns | ( | int | row = `0` | ) | const

Search for all occurrences

const QItemSelection selection | ( |  | ) | const

Search for all occurrences

const QAbstractItemModel* model | ( |  | ) | const

Search for all occurrences

void setCurrentIndex | ( | const QModelIndex & | index,
|  | QItemSelectionModel::SelectionFlags | command
| ) |  | `[slot]`

Search for all occurrences

virtual void select | ( | const QModelIndex & | index,
|  | QItemSelectionModel::SelectionFlags | command
| ) |  | `[virtual, slot]`

Search for all occurrences

virtual void select | ( | const QItemSelection & | selection,
|  | QItemSelectionModel::SelectionFlags | command
| ) |  | `[virtual, slot]`

Search for all occurrences

virtual void clear | ( |  | ) | `[virtual, slot]`

Search for all occurrences

virtual void reset | ( |  | ) | `[virtual, slot]`

Search for all occurrences

void clearSelection | ( |  | ) | `[slot]`

Search for all occurrences

void selectionChanged | ( | const QItemSelection & | selected,
|  | const QItemSelection & | deselected
| ) |  | `[signal]`

Search for all occurrences

void currentChanged | ( | const QModelIndex & | current,
|  | const QModelIndex & | previous
| ) |  | `[signal]`

Search for all occurrences

void currentRowChanged | ( | const QModelIndex & | current,
|  | const QModelIndex & | previous
| ) |  | `[signal]`

Search for all occurrences

void currentColumnChanged | ( | const QModelIndex & | current,
|  | const QModelIndex & | previous
| ) |  | `[signal]`

Search for all occurrences

void emitSelectionChanged | ( | const QItemSelection & | newSelection,
|  | const QItemSelection & | oldSelection
| ) |  | `[protected]`

Search for all occurrences

The documentation for this class was generated from the following file:

- QtGui/qitemselectionmodel.h

QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel
QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel QItemSelectionModel