1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #include <QtGlobal> |
|
23 #include <QApplication> |
|
24 #include <QKeyEvent> |
|
25 #include <QLabel> |
|
26 #include <QStackedWidget> |
|
27 #include <QImageReader> |
|
28 #include <QDebug> |
|
29 #include <QTimer> |
|
30 #include <QPushButton> |
|
31 #include <QList> |
|
32 #include <QLineEdit> |
|
33 #include <QString> |
|
34 #include <QCheckBox> |
|
35 #include <QAction> |
|
36 #include <QListView> |
|
37 #include <QUrl> |
|
38 #include <math.h> |
|
39 |
|
40 #include "mimetestapp.h" |
|
41 |
|
42 // Erroneus services |
|
43 #define ERR_INTERFACE1 "xxxx.yyy" |
|
44 #define ERR_OPERATION1 "dial(QString,QString)" |
|
45 |
|
46 MimeTestApp::MimeTestApp(QWidget *parent, Qt::WFlags f) |
|
47 : QWidget(parent, f) |
|
48 { |
|
49 /* Adjust the palette */ |
|
50 #if defined(Q_WS_S60) |
|
51 QPalette p = qApp->palette(); |
|
52 QColor color(192,192,192); |
|
53 QColor bg(201,250,250); |
|
54 p.setColor(QPalette::Highlight, color.lighter(200)); |
|
55 p.setColor(QPalette::Text, Qt::black); |
|
56 p.setColor(QPalette::Base, bg); |
|
57 p.setColor(QPalette::WindowText, Qt::black); |
|
58 p.setColor(QPalette::Window, bg); |
|
59 p.setColor(QPalette::ButtonText, Qt::black); |
|
60 p.setColor(QPalette::Button, color.lighter(150)); |
|
61 p.setColor(QPalette::Link, QColor(240,40,40)); |
|
62 |
|
63 qApp->setPalette(p); |
|
64 #endif |
|
65 |
|
66 QPushButton *quitButton = new QPushButton(tr("quit")); |
|
67 connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit())); |
|
68 |
|
69 vl = new QVBoxLayout; |
|
70 vl->setMargin(0); |
|
71 vl->setSpacing(0); |
|
72 |
|
73 QStringList args = QApplication::arguments(); |
|
74 foreach (QString arg, args) |
|
75 { |
|
76 QLabel *label = new QLabel(arg); |
|
77 vl->addWidget(label); |
|
78 } |
|
79 vl->addWidget(quitButton); |
|
80 setLayout(vl); |
|
81 |
|
82 #if defined(Q_WS_X11) || defined(Q_WS_WIN) |
|
83 setFixedSize(QSize(360,640)); // nHD |
|
84 #elif defined(Q_WS_S60) |
|
85 showMaximized(); |
|
86 showFullScreen(); |
|
87 #endif |
|
88 } |
|
89 |
|
90 MimeTestApp::~MimeTestApp() |
|
91 { |
|
92 } |
|
93 |
|
94 |
|