TableAction
Qualified name: mv::gui::TableAction
-
class TableAction : public mv::gui::VerticalGroupAction
Table action class.
Action class for interacting with a model in a table view
- Author
Thomas Kroes
Public Functions
-
Q_INVOKABLE TableAction(QObject *parent, const QString &title)
Construct with pointer to
parentobject andtitle.- Parameters:
parent – Pointer to parent object
title – Title of the action
-
void initialize(QAbstractItemModel *model, QSortFilterProxyModel *filterModel, const QString &itemTypeName)
Initializes the table action with a pointer to a
model, possibly afilterModelanditemTypeName.- Parameters:
model – Pointer to model
filterModel – Pointer to filter model (maybe nullptr)
itemTypeName – Item type name string
-
inline QAbstractItemModel *getModel()
Get model.
- Returns:
Pointer to model (maybe nullptr)
-
inline QSortFilterProxyModel *getFilterModel()
Get filter model.
- Returns:
Pointer to filter model (maybe nullptr)
-
inline QItemSelectionModel &getSelectionModel()
Get selection model.
- Returns:
Reference to selection model
-
inline QString getItemTypeName()
Get item type name.
- Returns:
Item type name string
Protected Functions
-
class Widget : public mv::gui::WidgetActionWidget
Widget class for table action.
Protected Functions
-
Widget(QWidget *parent, TableAction *tableAction, const std::int32_t &widgetFlags)
Construct with pointer to
parentwidget,treeActionandwidgetFlags.- Parameters:
parent – Pointer to parent widget
tableAction – Pointer to owning table action
widgetFlags – Widget flags
Protected Attributes
-
QTableView _tableView
Pointer to owning table action.
-
InfoOverlayWidget _infoOverlayWidget
Table view for showing the data.
-
QString _noItemsDescription
Overlay widget that show information when there are no items in the model.
-
HorizontalHeaderAction _horizontalHeaderAction
Overlay widget description when no items are loaded.
Friends
- friend class TableAction
-
Widget(QWidget *parent, TableAction *tableAction, const std::int32_t &widgetFlags)