Public Member Functions | Properties | List of all members
pqTableView Class Reference

a QTableView subclass for ParaView specific customizations. More...

#include <pqTableView.h>

Inheritance diagram for pqTableView:
Inheritance graph
[legend]

Public Member Functions

 pqTableView (QWidget *parent=nullptr)
 
 ~pqTableView () override
 
void setMaximumRowCountBeforeScrolling (int val)
 Set the maximum number of rows beyond which this view should show a vertical scroll bar. More...
 
int maximumRowCountBeforeScrolling () const
 
void setMinimumRowCount (int val)
 Set the number of rows to use as the minimum to determine the size of the widget when there are fewer or no rows. More...
 
int minimumRowCount () const
 
void setPadding (int val)
 Set the number of rows to always pad the widget with. More...
 
int padding () const
 
void setModel (QAbstractItemModel *model) override
 Overridden to ensure the view updates its size as rows are added/removed. More...
 
void setRootIndex (const QModelIndex &index) override
 
QSize sizeHint () const override
 Overridden to report size as per the state of this pqTableView. More...
 
QSize minimumSizeHint () const override
 
bool eventFilter (QObject *watched, QEvent *evt) override
 Overridden to handle events from QScrollBar. More...
 
void wheelEvent (QWheelEvent *event) override
 Overridden to eat wheel events unless this->hasFocus(). More...
 

Properties

int maximumRowCountBeforeScrolling
 Maximum number of rows beyond which this view should show a vertical scroll bar. More...
 
int minimumRowCount
 The number of rows to use as the minimum to determine the size of the widget when there are fewer or no rows. More...
 
int padding
 The number of rows to always pad the widget with. More...
 

Detailed Description

a QTableView subclass for ParaView specific customizations.

pqTableView extends QTableView (in the spirit of pqTableView) to support the following:

Definition at line 23 of file pqTableView.h.

Constructor & Destructor Documentation

◆ pqTableView()

pqTableView::pqTableView ( QWidget *  parent = nullptr)

◆ ~pqTableView()

pqTableView::~pqTableView ( )
override

Member Function Documentation

◆ 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 64 of file pqTableView.h.

◆ maximumRowCountBeforeScrolling()

int pqTableView::maximumRowCountBeforeScrolling ( ) const
inline

Definition at line 65 of file pqTableView.h.

◆ 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 71 of file pqTableView.h.

◆ minimumRowCount()

int pqTableView::minimumRowCount ( ) const
inline

Definition at line 72 of file pqTableView.h.

◆ 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 80 of file pqTableView.h.

◆ padding()

int pqTableView::padding ( ) const
inline

Definition at line 81 of file pqTableView.h.

◆ setModel()

void pqTableView::setModel ( QAbstractItemModel *  model)
override

Overridden to ensure the view updates its size as rows are added/removed.

◆ setRootIndex()

void pqTableView::setRootIndex ( const QModelIndex &  index)
override

◆ sizeHint()

QSize pqTableView::sizeHint ( ) const
override

Overridden to report size as per the state of this pqTableView.

◆ minimumSizeHint()

QSize pqTableView::minimumSizeHint ( ) const
override

◆ eventFilter()

bool pqTableView::eventFilter ( QObject *  watched,
QEvent *  evt 
)
override

Overridden to handle events from QScrollBar.

◆ wheelEvent()

void pqTableView::wheelEvent ( QWheelEvent *  event)
override

Overridden to eat wheel events unless this->hasFocus().

Property Documentation

◆ 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 36 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 36 of file pqTableView.h.

◆ padding

int pqTableView::padding
readwrite

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 42 of file pqTableView.h.


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