TreeAction

Qualified name: mv::gui::TreeAction

class TreeAction : public mv::gui::WidgetAction

Tree action class.

Action class for interacting with a tree model

Author

Thomas Kroes

Public Types

enum WidgetFlag

Describes the widget flags.

Values:

enumerator FilterToolbar

Public Functions

Q_INVOKABLE TreeAction(QObject *parent, const QString &title)

Construct with pointer to parent object and title.

Parameters:
  • parent – Pointer to parent object

  • title – Title of the action

void initialize(QAbstractItemModel *model, QSortFilterProxyModel *filterModel, const QString &itemTypeName)

Initializes the tree action with a pointer to a model, possibly a filterModel and itemTypeName.

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 QString getItemTypeName()

Get item type name.

Returns:

Item type name string

Protected Functions

inline virtual QWidget *getWidget(QWidget *parent, const std::int32_t &widgetFlags) override

Get widget representation of the tree action.

Parameters:
  • parent – Pointer to parent widget

  • widgetFlagsWidget flags for the configuration of the widget (type)

class Widget : public mv::gui::WidgetActionWidget

Widget class for tree action.

Protected Functions

Widget(QWidget *parent, TreeAction *treeAction, const std::int32_t &widgetFlags)

Construct with pointer to parent widget, treeAction and widgetFlags.

Parameters:
  • parent – Pointer to parent widget

  • treeAction – Pointer to tree action

  • widgetFlagsWidget flags

Friends

friend class TreeAction