|
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 |
|
23 class HbLabel; |
|
24 class QString; |
|
25 class ActivityClient; |
|
26 class QPixmap; |
|
27 class QByteArray; |
|
28 class QVariant; |
|
29 class HbComboBox; |
|
30 class QGraphicsGridLayout; |
|
31 class HbPushButton; |
|
32 class QByteArray; |
|
33 class QFile; |
|
34 class QTextStream; |
|
35 |
|
36 class MeasureTest: public HbView |
|
37 { |
|
38 |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 MeasureTest(QGraphicsItem *parent = 0); |
|
43 ~MeasureTest(); |
|
44 |
|
45 private slots: |
|
46 void saveActivity(); |
|
47 void deleteActivity(); |
|
48 void getActivity(); |
|
49 void getActivityData(); |
|
50 void updateActivity(); |
|
51 void getActivityThumb(); |
|
52 void saveTimes(); |
|
53 void save10actTimes(); |
|
54 void getTimesActivityData(); |
|
55 |
|
56 void thumbnailReady(QPixmap pix, void * ptr); |
|
57 |
|
58 private: |
|
59 void Before(); |
|
60 void After(); |
|
61 void Result(); |
|
62 int average(const QList<int>& list); |
|
63 int writeResults(const QList<int>& list, int average); |
|
64 |
|
65 |
|
66 private: |
|
67 HbLabel *mResultLabel; |
|
68 HbLabel *mItemLabel; |
|
69 HbLabel *mTimesLabel; |
|
70 HbLabel *mPixmapLabel; |
|
71 HbLabel *mBytesLabel; |
|
72 HbLabel *mTypeLabel; |
|
73 HbLabel *mSizeLabel; |
|
74 QString mItemMessage; |
|
75 QString mResultMessage; |
|
76 QObject *mActivityClient; |
|
77 QObject *mActivityManager; |
|
78 QPixmap *mPixmap; |
|
79 QPixmap *mEmptyPixmap; |
|
80 HbComboBox *mTimesCombo; |
|
81 HbComboBox *mLengthCombo; |
|
82 HbComboBox *mPixmapCombo; |
|
83 HbComboBox *mWidthCombo; |
|
84 HbComboBox *mHeightCombo; |
|
85 QGraphicsGridLayout *mLayout; |
|
86 HbPushButton *mSaveButton; |
|
87 HbPushButton *mDelButton; |
|
88 HbPushButton *mGetButton; |
|
89 HbPushButton *mGetDataButton; |
|
90 HbPushButton *mUpdateButton; |
|
91 HbPushButton *mThumbButton; |
|
92 HbPushButton *mGetDataTimesButton; |
|
93 HbPushButton *mSaveTimesButton; |
|
94 HbPushButton *mSave10TimesButton; |
|
95 QByteArray *mByteArray; |
|
96 TInt64 iBefore; |
|
97 TInt64 iAfter; |
|
98 TInt64 iResult; |
|
99 |
|
100 int mThumbwait; |
|
101 int mThumbnull; |
|
102 int mThumbcurrent; |
|
103 |
|
104 QFile* mFile; |
|
105 QTextStream* mStream; |
|
106 |
|
107 |
|
108 |
|
109 }; |
|
110 |
|
111 #endif //MEASURETEST_H |