|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef MEASURETEST_H |
|
18 #define MEASURETEST_H |
|
19 |
|
20 #include <QWidget> |
|
21 #include <HbView> |
|
22 #include <afactivities_global.h> |
|
23 |
|
24 class HbLabel; |
|
25 class QString; |
|
26 class ActivityClient; |
|
27 class QPixmap; |
|
28 class QByteArray; |
|
29 class QVariant; |
|
30 class HbComboBox; |
|
31 class QGraphicsGridLayout; |
|
32 class HbPushButton; |
|
33 class QByteArray; |
|
34 class QFile; |
|
35 class QTextStream; |
|
36 class HbCheckBox; |
|
37 class AfActivityStorage; |
|
38 class AfActivation; |
|
39 |
|
40 class MeasureTest: public HbView |
|
41 { |
|
42 |
|
43 Q_OBJECT |
|
44 |
|
45 public: |
|
46 MeasureTest(QGraphicsItem *parent = 0); |
|
47 ~MeasureTest(); |
|
48 |
|
49 private slots: |
|
50 void saveActivity(); |
|
51 void deleteActivity(); |
|
52 void getActivity(); |
|
53 void getActivityData(); |
|
54 void updateActivity(); |
|
55 void getActivityThumb(); |
|
56 void saveTimes(); |
|
57 void save10actTimes(); |
|
58 void getTimesActivityData(); |
|
59 |
|
60 void thumbnailReady(QPixmap pix, void * ptr); |
|
61 |
|
62 private: |
|
63 void Before(); |
|
64 void After(); |
|
65 void Result(); |
|
66 int average(const QList<int>& list); |
|
67 int writeResults(const QList<int>& list, int average); |
|
68 |
|
69 |
|
70 private: |
|
71 HbLabel *mResultLabel; |
|
72 HbLabel *mItemLabel; |
|
73 HbLabel *mTimesLabel; |
|
74 HbLabel *mPixmapLabel; |
|
75 HbLabel *mBytesLabel; |
|
76 HbLabel *mTypeLabel; |
|
77 HbLabel *mSizeLabel; |
|
78 QString mItemMessage; |
|
79 QString mResultMessage; |
|
80 QPixmap *mPixmap; |
|
81 QPixmap *mEmptyPixmap; |
|
82 HbComboBox *mTimesCombo; |
|
83 HbComboBox *mLengthCombo; |
|
84 HbComboBox *mPixmapCombo; |
|
85 HbComboBox *mWidthCombo; |
|
86 HbComboBox *mHeightCombo; |
|
87 QGraphicsGridLayout *mLayout; |
|
88 HbPushButton *mSaveButton; |
|
89 HbPushButton *mDelButton; |
|
90 HbPushButton *mGetButton; |
|
91 HbPushButton *mGetDataButton; |
|
92 HbPushButton *mUpdateButton; |
|
93 HbPushButton *mThumbButton; |
|
94 HbPushButton *mGetDataTimesButton; |
|
95 HbPushButton *mSaveTimesButton; |
|
96 HbPushButton *mSave10TimesButton; |
|
97 HbCheckBox* mSaveDekCheckBox; |
|
98 QByteArray *mByteArray; |
|
99 TInt64 iBefore; |
|
100 TInt64 iAfter; |
|
101 TInt64 iResult; |
|
102 |
|
103 int mThumbwait; |
|
104 int mThumbnull; |
|
105 int mThumbcurrent; |
|
106 QFile* mFile; |
|
107 QTextStream* mStream; |
|
108 |
|
109 AfActivityStorage* mActivityStorage; |
|
110 AfActivation* mActivation; |
|
111 QObject *mActivityManager; |
|
112 |
|
113 }; |
|
114 |
|
115 #endif //MEASURETEST_H |