Loading...
Searching...
No Matches
lomiri::action::PreviewAction Class Reference

previewable action More...

Inheritance diagram for lomiri::action::PreviewAction:

## Signals

void | cancelled ()
void | commitLabelChanged (const QString &value)
void | parametersChanged ()
void | resetted ()
void | started ()
Signals inherited from lomiri::action::Action
void | descriptionChanged (const QString &value)
void | enabledChanged (bool value)
void | iconNameChanged (const QString &value)
void | keywordsChanged (const QString &value)
void | nameChanged (const QString &value)
void | parameterTypeChanged (lomiri::action::Action::Type value)
void | textChanged (const QString &value)
void | triggered (QVariant value)

## Public Member Functions

| PreviewAction (QObject *parent=0)
Q_INVOKABLE void | addParameter (lomiri::action::PreviewParameter *parameter)
QString | commitLabel () const
QList< PreviewParameter * > | parameters ()
Q_INVOKABLE void | removeParameter (lomiri::action::PreviewParameter *parameter)
void | setCommitLabel (const QString &value)
Public Member Functions inherited from lomiri::action::Action
| Action (QObject *parent=0)
QString | description () const
bool | enabled () const
QString | iconName () const
QString | keywords () const
QString | name () const
Type | parameterType () const
void | setDescription (const QString &value)
void | setEnabled (bool value)
void | setIconName (const QString &value)
void | setKeywords (const QString &value)
void | setName (const QString &value)
void | setParameterType (Type value)
void | setText (const QString &value)
QString | text () const

## Properties

QString | commitLabel
Properties inherited from lomiri::action::Action
QString | description
bool | enabled
QString | iconName
QString | keywords
QString | name
lomiri::action::Action::Type | parameterType
QString | text

## Additional Inherited Members

Public Types inherited from lomiri::action::Action
enum | Type { None , String , Integer , Bool , Real }
| Available parameter types. More...
Public Slots inherited from lomiri::action::Action
void | trigger (QVariant value=QVariant())

## Detailed Description

previewable action

The preview action is an action that allows the application to generate a preview of the action before the action is applied. The preview is controlled by the HUD UI.

PreviewActions contain one or more parameters which form the preview parameters of the action.

For more details see Preview Actions

Note
  Even though PreviewAction is subclass of Action not all of the properties of Action base class are supported.
  Action::parameterType must be Action::None

## Constructor & Destructor Documentation

## PreviewAction()

PreviewAction::PreviewAction | ( | QObject * | parent = 0 | ) |

explicit

Parameters

  parent | parent QObject or 0

Constructs a new PreviewAction. See the property documentation for default values.

## Member Function Documentation

## addParameter()

void PreviewAction::addParameter | ( | lomiri::action::PreviewParameter * | parameter | ) |

Parameters

  parameter | parameter to be added

Adds a parameter.

Calling this function multiple times with the same parameter does not have any side effects; the parameter gets added only once.

PreviewAction monitors if the parameter is deleted and does the appropriate cleanup when necessary, so it is not mandatory to call removeParameter() before the action is destroyed.

Note
  parameter must not be 0.

## cancelled

void lomiri::action::PreviewAction::cancelled | ( |  | ) |

signal

Signal to inform that the user has cancelled the action from the HUD UI. No modifications should be done on the application and the program should return to the state it was before the action was first started.

## parameters()

QList< PreviewParameter * > PreviewAction::parameters | ( |  | ) |

Returns
  The list of parameters added to the action.

## parametersChanged

void lomiri::action::PreviewAction::parametersChanged | ( |  | ) |

signal

Notifies that a parameter was either added or removed.

## removeParameter()

void PreviewAction::removeParameter | ( | lomiri::action::PreviewParameter * | parameter | ) |

Parameters

  parameter | parameter to be removed

Remove a parameter.

Calling this function multiple times with the same parameter does not have any side effects; the parameter gets removed only if it was previously added with addParameter().

Note
  parameter must not be 0

## resetted

void lomiri::action::PreviewAction::resetted | ( |  | ) |

signal

Signal to inform that the user has clicked the "reset" button from the HUD UI. The action is still active on the HUD UI but the application should reset the values of the parameters to the same values they where when the action was started.

## started

void lomiri::action::PreviewAction::started | ( |  | ) |

signal

Signal to inform that a action is selected in the HUD UI. The application should set the values of the parameters to their initial state.

## Property Documentation

## commitLabel

QString lomiri::action::PreviewAction::commitLabel

read write

User visible label shown in the HUD parameter view.

This is the label shown in the HUD UI on the button that applies or commits the action after the user is happy with the parameters.

If set to empty string the HUD UI will use a default commit label.

Initial Value:\n ""

Accessors:\n commitLabel(), setCommitLabel()

Notify:\n commitLabelChanged()

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

- lomiri-preview-action.h
- lomiri-preview-action.cpp