HorizontalToolbarAction

Qualified name: mv::gui::HorizontalToolbarAction

class HorizontalToolbarAction : public mv::gui::ToolbarAction

Horizontal toolbar action class.

Widget action for displaying actions in a horizontal toolbar

Author

Thomas Kroes

Subclassed by mv::gui::NavigationAction

Public Functions

Q_INVOKABLE HorizontalToolbarAction(QObject *parent, const QString &title, const Qt::AlignmentFlag &alignment = Qt::AlignmentFlag::AlignLeft)

Construct with parent object and title.

Parameters:
  • parent – Pointer to parent object

  • title – Title of the action

  • alignment – Item alignment (Qt::AlignmentFlag::AlignLeft, Qt::AlignmentFlag::AlignCenter or Qt::AlignmentFlag::AlignRight)

Protected Functions

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

Get widget representation of the horizontal toolbar 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 the horizontal toolbar.

Protected Functions

Widget(QWidget *parent, HorizontalToolbarAction *horizontalToolbarAction, const std::int32_t &widgetFlags)

Constructor.

Parameters:
  • parent – Pointer to parent widget

  • horizontalToolbarAction – Pointer to horizontal toolbar action that creates the widget

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

bool eventFilter(QObject *target, QEvent *event) override

Respond to target object events.

Parameters:
  • target – Object of which an event occurred

  • event – The event that took place

Protected Attributes

QHBoxLayout *_layout

Pointer to horizontal toolbar action that creates the widget.

QHBoxLayout *_toolbarLayout

Main layout.

QWidget _toolbarWidget

Toolbar layout.

QTimer _timer

Toolbar widget.

Friends

friend class HorizontalToolbarAction