76
|
1 |
/** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
* All rights reserved.
|
|
3 |
* This component and the accompanying materials are made available
|
|
4 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
* which accompanies this distribution, and is available
|
|
6 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
*
|
|
8 |
* Initial Contributors:
|
|
9 |
* Nokia Corporation - initial contribution.
|
|
10 |
*
|
|
11 |
* Contributors:
|
|
12 |
*
|
|
13 |
* Description:
|
|
14 |
*
|
|
15 |
*/
|
|
16 |
#include <QDebug>
|
|
17 |
#include <smcmockclassincludes.h>
|
|
18 |
#include <hbcheckbox.h>
|
|
19 |
#include <QGraphicsSceneResizeEvent>
|
|
20 |
|
|
21 |
// NOTE! The following header include requires
|
|
22 |
// INCLUDEPATH += /sf/mw/hb/include/hbcore/private
|
|
23 |
#include <hbstyleoptioncheckbox_p.h>
|
|
24 |
|
|
25 |
|
|
26 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
27 |
|
|
28 |
// -----------------------------------------------------------------------------
|
|
29 |
// HbCheckBox::HbCheckBox
|
|
30 |
// -----------------------------------------------------------------------------
|
|
31 |
//
|
|
32 |
HbCheckBox::HbCheckBox(
|
|
33 |
QGraphicsItem * parent )
|
|
34 |
//:
|
|
35 |
//HbAbstractButton( /*parent*/ )
|
|
36 |
{
|
|
37 |
|
|
38 |
}
|
|
39 |
|
|
40 |
|
|
41 |
// -----------------------------------------------------------------------------
|
|
42 |
// HbCheckBox::HbCheckBox
|
|
43 |
// -----------------------------------------------------------------------------
|
|
44 |
//
|
|
45 |
HbCheckBox::HbCheckBox(
|
|
46 |
const QString & text,
|
|
47 |
QGraphicsItem * parent )
|
|
48 |
//:
|
|
49 |
//HbAbstractButton( /*text, parent*/ )
|
|
50 |
{
|
|
51 |
|
|
52 |
}
|
|
53 |
|
|
54 |
|
|
55 |
// -----------------------------------------------------------------------------
|
|
56 |
// HbCheckBox::~HbCheckBox
|
|
57 |
// -----------------------------------------------------------------------------
|
|
58 |
//
|
|
59 |
HbCheckBox::~HbCheckBox( )
|
|
60 |
{
|
|
61 |
|
|
62 |
}
|
|
63 |
|
|
64 |
// -----------------------------------------------------------------------------
|
|
65 |
// HbCheckBox::setText
|
|
66 |
// -----------------------------------------------------------------------------
|
|
67 |
//
|
|
68 |
void HbCheckBox::setText(
|
|
69 |
const QString & text )
|
|
70 |
{
|
|
71 |
SMC_MOCK_METHOD1( void, const QString &, text )
|
|
72 |
}
|
|
73 |
|
|
74 |
|
|
75 |
// -----------------------------------------------------------------------------
|
|
76 |
// HbCheckBox::text
|
|
77 |
// -----------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
QString HbCheckBox::text( ) const
|
|
80 |
{
|
|
81 |
SMC_MOCK_METHOD0( QString )
|
|
82 |
}
|
|
83 |
|
|
84 |
|
|
85 |
// -----------------------------------------------------------------------------
|
|
86 |
// HbCheckBox::setTristate
|
|
87 |
// -----------------------------------------------------------------------------
|
|
88 |
//
|
|
89 |
void HbCheckBox::setTristate(
|
|
90 |
bool isTristate )
|
|
91 |
{
|
|
92 |
SMC_MOCK_METHOD1( void, bool, isTristate )
|
|
93 |
}
|
|
94 |
|
|
95 |
|
|
96 |
// -----------------------------------------------------------------------------
|
|
97 |
// HbCheckBox::isTristate
|
|
98 |
// -----------------------------------------------------------------------------
|
|
99 |
//
|
|
100 |
bool HbCheckBox::isTristate( ) const
|
|
101 |
{
|
|
102 |
SMC_MOCK_METHOD0( bool )
|
|
103 |
}
|
|
104 |
|
|
105 |
|
|
106 |
// -----------------------------------------------------------------------------
|
|
107 |
// HbCheckBox::checkState
|
|
108 |
// -----------------------------------------------------------------------------
|
|
109 |
//
|
|
110 |
Qt::CheckState HbCheckBox::checkState( ) const
|
|
111 |
{
|
|
112 |
SMC_MOCK_METHOD0( Qt::CheckState )
|
|
113 |
}
|
|
114 |
|
|
115 |
|
|
116 |
// -----------------------------------------------------------------------------
|
|
117 |
// HbCheckBox::primitive
|
|
118 |
// -----------------------------------------------------------------------------
|
|
119 |
//
|
|
120 |
QGraphicsItem * HbCheckBox::primitive(
|
|
121 |
HbStyle::Primitive primitive ) const
|
|
122 |
{
|
|
123 |
SMC_MOCK_METHOD1( QGraphicsItem *, HbStyle::Primitive, primitive )
|
|
124 |
}
|
|
125 |
|
|
126 |
|
|
127 |
// -----------------------------------------------------------------------------
|
|
128 |
// HbCheckBox::setCheckState
|
|
129 |
// -----------------------------------------------------------------------------
|
|
130 |
//
|
|
131 |
void HbCheckBox::setCheckState(
|
|
132 |
Qt::CheckState state )
|
|
133 |
{
|
|
134 |
SMC_MOCK_METHOD1( void, Qt::CheckState, state )
|
|
135 |
}
|
|
136 |
|
|
137 |
|
|
138 |
// -----------------------------------------------------------------------------
|
|
139 |
// HbCheckBox::updatePrimitives
|
|
140 |
// -----------------------------------------------------------------------------
|
|
141 |
//
|
|
142 |
void HbCheckBox::updatePrimitives( )
|
|
143 |
{
|
|
144 |
SMC_MOCK_METHOD0( void )
|
|
145 |
}
|
|
146 |
|
|
147 |
|
|
148 |
// -----------------------------------------------------------------------------
|
|
149 |
// HbCheckBox::initStyleOption
|
|
150 |
// -----------------------------------------------------------------------------
|
|
151 |
//
|
|
152 |
void HbCheckBox::initStyleOption(
|
|
153 |
HbStyleOptionCheckBox * option ) const
|
|
154 |
{
|
|
155 |
SMC_MOCK_METHOD1( void, HbStyleOptionCheckBox *, option )
|
|
156 |
}
|
|
157 |
|
|
158 |
|
|
159 |
// -----------------------------------------------------------------------------
|
|
160 |
// HbCheckBox::resizeEvent
|
|
161 |
// -----------------------------------------------------------------------------
|
|
162 |
//
|
|
163 |
void HbCheckBox::resizeEvent(
|
|
164 |
QGraphicsSceneResizeEvent * event )
|
|
165 |
{
|
|
166 |
SMC_MOCK_METHOD1( void, QGraphicsSceneResizeEvent *, event )
|
|
167 |
}
|
|
168 |
|
|
169 |
|
|
170 |
// -----------------------------------------------------------------------------
|
|
171 |
// HbCheckBox::hitButton
|
|
172 |
// -----------------------------------------------------------------------------
|
|
173 |
//
|
|
174 |
bool HbCheckBox::hitButton(
|
|
175 |
const QPointF & pos ) const
|
|
176 |
{
|
|
177 |
SMC_MOCK_METHOD1( bool, const QPointF &, pos )
|
|
178 |
}
|
|
179 |
|
|
180 |
|
|
181 |
// -----------------------------------------------------------------------------
|
|
182 |
// HbCheckBox::checkStateSet
|
|
183 |
// -----------------------------------------------------------------------------
|
|
184 |
//
|
|
185 |
void HbCheckBox::checkStateSet( )
|
|
186 |
{
|
|
187 |
SMC_MOCK_METHOD0( void )
|
|
188 |
}
|
|
189 |
|
|
190 |
|
|
191 |
// -----------------------------------------------------------------------------
|
|
192 |
// HbCheckBox::nextCheckState
|
|
193 |
// -----------------------------------------------------------------------------
|
|
194 |
//
|
|
195 |
void HbCheckBox::nextCheckState( )
|
|
196 |
{
|
|
197 |
SMC_MOCK_METHOD0( void )
|
|
198 |
}
|
|
199 |
|
|
200 |
|
|
201 |
#ifndef HB_GESTURE_FW
|
|
202 |
// -----------------------------------------------------------------------------
|
|
203 |
// HbCheckBox::mouseReleaseEvent
|
|
204 |
// -----------------------------------------------------------------------------
|
|
205 |
//
|
|
206 |
void HbCheckBox::mouseReleaseEvent(
|
|
207 |
QGraphicsSceneMouseEvent * event )
|
|
208 |
{
|
|
209 |
SMC_MOCK_METHOD1( void, QGraphicsSceneMouseEvent *, event )
|
|
210 |
}
|
|
211 |
|
|
212 |
|
|
213 |
// -----------------------------------------------------------------------------
|
|
214 |
// HbCheckBox::mouseMoveEvent
|
|
215 |
// -----------------------------------------------------------------------------
|
|
216 |
//
|
|
217 |
void HbCheckBox::mouseMoveEvent(
|
|
218 |
QGraphicsSceneMouseEvent * event )
|
|
219 |
{
|
|
220 |
SMC_MOCK_METHOD1( void, QGraphicsSceneMouseEvent *, event )
|
|
221 |
}
|
|
222 |
#endif
|
|
223 |
|
|
224 |
// -----------------------------------------------------------------------------
|
|
225 |
// HbCheckBox::gestureEvent
|
|
226 |
// -----------------------------------------------------------------------------
|
|
227 |
//
|
|
228 |
void HbCheckBox::gestureEvent(
|
|
229 |
QGestureEvent * event )
|
|
230 |
{
|
|
231 |
SMC_MOCK_METHOD1( void, QGestureEvent *, event )
|
|
232 |
}
|
|
233 |
|
|
234 |
|
|
235 |
// -----------------------------------------------------------------------------
|
|
236 |
// HbCheckBox::keyPressEvent
|
|
237 |
// -----------------------------------------------------------------------------
|
|
238 |
//
|
|
239 |
void HbCheckBox::keyPressEvent(
|
|
240 |
QKeyEvent * keyEvent )
|
|
241 |
{
|
|
242 |
SMC_MOCK_METHOD1( void, QKeyEvent *, keyEvent )
|
|
243 |
}
|
|
244 |
|
|
245 |
|
|
246 |
// -----------------------------------------------------------------------------
|
|
247 |
// HbCheckBox::itemChange
|
|
248 |
// -----------------------------------------------------------------------------
|
|
249 |
//
|
|
250 |
QVariant HbCheckBox::itemChange(
|
|
251 |
GraphicsItemChange change,
|
|
252 |
const QVariant & value )
|
|
253 |
{
|
|
254 |
SMC_MOCK_METHOD2( QVariant, GraphicsItemChange, change,
|
|
255 |
const QVariant &, value )
|
|
256 |
}
|
|
257 |
|
|
258 |
|
|
259 |
// -----------------------------------------------------------------------------
|
|
260 |
// HbCheckBox::stateChanged
|
|
261 |
// -----------------------------------------------------------------------------
|
|
262 |
//
|
|
263 |
void HbCheckBox::stateChanged(
|
|
264 |
int state )
|
|
265 |
{
|
|
266 |
SMC_MOCK_METHOD1( void, int, state )
|
|
267 |
}
|
|
268 |
|
|
269 |
|