Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pqExpandableTableView Class Reference

pqExpandableTableView extends pqTableView to add support for the following features: More...

#include <pqExpandableTableView.h>

Inheritance diagram for pqExpandableTableView:
Inheritance graph
[legend]
Collaboration diagram for pqExpandableTableView:
Collaboration graph
[legend]

Signals

void editPastLastRow ()
 signal fired when the user edits past the last row. More...
 

Public Member Functions

 pqExpandableTableView (QWidget *parent=nullptr)
 
 ~pqExpandableTableView () override
 
void setPasteEnabled (bool enable)
 Enable pasting in table from clipboard. More...
 
- Public Member Functions inherited from pqTableView
 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...
 

Protected Member Functions

QModelIndex moveCursor (CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
 Working together with logic in closeEditor(). More...
 
void closeEditor (QWidget *editor, QAbstractItemDelegate::EndEditHint hint) override
 Overridden to set MoveToNextEditableItem so that moveCursor() can skip non-editable items. More...
 
void keyPressEvent (QKeyEvent *event) override
 Overridden to capture Ctrl-V for pasting table data into the table. More...
 

Protected Attributes

bool PasteEnabled
 

Additional Inherited Members

- Properties inherited from pqTableView
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

pqExpandableTableView extends pqTableView to add support for the following features:

Definition at line 21 of file pqExpandableTableView.h.

Constructor & Destructor Documentation

◆ pqExpandableTableView()

pqExpandableTableView::pqExpandableTableView ( QWidget *  parent = nullptr)

◆ ~pqExpandableTableView()

pqExpandableTableView::~pqExpandableTableView ( )
override

Member Function Documentation

◆ setPasteEnabled()

void pqExpandableTableView::setPasteEnabled ( bool  enable)

Enable pasting in table from clipboard.

Default is true.

◆ editPastLastRow

void pqExpandableTableView::editPastLastRow ( )
signal

signal fired when the user edits past the last row.

Handlers can add a new row to the table, if needed, to allow used to edit expandable tables with ease.

◆ moveCursor()

QModelIndex pqExpandableTableView::moveCursor ( CursorAction  cursorAction,
Qt::KeyboardModifiers  modifiers 
)
overrideprotected

Working together with logic in closeEditor().

This methods makes it possible to skip past non-editable items.

◆ closeEditor()

void pqExpandableTableView::closeEditor ( QWidget *  editor,
QAbstractItemDelegate::EndEditHint  hint 
)
overrideprotected

Overridden to set MoveToNextEditableItem so that moveCursor() can skip non-editable items.

Also if moved past the last rows/last column, this will fire the editPastLastRow() signal.

◆ keyPressEvent()

void pqExpandableTableView::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Overridden to capture Ctrl-V for pasting table data into the table.

Member Data Documentation

◆ PasteEnabled

bool pqExpandableTableView::PasteEnabled
protected

Definition at line 63 of file pqExpandableTableView.h.


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