ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::gui::ToolbarActionItem Class Referencefinal

#include <ToolbarActionItem.h>

Inheritance diagram for hdps::gui::ToolbarActionItem:

Public Types

enum class  State { Collapsed , Expanded }
 

Signals

void stateChanged (const State &state)
 
void changingStateChanged (bool changingState)
 
void autoExpandPriorityChanged (std::int32_t autoExpandPriority)
 
void widgetSizeChanged (const QSize &size, const State &state)
 

Protected Member Functions

 ToolbarActionItem (QObject *parent, const WidgetAction *action, std::int32_t widgetFlags, const State &state=State::Collapsed, std::int32_t autoExpandPriority=-1)
 
const WidgetActiongetAction ()
 
std::int32_t getWidgetFlags ()
 
State getState () const
 
void setState (const State &state)
 
std::int32_t getAutoExpandPriority () const
 
void setAutoExpandPriority (std::int32_t autoExpandPriority)
 
QWidget * createWidget (QWidget *parent)
 
QSize getWidgetSize (const State &state) const
 
void setWidgetSize (const QSize &size, const State &state)
 
bool operator< (const ToolbarActionItem &other) const
 
bool isChangingState () const
 
void setChangingState (bool changingState)
 

Protected Attributes

const WidgetAction_action
 
std::int32_t _widgetFlags
 
State _state
 
std::int32_t _autoExpandPriority
 
QSize _widgetSizes [2]
 
bool _changingState
 

Friends

class ToolbarAction
 
class HorizontalToolbarAction
 
class VerticalToolbarAction
 
class ToolbarActionItemWidget
 

Detailed Description

Toolbar action item class

Author
Thomas Kroes

Member Enumeration Documentation

◆ State

State of the widget

Enumerator
Collapsed 
Expanded 

Constructor & Destructor Documentation

◆ ToolbarActionItem()

hdps::gui::ToolbarActionItem::ToolbarActionItem ( QObject *  parent,
const WidgetAction action,
std::int32_t  widgetFlags,
const State state = State::Collapsed,
std::int32_t  autoExpandPriority = -1 
)
protected

Constructor

Parameters
parentPointer to parent object
actionPointer to action that creates the widget
widgetFlagsFlags to use in widget creation
stateState of the widget
autoExpandPriorityPriority with which action should be auto-expanded

Member Function Documentation

◆ autoExpandPriorityChanged

void hdps::gui::ToolbarActionItem::autoExpandPriorityChanged ( std::int32_t  autoExpandPriority)
signal

Signals that the auto expand priority changed to autoExpandPriority

Parameters
autoExpandPriorityAuto expand priority

◆ changingStateChanged

void hdps::gui::ToolbarActionItem::changingStateChanged ( bool  changingState)
signal

Signals that the changing state changed to changingState

Parameters
changingStateBoolean determining whether the item is currently changing state

◆ createWidget()

QWidget * hdps::gui::ToolbarActionItem::createWidget ( QWidget *  parent)
protected

Create widget for item with parent

Parameters
parentPointer to parent
Returns
Pointer to created widget

◆ getAction()

const WidgetAction * hdps::gui::ToolbarActionItem::getAction ( )
protected

Get action

Returns
Pointer to action

◆ getAutoExpandPriority()

std::int32_t hdps::gui::ToolbarActionItem::getAutoExpandPriority ( ) const
protected

Get priority with which action should be auto-expanded

Returns
Priority with which action should be auto-expanded

◆ getState()

ToolbarActionItem::State hdps::gui::ToolbarActionItem::getState ( ) const
protected

Get state of the action (expanded or collapsed)

Returns
State of the action

◆ getWidgetFlags()

std::int32_t hdps::gui::ToolbarActionItem::getWidgetFlags ( )
protected

Get widget flags

Returns
Flags to use in widget creation

◆ getWidgetSize()

QSize hdps::gui::ToolbarActionItem::getWidgetSize ( const State state) const
protected

Get widget size for state

Parameters
stateState to get the widget size for
Returns
Widget size

◆ isChangingState()

bool hdps::gui::ToolbarActionItem::isChangingState ( ) const
protected

Get whether the item is currently changing state

Returns
Boolean determining whether the item is currently changing state

◆ operator<()

bool hdps::gui::ToolbarActionItem::operator< ( const ToolbarActionItem other) const
inlineprotected

Compare with other toolbar action item on the basis of their auto expand priority

Parameters
otherOther toolbar action item to compare with
Returns
Boolean determining whether the other toolbar action item is smaller

◆ setAutoExpandPriority()

void hdps::gui::ToolbarActionItem::setAutoExpandPriority ( std::int32_t  autoExpandPriority)
protected

Set priority with which action should be auto-expanded

Parameters
autoExpandPriorityPriority with which action should be auto-expanded

◆ setChangingState()

void hdps::gui::ToolbarActionItem::setChangingState ( bool  changingState)
protected

Set whether the item is currently changing state

Parameters
changingStateBoolean determining whether the item is currently changing state

◆ setState()

void hdps::gui::ToolbarActionItem::setState ( const State state)
protected

Set state of the action to state

Parameters
stateState of the action (expanded or collapsed)

◆ setWidgetSize()

void hdps::gui::ToolbarActionItem::setWidgetSize ( const QSize &  size,
const State state 
)
protected

Set widget size for state

Parameters
stateState to set the widget size for
sizeWidget size

◆ stateChanged

void hdps::gui::ToolbarActionItem::stateChanged ( const State state)
signal

Signals that the state changed to state

Parameters
stateItem state

◆ widgetSizeChanged

void hdps::gui::ToolbarActionItem::widgetSizeChanged ( const QSize &  size,
const State state 
)
signal

Signals that the size of widget with state changed to size

Parameters
sizeNew size of the widget
stateState of the widget

Friends And Related Symbol Documentation

◆ HorizontalToolbarAction

friend class HorizontalToolbarAction
friend

◆ ToolbarAction

friend class ToolbarAction
friend

Boolean determining whether the item is currently changing state

◆ ToolbarActionItemWidget

friend class ToolbarActionItemWidget
friend

◆ VerticalToolbarAction

friend class VerticalToolbarAction
friend

Member Data Documentation

◆ _action

const WidgetAction* hdps::gui::ToolbarActionItem::_action
protected

◆ _autoExpandPriority

std::int32_t hdps::gui::ToolbarActionItem::_autoExpandPriority
protected

Whether the item is expanded or collapsed

◆ _changingState

bool hdps::gui::ToolbarActionItem::_changingState
protected

Widget sizes in collapsed and expanded state respectively

◆ _state

State hdps::gui::ToolbarActionItem::_state
protected

Flags to use in widget creation

◆ _widgetFlags

std::int32_t hdps::gui::ToolbarActionItem::_widgetFlags
protected

Pointer to horizontal toolbar action that creates the widget

◆ _widgetSizes

QSize hdps::gui::ToolbarActionItem::_widgetSizes[2]
protected

Priority with which action should be auto-expanded (higher priority w.r.t. other actions means it will auto-expanded sooner)


The documentation for this class was generated from the following files: