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 #ifndef UT_INFOWIDGETLAYOUTMANAGER_H |
|
19 #define UT_INFOWIDGETLAYOUTMANAGER_H |
|
20 |
|
21 #include <QtTest/QtTest> |
|
22 #include <mockservice.h> |
|
23 |
|
24 class InfoWidgetLayoutManager; |
|
25 class InfoWidgetDocumentLoader; |
|
26 |
|
27 class UT_InfoWidgetLayoutManager : public QObject, public MockService |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 UT_InfoWidgetLayoutManager(); |
|
33 ~UT_InfoWidgetLayoutManager(); |
|
34 |
|
35 private: |
|
36 void fillDisplayContainers(); |
|
37 void fillCurrentWidgetsContainer(); |
|
38 void fillParams(const QString & fileName, bool * ok); |
|
39 |
|
40 private slots: |
|
41 void init(); |
|
42 void cleanup(); |
|
43 |
|
44 void t_currentDisplayRole(); |
|
45 void t_currentWidgetRoles(); |
|
46 |
|
47 void t_layoutRows(); |
|
48 void t_setLayoutRows(); |
|
49 void t_rowHeight(); |
|
50 |
|
51 void t_layoutInfoDisplay(); |
|
52 void t_layoutSettingsDisplay(); |
|
53 |
|
54 void t_widgetRoles(); |
|
55 void t_loadWidgets(); |
|
56 void t_loadWidget(); |
|
57 void t_getWidget(); |
|
58 void t_hideWidget(); |
|
59 |
|
60 void t_contentWidget(); |
|
61 |
|
62 void t_showAll(); |
|
63 void t_hideAll(); |
|
64 |
|
65 void t_reloadWidgets(); |
|
66 |
|
67 void t_removeWidget(); |
|
68 |
|
69 void t_destroyObjects(); |
|
70 |
|
71 // InfoWidgetDocumentLoader tests |
|
72 void t_createObject(); |
|
73 |
|
74 private: |
|
75 InfoWidgetLayoutManager *m_layoutManager; |
|
76 InfoWidgetDocumentLoader *m_documentLoader; |
|
77 |
|
78 QGraphicsWidget *m_checkBoxPtr; |
|
79 QGraphicsWidget *m_iconPtr; |
|
80 QGraphicsWidget *m_marqueeItemPtr; |
|
81 QGraphicsWidget *m_labelPtr; |
|
82 QGraphicsWidget *m_graphicsWidgetPtr; |
|
83 |
|
84 }; |
|
85 |
|
86 #endif // UT_INFOWIDGETLAYOUTMANAGER_H |
|