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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# QItemSelectionRange Class Reference

Search for all occurrences

## Detailed Description

Definition at line 58 of file qitemselectionmodel.h.

`#include <qitemselectionmodel.h>`

List of all members.

## Public Member Functions
| QItemSelectionRange ()
| QItemSelectionRange (const QItemSelectionRange &other)
| QItemSelectionRange (const QModelIndex &topLeft, const QModelIndex &bottomRight)
| QItemSelectionRange (const QModelIndex &index)
int | top () const
int | left () const
int | bottom () const
int | right () const
int | width () const
int | height () const
QModelIndex | topLeft () const
QModelIndex | bottomRight () const
QModelIndex | parent () const
const QAbstractItemModel * | model () const
bool | contains (const QModelIndex &index) const
bool | contains (int row, int column, const QModelIndex &parentIndex) const
bool | intersects (const QItemSelectionRange &other) const
QItemSelectionRange | intersect (const QItemSelectionRange &other) const
QItemSelectionRange | intersected (const QItemSelectionRange &other) const
bool | operator== (const QItemSelectionRange &other) const
bool | operator!= (const QItemSelectionRange &other) const
bool | isValid () const
bool | isEmpty () const
QModelIndexList | indexes () const

## Constructor & Destructor Documentation

QItemSelectionRange | ( |  | ) | `[inline]`

Definition at line 62 of file qitemselectionmodel.h.

    {}

QItemSelectionRange | ( | const QItemSelectionRange & | other | ) | `[inline]`

Definition at line 63 of file qitemselectionmodel.h.

            : tl(other.tl), br(other.br) {}

QItemSelectionRange | ( | const QModelIndex & | topLeft,
|  | const QModelIndex & | bottomRight
| ) |  | `[inline]`

Definition at line 120 of file qitemselectionmodel.h.

    { tl = atopLeft; br = abottomRight; }

QItemSelectionRange | ( | const QModelIndex & | index | ) | `[inline, explicit]`

Definition at line 66 of file qitemselectionmodel.h.

            { tl = index; br = tl; }

## Member Function Documentation

int top | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 69 of file qitemselectionmodel.h.

    { return tl.row(); }

int left | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 70 of file qitemselectionmodel.h.

    { return tl.column(); }

int bottom | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 71 of file qitemselectionmodel.h.

    { return br.row(); }

int right | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 72 of file qitemselectionmodel.h.

    { return br.column(); }

int width | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 73 of file qitemselectionmodel.h.

    { return br.column() - tl.column() + 1; }

int height | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 74 of file qitemselectionmodel.h.

    { return br.row() - tl.row() + 1; }

QModelIndex topLeft | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 76 of file qitemselectionmodel.h.

    { return QModelIndex(tl); }

QModelIndex bottomRight | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 77 of file qitemselectionmodel.h.

    { return QModelIndex(br); }

QModelIndex parent | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 78 of file qitemselectionmodel.h.

    { return tl.parent(); }

const QAbstractItemModel* model | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 79 of file qitemselectionmodel.h.

    { return tl.model(); }

bool contains | ( | const QModelIndex & | index | ) | const `[inline]`

Search for all occurrences

Definition at line 81 of file qitemselectionmodel.h.

        {
            return (parent() == index.parent()
                    && tl.row() <= index.row() && tl.column() <= index.column()
                    && br.row() >= index.row() && br.column() >= index.column());
        }

bool contains | ( | int | row,
|  | int | column,
|  | const QModelIndex & | parentIndex
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 88 of file qitemselectionmodel.h.

        {
            return (parent() == parentIndex
                    && tl.row() <= row && tl.column() <= column
                    && br.row() >= row && br.column() >= column);
        }

bool intersects | ( | const QItemSelectionRange & | other | ) | const

Search for all occurrences

QItemSelectionRange intersect | ( | const QItemSelectionRange & | other | ) | const

Search for all occurrences

QItemSelectionRange intersected | ( | const QItemSelectionRange & | other | ) | const `[inline]`

Search for all occurrences

Definition at line 97 of file qitemselectionmodel.h.

            { return intersect(other); }

bool operator== | ( | const QItemSelectionRange & | other | ) | const `[inline]`

Definition at line 100 of file qitemselectionmodel.h.

            { return (tl == other.tl && br == other.br); }

bool operator!= | ( | const QItemSelectionRange & | other | ) | const `[inline]`

Definition at line 102 of file qitemselectionmodel.h.

            { return !operator==(other); }

bool isValid | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 105 of file qitemselectionmodel.h.

        {
            return (tl.isValid() && br.isValid() && tl.parent() == br.parent()
                    && top() <= bottom() && left() <= right());
        }

bool isEmpty | ( |  | ) | const

Search for all occurrences

QModelIndexList indexes | ( |  | ) | const

Search for all occurrences

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

- QtGui/qitemselectionmodel.h

QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange
QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange QItemSelectionRange