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