author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:21 +0100 | |
branch | GCC_SURGE |
changeset 51 | f39ed5e045e0 |
parent 30 | ebdbd102c78a |
parent 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 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_NETWORKPLUGINFORM_H |
|
19 |
#define UT_NETWORKPLUGINFORM_H |
|
20 |
||
21 |
#include <QtTest/QtTest> |
|
22 |
#include <mockservice.h> |
|
23 |
#include <psetnetworkwrapper.h> |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
24 |
#include "cpnetworkpluginform.h" |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
25 |
#include <QObject> |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
26 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
27 |
class CpNetworkPluginFormAdapter : public CpNetworkPluginForm |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
28 |
{ |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
29 |
Q_OBJECT |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
30 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
31 |
public: |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
32 |
explicit CpNetworkPluginFormAdapter(QGraphicsItem *parent = 0) |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
33 |
:CpNetworkPluginForm(parent){} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
34 |
virtual ~CpNetworkPluginFormAdapter(){} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
35 |
|
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
36 |
QString primaryIconForNetwork( |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
37 |
const PSetNetworkWrapper::NetworkInfo &info) { |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
38 |
return CpNetworkPluginForm::primaryIconForNetwork(info); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
39 |
} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
40 |
void hideFocusHighlight(){} |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
41 |
}; |
37 | 42 |
|
43 |
||
44 |
class UT_CpNetworkPluginForm : public QObject, MockService |
|
45 |
{ |
|
46 |
Q_OBJECT |
|
47 |
||
48 |
public: |
|
49 |
UT_CpNetworkPluginForm(); |
|
50 |
~UT_CpNetworkPluginForm(); |
|
51 |
||
52 |
void updateNetworkSelectionMode( |
|
53 |
PSetNetworkWrapper::NetworkSelectionMode& mode); |
|
54 |
||
55 |
private slots: |
|
56 |
||
57 |
void init(); |
|
58 |
||
59 |
void t_networkModeStateChanged(); |
|
60 |
void t_operatorSelectionStateChanged(); |
|
61 |
void t_networkAccessModeGot(); |
|
62 |
||
63 |
void t_availableNetworksGot(); |
|
64 |
void t_networkReqestFailed(); |
|
65 |
void t_userCancel(); |
|
66 |
void t_handleSearchingNetworks(); |
|
67 |
void t_handleRequestingSelectedNetwork(); |
|
68 |
void t_handleNetworkChanged(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
69 |
void t_primaryIconForNetwork(); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
70 |
|
37 | 71 |
void cleanup(); |
72 |
||
73 |
void t_memleak(); |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
74 |
|
37 | 75 |
private: |
76 |
CpNetworkPluginForm *m_networkPluginForm; |
|
77 |
PSetNetworkWrapper *m_networkWrapper; |
|
78 |
PSetNetworkWrapper::NetworkSelectionMode m_NetworkSelectionMode; |
|
79 |
int i; |
|
80 |
||
81 |
}; |
|
82 |
||
83 |
#endif // UT_NETWORKPLUGINFORM_H |