Commit 11b4e3a3b52741478f79011e1ef4e929ffcdd4e0

Added capability to show system note dialog
  
88SOURCES += qnotification.cpp
99HEADERS += qnotification.h qnotification_p.h
1010
11QT += dbus
12
1113CONFIG += link_pkgconfig
1214PKGCONFIG += hildon-1
  
2626 priv->showBanner(text);
2727}
2828
29void QNotifications::showNote(const QString &text)
30{
31 MAEMO_PRIVATE(QNotifications);
32 priv->showNote(text);
33}
34
2935} //namespace
  
2626
2727public Q_SLOTS:
2828 void showBanner(const QString &text);
29 void showNote(const QString &text);
2930};
3031
3132} //namespace
  
66#ifndef QNOTIFICATIONS_P_H
77#define QNOTIFICATIONS_P_H
88
9#include <QtDBus>
10
911#define __GTK_BINDINGS_H__ //gtkbindings.h:79 has colliding symbol "signal"
1012extern "C" {
1113#include <hildon/hildon-banner.h>
2626 QNotificationsPrivate();
2727 ~QNotificationsPrivate();
2828 void showBanner(const QString &text);
29 void showNote(const QString &text);
2930};
3031
3132/* begin private implementation */
4444void QNotificationsPrivate::showBanner(const QString &text)
4545{
4646 hildon_banner_show_information(0, "", text.toLatin1());
47}
48
49void QNotificationsPrivate::showNote(const QString &text)
50{
51 QDBusMessage msg = QDBusMessage::createMethodCall("org.freedesktop.Notifications", "/org/freedesktop/Notifications",
52 "org.freedesktop.Notifications", "SystemNoteDialog");
53
54 QList<QVariant> args;
55 args.append(text);
56 args.append(static_cast<quint32>(0));
57 args.append("ok");
58
59 msg.setArguments(args);
60
61 QDBusConnection::systemBus().call(msg);
4762}
4863
4964} // namespace