Obsolete Members for Action

The following members of QML type Action are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Properties

Property Documentation

checkable : bool

Whether the action can be checked. Defaults to false.

This property was introduced in Lomiri.Components 1.3.

See also Action::checked, Action::toggled, and ExclusiveGroup.


checked : bool

If the action is checkable, this property reflects its checked state. Defaults to false. Its value is also false while checkable is false.

This property was introduced in Lomiri.Components 1.3.

See also Action::checkable, Action::toggled, and ExclusiveGroup.


description : string

User visible secondary description for the action. Description is more verbose than the text and should describe the Action with couple of words.


enabled : bool

If set to false the action can not be triggered. Components visualizing the action migth either hide the action or make it insensitive. However visibility can be controlled separately using the visible property.


exclusiveGroup : ExclusiveGroup

The ExclusiveGroup associated with this action. An exclusive group allows the checked property to belinked to other actions, as in radio controls.

Column {
    ExclusiveGroup {
        Action {
            id: action1
            checkable: true
            checked: true
        }
        Action {
            id: action2
            checkable: true
        }
        Action {
            id: action3
            checkable: true
        }
    }

    Button {
        action: action1
        color: action.checked ? LomiriColor.green : LomiriColor.red
    }
    Button {
        action: action2
        color: action.checked ? LomiriColor.green : LomiriColor.red
    }
    Button {
        action: action3
        color: action.checked ? LomiriColor.green : LomiriColor.grey
    }
}

This property was introduced in Lomiri.Components 1.3.


iconName : string

The icon associated with the action. If both iconName and iconSource are defined, iconName will be ignored by the components.

Note: The complete list of icons available in Lomiri is not published yet. For now please refer to the folder where the icon theme is installed:


iconSource : url

This is a URL to any image file. In order to use an icon from the Lomiri theme, use the iconName property instead.


keywords : string

Additional user visible keywords for the action. The format of the keywords string is "Keyword 1;Keyword 2;Keyword 3" to allow translators to define different number of keywords per language. The keywords are separated by ; and they may contain spaces.

Action {
    text: i18n.tr("Crop")
    description: i18n.tr("Crop the image")
    keywords: i18n.tr("Trim;Cut")
}

name : string

The name of the action. By default an action gets it's name generated automatically if not overridden with later. If name is set to "" then the action restores it's autogenerated name. The name is not user visible.


parameterType : enum

Type of the parameter passed to trigger and triggered. Type is an enumeration:

  • Action.None: No paramater. (default)
  • Action.String: String parameter.
  • Action.Integer: Integer parameter.
  • Action.Bool: Boolean parameter.
  • Action.Real: Single precision floating point parameter.
  • Action.Object: The parameter is an object.
Action {
    id: action
    parameterType: Action.String
    onTriggered: {
        // value arguments now contain strings
        console.log(value);
    }
    Component.onCompleted: action.trigger("Hello World")
}

shortcut : var

The keyboard shortcut that can be used to trigger the action. StandardKey values such as StandardKey.Copy as well as strings in the form "Ctrl+C" are accepted values.

This property was introduced in Qt 1.3.


text : string

The user visible primary label of the action.

Mnemonics are shortcuts prefixed in the text with &. If the text has multiple occurences of the & character, the first one will be considered for the shortcut. However && can be used for a single & in the text, not as a mnemonic. The & character cannot be used as shortcut.


visible : bool

Specifies whether the action is visible to the user. Defaults to true.