GroupsAction
Qualified name: mv::gui::GroupsAction
-
class GroupsAction : public mv::gui::WidgetAction
Groups action class.
Contains a list of group actions and displays them in an accordion widget
- Author
Thomas Kroes
Subclassed by mv::gui::ApplicationConfigurationAction
Public Types
Public Functions
-
inline virtual QWidget *getWidget(QWidget *parent, const std::int32_t &widgetFlags) override
Get widget representation of the groups action.
- Parameters:
parent – Pointer to parent widget
widgetFlags – Widget flags for the configuration of the widget (type)
-
Q_INVOKABLE GroupsAction(QObject *parent, const QString &title)
Constructor.
- Parameters:
parent – Pointer to parent object
title – Title of the groups action
-
void addGroupAction(GroupAction *groupAction, bool visible = true)
Appends a group action.
- Parameters:
groupAction – Group action to add
visible – Whether the group action is visible or not
-
void removeGroupAction(GroupAction *groupAction)
Removes a group action.
- Parameters:
groupAction – Group action to remove
-
void setGroupActions(const GroupActions &groupActions)
Set group actions (overwrites existing group actions)
- Parameters:
groupActions – Vector of pointers to group actions
-
void resetGroupActions()
Reset group actions to default.
-
const GroupActions &getGroupActions() const
Get group actions.
-
bool canExpandAll() const
Get whether one (or more) groups can be expanded.
- Returns:
Whether one (or more) groups can be expanded
-
void expandAll()
Expand all group actions.
-
bool canCollapseAll() const
Get whether one (or more) groups can be expanded.
- Returns:
Whether one (or more) groups can be expanded
-
void collapseAll()
Collapse all group actions.
-
QVector<bool> getExpansions(bool visibleOnly = true) const
Get groups expansion states.
- Parameters:
visibleOnly – Visible group actions only
- Returns:
Vector of booleans, indicating whether a group is expanded or collapsed
-
std::int32_t getNumberOfExpandedGroupActions(bool visibleOnly = true) const
Get number of expanded group actions.
- Parameters:
visibleOnly – Visible group actions only
- Returns:
Number of expanded group actions
-
std::int32_t getNumberOfVisibleGroupActions() const
Get number of visible group actions.
- Returns:
Number of visible group actions
-
void setGroupActionVisibility(GroupAction *groupAction, bool visible)
Hide group action.
- Parameters:
groupAction – Pointer to group action
visible – Whether the group action is visible
-
void showGroupAction(GroupAction *groupAction)
Show group action.
- Parameters:
groupAction – Pointer to group action
-
void showAllGroupActions()
Hide all group actions.
-
void hideGroupAction(GroupAction *groupAction)
Hide group action.
- Parameters:
groupAction – Pointer to group action
-
void hideAllGroupActions()
Hide all group actions.
-
bool isGroupActionVisible(GroupAction *groupAction) const
Get whether the group action is visible.
- Returns:
Whether the group action is visible
-
bool isGroupActionHidden(GroupAction *groupAction) const
Get whether the group action is hidden.
- Returns:
Whether the group action is hidden
-
void groupActionAdded(GroupAction *groupAction)
Signals that a group action was added.
- Parameters:
groupAction – Group action that was added
-
void groupActionRemoved(GroupAction *groupAction)
Signals that a group action was removed.
- Parameters:
groupAction – Group action that was removed
-
void groupActionExpanded(GroupAction *groupAction)
Signals that a group action got expanded.
- Parameters:
groupAction – Group action that got expanded
-
void groupActionCollapsed(GroupAction *groupAction)
Signals that a group action got collapsed.
- Parameters:
groupAction – Group action that got collapsed
-
void groupActionShown(GroupAction *groupAction)
Signals that a group action got shown.
- Parameters:
groupAction – Group action that got shown
-
void groupActionHidden(GroupAction *groupAction)
Signals that a group action got hidden.
- Parameters:
groupAction – Group action that got hidden
Protected Attributes
-
QMap<GroupAction*, bool> _visibility
Pointers to group actions.
-
class TreeWidget : public QTreeWidget
Tree widget class Implemented solely to be able to update geometries by hand.
Public Functions
-
inline void updateGeometries()
Update item geometries.
-
inline void updateGeometries()
-
class Widget : public mv::gui::WidgetActionWidget
Group widget class for widget action groups.
Public Functions
-
inline GroupAction &getFilteredActionsAction()
Get action that contains filtered actions.
- Returns:
Reference to filtered actions action
Protected Functions
-
Widget(QWidget *parent, GroupsAction *groupsAction, const std::int32_t &widgetFlags)
Constructor.
- Parameters:
parent – Pointer to parent widget
groupsAction – Pointer to groups action
widgetFlags – Widget flags for the configuration of the widget
-
void createToolbar(const std::int32_t &widgetFlags)
Create toolbar for interaction with the groups.
- Parameters:
widgetFlags – Widget flags for the configuration of the widget
-
void createTreeWidget(const std::int32_t &widgetFlags)
Create tree widget for display of the groups.
- Parameters:
widgetFlags – Widget flags for the configuration of the widget
-
void updateToolbar()
Updates the state of the toolbar.
-
void updateFiltering()
Updates the property filtering.
Protected Attributes
-
QVBoxLayout _layout
Pointer to groups action.
-
GroupAction _filteredActionsAction
Main layout.
-
HorizontalGroupAction _toolbarAction
Group action for filtered actions.
-
StringAction _filterAction
Toolbar action.
-
TriggerAction _expandAllAction
Filter action.
-
TriggerAction _collapseAllAction
Expand all datasets action.
-
TreeWidget _treeWidget
Collapse all datasets action.
-
QMap<GroupAction*, GroupSectionTreeItem*> _groupSectionTreeItems
Tree widget for display of the groups.
Friends
- friend class GroupsAction
-
inline GroupAction &getFilteredActionsAction()