|
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 |
|
18 #include <QDebug> |
|
19 #include <hbcheckbox.h> |
|
20 #include <QGraphicsSceneMouseEvent> |
|
21 #include <QGraphicsItem> |
|
22 #include <smcmockclassincludes.h> |
|
23 #include "hbcheckbox.h" |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // HbCheckBox::HbCheckBox |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 HbCheckBox::HbCheckBox( |
|
32 const QString & /*text*/, |
|
33 QGraphicsItem * parent ) |
|
34 : |
|
35 HbAbstractButton( parent ) |
|
36 { |
|
37 |
|
38 } |
|
39 |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // HbCheckBox::~HbCheckBox |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 HbCheckBox::~HbCheckBox( ) |
|
46 { |
|
47 |
|
48 } |
|
49 |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // HbCheckBox::setText |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 void HbCheckBox::setText( |
|
56 const QString & text ) |
|
57 { |
|
58 SMC_MOCK_METHOD1( void, const QString &, text ) |
|
59 } |
|
60 |
|
61 |
|
62 // ----------------------------------------------------------------------------- |
|
63 // HbCheckBox::text |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 QString HbCheckBox::text( ) const |
|
67 { |
|
68 SMC_MOCK_METHOD0( QString ) |
|
69 } |
|
70 |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // HbCheckBox::setTristate |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 void HbCheckBox::setTristate( |
|
77 bool isTristate ) |
|
78 { |
|
79 SMC_MOCK_METHOD1( void, bool, isTristate ) |
|
80 } |
|
81 |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // HbCheckBox::isTristate |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 bool HbCheckBox::isTristate( ) const |
|
88 { |
|
89 SMC_MOCK_METHOD0( bool ) |
|
90 } |
|
91 |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // HbCheckBox::checkState |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 Qt::CheckState HbCheckBox::checkState( ) const |
|
98 { |
|
99 SMC_MOCK_METHOD0( Qt::CheckState ) |
|
100 } |
|
101 |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // HbCheckBox::primitive |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 QGraphicsItem * HbCheckBox::primitive( |
|
108 HbStyle::Primitive primitive ) const |
|
109 { |
|
110 SMC_MOCK_METHOD1( QGraphicsItem *, HbStyle::Primitive, primitive ) |
|
111 } |
|
112 |
|
113 |
|
114 // ----------------------------------------------------------------------------- |
|
115 // HbCheckBox::setCheckState |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 void HbCheckBox::setCheckState( |
|
119 Qt::CheckState state ) |
|
120 { |
|
121 SMC_MOCK_METHOD1( void, Qt::CheckState, state ) |
|
122 } |
|
123 |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // HbCheckBox::updatePrimitives |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 void HbCheckBox::updatePrimitives( ) |
|
130 { |
|
131 SMC_MOCK_METHOD0( void ) |
|
132 } |
|
133 |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
|
136 // HbCheckBox::initStyleOption |
|
137 // ----------------------------------------------------------------------------- |
|
138 // |
|
139 void HbCheckBox::initStyleOption( |
|
140 HbStyleOptionCheckBox * ) const |
|
141 { |
|
142 |
|
143 } |
|
144 |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // HbCheckBox::resizeEvent |
|
148 // ----------------------------------------------------------------------------- |
|
149 // |
|
150 void HbCheckBox::resizeEvent( |
|
151 QGraphicsSceneResizeEvent * event ) |
|
152 { |
|
153 SMC_MOCK_METHOD1( void, QGraphicsSceneResizeEvent *, event ) |
|
154 } |
|
155 |
|
156 |
|
157 // ----------------------------------------------------------------------------- |
|
158 // HbCheckBox::hitButton |
|
159 // ----------------------------------------------------------------------------- |
|
160 // |
|
161 bool HbCheckBox::hitButton( |
|
162 const QPointF & pos ) const |
|
163 { |
|
164 SMC_MOCK_METHOD1( bool, const QPointF &, pos ) |
|
165 } |
|
166 |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // HbCheckBox::checkStateSet |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 void HbCheckBox::checkStateSet( ) |
|
173 { |
|
174 SMC_MOCK_METHOD0( void ) |
|
175 } |
|
176 |
|
177 |
|
178 // ----------------------------------------------------------------------------- |
|
179 // HbCheckBox::nextCheckState |
|
180 // ----------------------------------------------------------------------------- |
|
181 // |
|
182 void HbCheckBox::nextCheckState( ) |
|
183 { |
|
184 SMC_MOCK_METHOD0( void ) |
|
185 } |
|
186 |
|
187 |
|
188 #ifndef HB_GESTURE_FW |
|
189 // ----------------------------------------------------------------------------- |
|
190 // HbCheckBox::mouseReleaseEvent |
|
191 // ----------------------------------------------------------------------------- |
|
192 // |
|
193 void HbCheckBox::mouseReleaseEvent( |
|
194 QGraphicsSceneMouseEvent * event ) |
|
195 { |
|
196 SMC_MOCK_METHOD1( void, QGraphicsSceneMouseEvent *, event ) |
|
197 } |
|
198 |
|
199 |
|
200 // ----------------------------------------------------------------------------- |
|
201 // HbCheckBox::mouseMoveEvent |
|
202 // ----------------------------------------------------------------------------- |
|
203 // |
|
204 void HbCheckBox::mouseMoveEvent( |
|
205 QGraphicsSceneMouseEvent * event ) |
|
206 { |
|
207 SMC_MOCK_METHOD1( void, QGraphicsSceneMouseEvent *, event ) |
|
208 } |
|
209 #endif |
|
210 #ifdef HB_GESTURE_FW |
|
211 // ----------------------------------------------------------------------------- |
|
212 // HbCheckBox::gestureEvent |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void HbCheckBox::gestureEvent( |
|
216 QGestureEvent * event ) |
|
217 { |
|
218 SMC_MOCK_METHOD1( void, QGestureEvent *, event ) |
|
219 } |
|
220 #endif |
|
221 |
|
222 |
|
223 // ----------------------------------------------------------------------------- |
|
224 // HbCheckBox::keyPressEvent |
|
225 // ----------------------------------------------------------------------------- |
|
226 // |
|
227 void HbCheckBox::keyPressEvent( |
|
228 QKeyEvent * keyEvent ) |
|
229 { |
|
230 SMC_MOCK_METHOD1( void, QKeyEvent *, keyEvent ) |
|
231 } |
|
232 |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // HbCheckBox::itemChange |
|
236 // ----------------------------------------------------------------------------- |
|
237 // |
|
238 QVariant HbCheckBox::itemChange( |
|
239 GraphicsItemChange change, |
|
240 const QVariant & value ) |
|
241 { |
|
242 SMC_MOCK_METHOD2( QVariant, GraphicsItemChange, change, |
|
243 const QVariant &, value ) |
|
244 } |