pqTableView extends QTableView (in the spirit of pqTableView) to resize the view vertically to fit contents.
More...
#include <pqTableView.h>
pqTableView extends QTableView (in the spirit of pqTableView) to resize the view vertically to fit contents.
It servers to purposes:
- Avoids putting a scroll bar until the table reaches a certain length.
- Avoids taking too much space when table has fewer rows.
Definition at line 44 of file pqTableView.h.
◆ pqTableView()
pqTableView::pqTableView |
( |
QWidget * |
parent = 0 | ) |
|
◆ ~pqTableView()
virtual pqTableView::~pqTableView |
( |
| ) |
|
|
virtual |
◆ setMaximumRowCountBeforeScrolling()
void pqTableView::setMaximumRowCountBeforeScrolling |
( |
int |
val | ) |
|
|
inline |
Set the maximum number of rows beyond which this view should show a vertical scroll bar.
The pqTableView will keep on resizing until maximumRowCountBeforeScrolling row to avoid vertical scrolling. Set this to 0, and this will behave exactly as QTableView. Default is 0.
Definition at line 85 of file pqTableView.h.
◆ maximumRowCountBeforeScrolling()
int pqTableView::maximumRowCountBeforeScrolling |
( |
| ) |
const |
|
inline |
◆ setMinimumRowCount()
void pqTableView::setMinimumRowCount |
( |
int |
val | ) |
|
|
inline |
Set the number of rows to use as the minimum to determine the size of the widget when there are fewer or no rows.
Definition at line 92 of file pqTableView.h.
◆ minimumRowCount()
int pqTableView::minimumRowCount |
( |
| ) |
const |
|
inline |
◆ setPadding()
void pqTableView::setPadding |
( |
int |
val | ) |
|
|
inline |
Set the number of rows to always pad the widget with.
This is used when the actual number of rows is less than or equal to maximumRowCountBeforeScrolling for a non-zero maximumRowCountBeforeScrolling.
Definition at line 101 of file pqTableView.h.
◆ padding()
int pqTableView::padding |
( |
| ) |
const |
|
inline |
◆ setModel()
virtual void pqTableView::setModel |
( |
QAbstractItemModel * |
model | ) |
|
|
virtual |
Overridden to ensure the view updates its size as rows are added/removed.
◆ setRootIndex()
virtual void pqTableView::setRootIndex |
( |
const QModelIndex & |
index | ) |
|
|
virtual |
◆ sizeHint()
virtual QSize pqTableView::sizeHint |
( |
| ) |
const |
|
virtual |
Overridden to report size as per the state of this pqTableView.
◆ minimumSizeHint()
virtual QSize pqTableView::minimumSizeHint |
( |
| ) |
const |
|
virtual |
◆ eventFilter()
virtual bool pqTableView::eventFilter |
( |
QObject * |
watched, |
|
|
QEvent * |
evt |
|
) |
| |
|
virtual |
Overridden to handle events from QScrollBar.
◆ maximumRowCountBeforeScrolling
int pqTableView::maximumRowCountBeforeScrolling |
|
readwrite |
Maximum number of rows beyond which this view should show a vertical scroll bar.
The pqTableView will keep on resizing until maximumRowCountBeforeScrolling row to avoid vertical scrolling. Set this to 0, and this will behave exactly as QTableView. Default is 0.
Definition at line 57 of file pqTableView.h.
◆ minimumRowCount
int pqTableView::minimumRowCount |
|
readwrite |
The number of rows to use as the minimum to determine the size of the widget when there are fewer or no rows.
Definition at line 57 of file pqTableView.h.
◆ padding
The number of rows to always pad the widget with.
This is used, so long as the total number of rows doesn't exceed the maximumRowCountBeforeScrolling. Note this gets added on top of the padding added, if any, due to minimumRowCount.
Definition at line 63 of file pqTableView.h.
The documentation for this class was generated from the following file: