Qt 4.8
Public Functions | Properties | List of all members
QTableWidgetSelectionRange Class Reference

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model. More...

#include <qtablewidget.h>

Public Functions

int bottomRow () const
 Returns the bottom row of the range. More...
 
int columnCount () const
 Returns the number of columns in the range. More...
 
int leftColumn () const
 Returns the left column of the range. More...
 
 QTableWidgetSelectionRange ()
 Constructs an table selection range, i.e. More...
 
 QTableWidgetSelectionRange (int top, int left, int bottom, int right)
 Constructs the table selection range from the given top, left, bottom and right table rows and columns. More...
 
 QTableWidgetSelectionRange (const QTableWidgetSelectionRange &other)
 Constructs a the table selection range by copying the given other table selection range. More...
 
int rightColumn () const
 Returns the right column of the range. More...
 
int rowCount () const
 Returns the number of rows in the range. More...
 
int topRow () const
 Returns the top row of the range. More...
 
 ~QTableWidgetSelectionRange ()
 Destroys the table selection range. More...
 

Properties

int bottom
 
int left
 
int right
 
int top
 

Detailed Description

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model.

The QTableWidgetSelectionRange class stores the top left and bottom right rows and columns of a selection range in a table. The selections in the table may consist of several selection ranges.

Note
If the item within the selection range is marked as not selectable, e.g., itemFlags() & Qt::ItemIsSelectable == 0 then it will not appear in the selection range.
See also
QTableWidget

Definition at line 58 of file qtablewidget.h.

Constructors and Destructors

◆ QTableWidgetSelectionRange() [1/3]

QTableWidgetSelectionRange::QTableWidgetSelectionRange ( )

Constructs an table selection range, i.e.

a range whose rowCount() and columnCount() are 0.

Definition at line 879 of file qtablewidget.cpp.

◆ QTableWidgetSelectionRange() [2/3]

QTableWidgetSelectionRange::QTableWidgetSelectionRange ( int  top,
int  left,
int  bottom,
int  right 
)

Constructs the table selection range from the given top, left, bottom and right table rows and columns.

See also
topRow(), leftColumn(), bottomRow(), rightColumn()

Definition at line 890 of file qtablewidget.cpp.

◆ QTableWidgetSelectionRange() [3/3]

QTableWidgetSelectionRange::QTableWidgetSelectionRange ( const QTableWidgetSelectionRange other)

Constructs a the table selection range by copying the given other table selection range.

Definition at line 899 of file qtablewidget.cpp.

◆ ~QTableWidgetSelectionRange()

QTableWidgetSelectionRange::~QTableWidgetSelectionRange ( )

Destroys the table selection range.

Definition at line 907 of file qtablewidget.cpp.

908 {
909 }

Functions

◆ bottomRow()

int QTableWidgetSelectionRange::bottomRow ( ) const
inline

Returns the bottom row of the range.

See also
topRow(), rightColumn(), rowCount()

Definition at line 67 of file qtablewidget.h.

Referenced by QTableWidget::setRangeSelected().

67 { return bottom; }

◆ columnCount()

int QTableWidgetSelectionRange::columnCount ( ) const
inline

Returns the number of columns in the range.

Since
4.1

This is equivalent to rightColumn() - leftColumn() + 1.

See also
rowCount(), leftColumn(), rightColumn()

Definition at line 71 of file qtablewidget.h.

◆ leftColumn()

int QTableWidgetSelectionRange::leftColumn ( ) const
inline

Returns the left column of the range.

See also
rightColumn(), topRow(), columnCount()

Definition at line 68 of file qtablewidget.h.

Referenced by QTableWidget::setRangeSelected().

68 { return left; }

◆ rightColumn()

int QTableWidgetSelectionRange::rightColumn ( ) const
inline

Returns the right column of the range.

See also
leftColumn(), bottomRow(), columnCount()

Definition at line 69 of file qtablewidget.h.

Referenced by QTableWidget::setRangeSelected().

69 { return right; }

◆ rowCount()

int QTableWidgetSelectionRange::rowCount ( ) const
inline

Returns the number of rows in the range.

Since
4.1

This is equivalent to bottomRow() - topRow() + 1.

See also
columnCount(), topRow(), bottomRow()

Definition at line 70 of file qtablewidget.h.

◆ topRow()

int QTableWidgetSelectionRange::topRow ( ) const
inline

Returns the top row of the range.

See also
bottomRow(), leftColumn(), rowCount()

Definition at line 66 of file qtablewidget.h.

Referenced by QTableWidget::setRangeSelected().

66 { return top; }

Properties

◆ bottom

int QTableWidgetSelectionRange::bottom
private

Definition at line 74 of file qtablewidget.h.

◆ left

int QTableWidgetSelectionRange::left
private

Definition at line 74 of file qtablewidget.h.

◆ right

int QTableWidgetSelectionRange::right
private

Definition at line 74 of file qtablewidget.h.

◆ top

int QTableWidgetSelectionRange::top
private

Definition at line 74 of file qtablewidget.h.


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