pqExpandableTableView extends pqTableView to add support for the following features:
More...
#include <pqExpandableTableView.h>
|
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...
|
|
pqExpandableTableView extends pqTableView to add support for the following features:
- Expand/Grow table: If the user edits past the last item the view will fire a signal (editPastLastRow()) enabling observer to add new row to the table.
- Skip non-editable items: When editing, in a QTableView one can hit tab to edit the next item. However, if the next item is not editable, the editing is stopped. pqExpandableTableView makes it possible to skip non-editable items and continue with the editing.
Definition at line 21 of file pqExpandableTableView.h.
◆ pqExpandableTableView()
pqExpandableTableView::pqExpandableTableView |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~pqExpandableTableView()
pqExpandableTableView::~pqExpandableTableView |
( |
| ) |
|
|
override |
◆ 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.
◆ PasteEnabled
bool pqExpandableTableView::PasteEnabled |
|
protected |
The documentation for this class was generated from the following file: