author | Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com> |
Thu, 16 Sep 2010 12:11:40 +0100 | |
changeset 117 | c63ee96dbe5f |
permissions | -rw-r--r-- |
117
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1 |
/* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
8 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
11 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
13 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
15 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
17 |
#include "letterwidget.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
18 |
#include <QRect> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
19 |
#include <QPainter> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
20 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
21 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
22 |
letterwidget::letterwidget(QGraphicsItem *parent) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
23 |
: HbWidget(parent) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
24 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
25 |
mA = new HbPushButton("A"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
26 |
mB = new HbPushButton("B"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
27 |
mC = new HbPushButton("C"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
28 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
29 |
mSave = new HbPushButton("Save"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
30 |
mDel = new HbPushButton("Delete"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
31 |
mWait = new HbPushButton("Wait 10 s"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
32 |
mPanic = new HbPushButton("Panic client process"); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
33 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
34 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
35 |
mGridLayout = new QGraphicsGridLayout(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
36 |
mGridLayout->addItem(mA, 3, 0, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
37 |
mGridLayout->addItem(mB, 3, 1, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
38 |
mGridLayout->addItem(mC, 3, 2, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
39 |
mGridLayout->addItem(mSave, 4, 0, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
40 |
mGridLayout->addItem(mDel, 4, 1, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
41 |
mGridLayout->addItem(mWait, 4, 2, 1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
42 |
mGridLayout->addItem(mPanic, 5, 0, 1, 3); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
43 |
mGridLayout->setRowStretchFactor(0, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
44 |
mGridLayout->setRowStretchFactor(1, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
45 |
mGridLayout->setRowStretchFactor(2, 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
46 |
setLayout(mGridLayout); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
47 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
48 |
connect(mA, SIGNAL(released()), this, SLOT(toA())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
49 |
connect(mB, SIGNAL(released()), this, SLOT(toB())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
50 |
connect(mC, SIGNAL(released()), this, SLOT(toC())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
51 |
connect(mWait, SIGNAL(released()), this, SLOT(wait())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
52 |
connect(mPanic, SIGNAL(released()), this, SLOT(panic())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
53 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
54 |
connect(mSave, SIGNAL(released()), this, SIGNAL(save())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
55 |
connect(mDel, SIGNAL(released()), this, SIGNAL(del())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
56 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
57 |
toA(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
58 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
59 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
60 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
61 |
letterwidget::~letterwidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
62 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
63 |
// TODO Auto-generated destructor stub |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
64 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
65 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
66 |
void letterwidget::toA() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
67 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
68 |
mStatename = "A"; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
69 |
update(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
70 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
71 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
72 |
void letterwidget::toB() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
73 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
74 |
mStatename = "B"; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
75 |
update(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
76 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
77 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
78 |
void letterwidget::toC() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
79 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
80 |
mStatename = "C"; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
81 |
update(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
82 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
83 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
84 |
void letterwidget::wait() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
85 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
86 |
User::After(10000000); //10 s |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
87 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
88 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
89 |
void letterwidget::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
90 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
91 |
HbWidget::paint(painter, option, widget); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
92 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
93 |
if ( mStatename.isNull() ) { |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
94 |
return; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
95 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
96 |
else if ( mStatename == "A" ) { |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
97 |
painter->setPen(Qt::red); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
98 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
99 |
else if ( mStatename == "B" ) { |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
100 |
painter->setPen(Qt::green); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
101 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
102 |
else { |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
103 |
painter->setPen(Qt::blue); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
104 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
105 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
106 |
QFont font; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
107 |
font.setPointSize(60); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
108 |
painter->setFont(font); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
109 |
painter->drawText(10, 140, mStatename); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
110 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
111 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
112 |
QString letterwidget::state() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
113 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
114 |
return mStatename; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
115 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
116 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
117 |
void letterwidget::setState( QString state ) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
118 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
119 |
mStatename = state; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
120 |
update(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
121 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
122 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
123 |
void letterwidget::panic() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
124 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
125 |
User::Panic(_L("forced panic"), 122); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
126 |
} |