|
| qtOperationAction (const std::shared_ptr< smtk::operation::Manager > &operationManager, const std::shared_ptr< smtk::view::Manager > &viewManager, smtk::operation::Operation::Index typeIndex, qtOperationTypeModel *parent=nullptr) |
|
std::string | name () const |
| The label of the operation (or the operation's type-name if no label is provided).
|
|
smtk::operation::Operation::Index | operationIndex () const |
| The type-index of the operation.
|
|
QPointer< qtOperationTypeModel > | operationModel () const |
| The model to which the type-index of this action applies.
|
|
Qt::ToolButtonStyle | buttonStyle () const |
| Set/get the style of button this action creates (whether to include text, icon, or both).
|
|
void | setButtonStyle (Qt::ToolButtonStyle style) |
|
void | forceStyle (Qt::ToolButtonStyle buttonStyle, ActionFunctor functor) |
| Force the style of widgets created by this icon to be distinct. More...
|
|
|
QPointer< qtOperationTypeModel > | m_model |
| The operation-type model for which this action was created.
|
|
smtk::operation::Operation::Index | m_typeIndex |
| The operation type-index (essentially the row in m_model).
|
|
std::string | m_operationName |
| A label for the operation.
|
|
smtk::attribute::utility::EditableParameters | m_editableParameters |
| Whether the operation has editable parameters. More...
|
|
QTimer | m_timer |
| A timer used to detect long-presses/double-clicks of buttons.
|
|
Qt::ToolButtonStyle | m_style { Qt::ToolButtonTextBesideIcon } |
| Setting that dictates how createWidget() decorates the button it creates.
|
|
bool | m_toolButton { false } |
| Setting indicating whether to create a push-button or a tool-button.
|
|
A QAction for users to request an operation.
This class adapts an operation manager and operation type-index into a QWidgetAction for menus, toolbars, and tool-buttons. Depending on the operation's metadata, users may run the operation with its default parameters immediately and/or edit parameters before running the operation.
void qtOperationAction::forceStyle |
( |
Qt::ToolButtonStyle |
buttonStyle, |
|
|
ActionFunctor |
functor |
|
) |
| |
Force the style of widgets created by this icon to be distinct.
Inside the functor you provide, the button style (i.e., whether to include text, an icon, or both) will be the specified style. This is used to force toolbar buttons to be distinct from toolbox buttons.
The functor is passed a pointer to "this" so that you need not capture the action.