API Documentation

Documentation for developing SailfishOS applications

CoverAction QML Type

An action for a Cover More...

Import Statement: import Sailfish.Silica 1.0

Properties

Signals

Detailed Description

CoverAction specifies the action to take when a Cover gesture is activated.

The action icon is specified with iconSource and is automatically displayed on top of the cover. When the icon is tapped, the onTriggered signal handler is called.

A CoverAction is added to a cover by declaring it within a cover's CoverActionList. For example:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 ApplicationWindow {
     cover: Component {
         Cover {
             CoverActionList {
                 CoverAction {
                     iconSource: "checkForMail.png"
                     onTriggered: checkForNewMail()
                 }
             }
         }
     }
 }

If the action should also bring the app back into the foreground as the main active application, call activate() on your app's ApplicationWindow:

 import QtQuick 2.2
 import Sailfish.Silica 1.0

 CoverAction {
     iconSource: "writeNewEmail.png"
     onTriggered: {
         showNewEmailView()
         appWindow.activate()
     }
 }

See also CoverActionList and Sailfish Application Features.

Property Documentation

iconSource : url

This property holds the URL of the icon to display for this cover action.

If this is a relative URL, it is located relative to the QML file that defines the cover.


Signal Documentation

onTriggered()

This signal handler is called when the cover action is activated by the user.


We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.