equal
deleted
inserted
replaced
26 #include <QTimer> |
26 #include <QTimer> |
27 #include <QGesture> |
27 #include <QGesture> |
28 |
28 |
29 int actionCount = 0; |
29 int actionCount = 0; |
30 Qt::Orientation windowOrientation = Qt::Vertical; |
30 Qt::Orientation windowOrientation = Qt::Vertical; |
31 bool logsMenuShown = false; |
31 bool testMenuShown = false; |
|
32 bool testDialogShown = false; |
32 HbMainWindow* testWindow = 0; |
33 HbMainWindow* testWindow = 0; |
33 HbView* testView = 0; |
34 HbView* testView = 0; |
34 int testViewCount = 0; |
35 int testViewCount = 0; |
35 HbAction* testSoftkeyAction = 0; |
36 HbAction* testSoftkeyAction = 0; |
36 QString selectedActionString = "none"; |
37 QString selectedActionString = "none"; |
41 bool testIsWidgetRaised = false; |
42 bool testIsWidgetRaised = false; |
42 |
43 |
43 void HbStubHelper::reset() |
44 void HbStubHelper::reset() |
44 { |
45 { |
45 actionCount = 0; |
46 actionCount = 0; |
46 logsMenuShown = false; |
47 testMenuShown = false; |
47 testSingleShotTimer = false; |
48 testSingleShotTimer = false; |
48 testQuitCalled = false; |
49 testQuitCalled = false; |
49 testIsWidgetRaised = false; |
50 testIsWidgetRaised = false; |
|
51 testDialogShown = false; |
50 } |
52 } |
51 |
53 |
52 |
54 |
53 |
55 |
54 int HbStubHelper::widgetActionsCount() |
56 int HbStubHelper::widgetActionsCount() |
56 return actionCount; |
58 return actionCount; |
57 } |
59 } |
58 |
60 |
59 bool HbStubHelper::menuShown() |
61 bool HbStubHelper::menuShown() |
60 { |
62 { |
61 return logsMenuShown; |
63 return testMenuShown; |
62 } |
64 } |
|
65 |
|
66 bool HbStubHelper::dialogShown() |
|
67 { |
|
68 return testDialogShown; |
|
69 } |
|
70 |
63 |
71 |
64 bool HbStubHelper::singleShotTimerActive() |
72 bool HbStubHelper::singleShotTimerActive() |
65 { |
73 { |
66 return testSingleShotTimer; |
74 return testSingleShotTimer; |
67 } |
75 } |
137 |
145 |
138 // ----------------------------------------------------------------------------- |
146 // ----------------------------------------------------------------------------- |
139 // |
147 // |
140 // ----------------------------------------------------------------------------- |
148 // ----------------------------------------------------------------------------- |
141 // |
149 // |
142 HbAction *HbMenu::exec(const QPointF &pos, HbAction *action ) |
150 void HbMenu::open(QObject *receiver, const char *member) |
143 { |
151 { |
144 Q_UNUSED(action) |
152 Q_UNUSED(receiver) |
145 Q_UNUSED(pos) |
153 Q_UNUSED(member) |
146 logsMenuShown = true; |
154 testMenuShown = true; |
147 return 0; |
155 } |
148 } |
156 |
149 |
157 void HbDialog::open(QObject *receiver, const char *member) |
150 HbAction *HbMenu::exec(HbAction *action) |
158 { |
151 { |
159 Q_UNUSED(receiver) |
152 Q_UNUSED(action) |
160 Q_UNUSED(member) |
153 logsMenuShown = true; |
161 testDialogShown = true; |
154 return 0; |
162 } |
155 } |
163 |
156 |
164 |
|
165 // ----------------------------------------------------------------------------- |
|
166 // |
|
167 // ----------------------------------------------------------------------------- |
|
168 // |
157 void QGraphicsWidget::addAction(QAction *action) |
169 void QGraphicsWidget::addAction(QAction *action) |
158 { |
170 { |
159 Q_UNUSED(action) |
171 Q_UNUSED(action) |
160 actionCount++; |
172 actionCount++; |
161 } |
173 } |
189 } |
201 } |
190 |
202 |
191 QRectF HbMainWindow::layoutRect() const |
203 QRectF HbMainWindow::layoutRect() const |
192 { |
204 { |
193 return QRectF(0, 0, 100,100); |
205 return QRectF(0, 0, 100,100); |
194 } |
|
195 |
|
196 HbAction* HbMainWindow::softKeyAction(Hb::SoftKeyId key) const |
|
197 { |
|
198 Q_UNUSED(key) |
|
199 return testSoftkeyAction; |
|
200 } |
|
201 |
|
202 void HbMainWindow::addSoftKeyAction(Hb::SoftKeyId key, HbAction *action) |
|
203 { |
|
204 Q_UNUSED(key) |
|
205 Q_UNUSED(action) |
|
206 testSoftkeyAction = action; |
|
207 } |
|
208 |
|
209 void HbMainWindow::removeSoftKeyAction(Hb::SoftKeyId key, HbAction *action) |
|
210 { |
|
211 Q_UNUSED(key) |
|
212 Q_UNUSED(action) |
|
213 testSoftkeyAction = 0; |
|
214 } |
206 } |
215 |
207 |
216 HbView *HbMainWindow::addView(QGraphicsWidget *widget) |
208 HbView *HbMainWindow::addView(QGraphicsWidget *widget) |
217 { |
209 { |
218 Q_UNUSED(widget) |
210 Q_UNUSED(widget) |