Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
Public Slots | Properties | List of all members
Notification Class Reference

A desktop popup notification. More...

Public Slots

void hide ()
 Hides the notification.
void open ()
 Opens the notification.
void show ()
 Displays the notification.

Properties

string category
 The category of the notification.
dict hints
 The hints provided by the notification.
string iconSource
 The icon source of the notification.
string soundSource
 The sound source of the notification.
string text
 The text of the notification.
int timeout
 The timeout of the notification.
string title
 The title of the notification.
bool visible
 Whether the notification is visible.

Detailed Description

A desktop popup notification.

import QtQuick 1.0
import org.hildon.components 1.0
import org.hildon.desktop 1.0
Window {
id: window
title: qsTr("Notification Example")
visible: true
Button {
id: button
anchors.centerIn: parent
width: 300
text: qsTr("Show notification")
onClicked: notificationComponent.createObject(window)
}
Component {
id: notificationComponent
id: notification
category: "qt-components-hildon"
hints: {"led-pattern": "PatternCommonNotification"}
iconSource: "general_web"
text: qsTr("This is an example QML notification")
timeout: Notification.DefaultTimeout
title: qsTr("QML notification")
visible: true
onAccepted: console.log(qsTr("Notification accepted"))
onRejected: console.log(qsTr("Notification rejected"))
}
}
}
See Also
InformationBox
Examples:
notification.qml.

Member Function Documentation

void Notification::hide ( )
slot

Hides the notification.

Equvalent to visible = false.

void Notification::open ( )
slot

Opens the notification.

Equvalent show().

void Notification::show ( )
slot

Displays the notification.

Equvalent to visible = true.

Property Documentation

bool Notification::visible
readwrite

Whether the notification is visible.

The default value is false