equal
deleted
inserted
replaced
|
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: Mocked widget. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MOCKWIDGET_H |
|
19 #define MOCKWIDGET_H |
|
20 |
|
21 #include <hbwidget.h> |
|
22 |
|
23 class MockWidget: public HbWidget |
|
24 { |
|
25 Q_OBJECT |
|
26 Q_PROPERTY(bool isOnline READ isOnline WRITE setOnline) |
|
27 |
|
28 public: |
|
29 MockWidget(); |
|
30 MockWidget(QSizeF widgetSize); |
|
31 bool isOnline(){ return mOnline; } |
|
32 void setOnline(bool online){ mOnline = online; } |
|
33 QPainterPath shape() const; |
|
34 public slots: |
|
35 |
|
36 void onInitialize(); |
|
37 void onShow(); |
|
38 void onHide(); |
|
39 void onUninitialize(); |
|
40 |
|
41 signals: |
|
42 void setPreferences(const QStringList &names); |
|
43 // for testing |
|
44 void initializeCalled(); |
|
45 void showCalled(); |
|
46 void hideCalled(); |
|
47 void uninitializeCalled(); |
|
48 private: |
|
49 Q_DISABLE_COPY(MockWidget) |
|
50 private: |
|
51 bool mOnline; |
|
52 |
|
53 }; |
|
54 |
|
55 #endif //MOCKWIDGET_H |