-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutility.cpp
49 lines (44 loc) · 1.07 KB
/
utility.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "utility.h"
#include "qmlapplicationviewer.h"
#if defined(Q_WS_MAEMO_5)
# include <QDBusConnection>
# include <QDBusMessage>
#endif
#if defined(Q_OS_SYMBIAN)
#include <eikenv.h>
#endif
Utility::Utility(QObject *parent, QmlApplicationViewer *viewerRef) :
QObject(parent)
{
viewer = viewerRef;
}
Utility::~Utility() {
}
void Utility::taskSwitcher()
{
#if defined(Q_WS_MAEMO_5)
QDBusConnection c = QDBusConnection::sessionBus();
QDBusMessage m = QDBusMessage::createSignal("/", "com.nokia.hildon_desktop", "exit_app_view");
c.send(m);
#elif defined(Q_OS_SYMBIAN)
CEikonEnv::Static()->DisplayTaskList();
#else
viewer->showMinimized();
#endif
}
QString Utility::getPlatform()
{
#if defined(Q_WS_MAEMO_5)
return "maemo5";
#elif defined(Q_OS_SYMBIAN)
return "symbian";
#elif defined(MEEGO_EDITION_HARMATTAN)
return "harmattan";
#elif defined(ANDROID)
return "android";
#elif defined(BLACKBERRY_PLAYBOOK)
return "playbook";
#else
return "other";
#endif
}