31
|
1 |
/*
|
|
2 |
* Copyright (c) 2009-2010 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 |
* WLAN Sniffer List View.
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef WLANSNIFFERLISTVIEW_H
|
|
19 |
#define WLANSNIFFERLISTVIEW_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
|
|
23 |
#include <HbView>
|
|
24 |
#include <HbMenu>
|
|
25 |
#include <HbMessageBox>
|
|
26 |
#include <QSharedPointer>
|
|
27 |
#include <QScopedPointer>
|
|
28 |
|
|
29 |
// User includes
|
|
30 |
|
|
31 |
// Forward declarations
|
|
32 |
|
|
33 |
class HbDocumentLoader;
|
|
34 |
class HbListWidget;
|
|
35 |
class HbListWidgetItem;
|
|
36 |
class HbLabel;
|
|
37 |
class HbPushButton;
|
|
38 |
class WlanSnifferMainWindow;
|
|
39 |
class WlanSnifferListWidget;
|
|
40 |
class WlanSnifferEngine;
|
|
41 |
class WlanQtUtilsAp;
|
|
42 |
|
|
43 |
// External data types
|
|
44 |
|
|
45 |
// Constants
|
|
46 |
|
|
47 |
// Class declaration
|
|
48 |
|
|
49 |
class WlanSnifferListView : public HbView
|
|
50 |
{
|
|
51 |
Q_OBJECT
|
|
52 |
|
|
53 |
public:
|
|
54 |
|
|
55 |
// Data types
|
|
56 |
|
|
57 |
WlanSnifferListView(
|
|
58 |
WlanSnifferEngine *engine,
|
|
59 |
WlanSnifferMainWindow *mainWindow);
|
|
60 |
|
|
61 |
~WlanSnifferListView();
|
|
62 |
|
|
63 |
signals:
|
|
64 |
|
|
65 |
/*!
|
|
66 |
Signal for triggering WLAN Wizard start.
|
|
67 |
|
|
68 |
@param [in] ap WLAN access point.
|
|
69 |
*/
|
|
70 |
|
|
71 |
void wizardTriggered(const WlanQtUtilsAp *ap);
|
|
72 |
|
|
73 |
public slots:
|
|
74 |
|
|
75 |
protected:
|
|
76 |
|
|
77 |
protected slots:
|
|
78 |
|
|
79 |
private:
|
|
80 |
|
|
81 |
Q_DISABLE_COPY(WlanSnifferListView)
|
|
82 |
|
|
83 |
void loadDocml(bool isEmbedded);
|
|
84 |
|
|
85 |
void updateWlanStatusLabel(bool enabled);
|
|
86 |
|
|
87 |
void handleConnect(QVariant data);
|
|
88 |
|
|
89 |
private slots:
|
|
90 |
|
|
91 |
void updateListContent();
|
|
92 |
|
|
93 |
void updateWlanEnabled();
|
|
94 |
|
|
95 |
void updateConnectionOpened(int iapId);
|
|
96 |
|
|
97 |
void updateConnectionClosed(int iapId);
|
|
98 |
|
|
99 |
void handleContextMenuClosed();
|
|
100 |
|
|
101 |
void handleListItemActivated(HbListWidgetItem *item);
|
|
102 |
|
|
103 |
void handleListItemLongPressed(
|
|
104 |
HbListWidgetItem *item,
|
|
105 |
const QPointF &coords);
|
|
106 |
|
|
107 |
void handleListItemConnect();
|
|
108 |
|
|
109 |
void handleListItemDisconnect();
|
|
110 |
|
|
111 |
void handleWlanToggled();
|
|
112 |
|
39
|
113 |
void startWlanWizard();
|
|
114 |
|
31
|
115 |
void handleWlanEnableDialogClosed(HbAction *action);
|
|
116 |
|
|
117 |
private: // data
|
|
118 |
|
|
119 |
// Owned data
|
|
120 |
|
|
121 |
//! Document loader for list view
|
|
122 |
QScopedPointer<HbDocumentLoader> mDocLoader;
|
|
123 |
//! WLAN Sniffer list view custom widget
|
|
124 |
QSharedPointer<WlanSnifferListWidget> mWlanListWidget;
|
|
125 |
//! Context menu reference, if one is open
|
|
126 |
QSharedPointer<HbMenu> mContextMenu;
|
|
127 |
/*!
|
|
128 |
Data identifying the network for which the context menu has been
|
|
129 |
opened: WlanQtUtilsAp class, or int IAP ID.
|
|
130 |
*/
|
|
131 |
QVariant mContextMenuData;
|
|
132 |
//! WLAN enabling in airplane mode dialog
|
|
133 |
QSharedPointer<HbMessageBox> mWlanEnableDialog;
|
|
134 |
//! Flag for handling WLAN scan result update ignoring
|
|
135 |
bool mIgnoreWlanScanResults;
|
|
136 |
//! ID of the IAP we are currently connecting
|
|
137 |
int mConnectingIapId;
|
|
138 |
|
|
139 |
// Not owned data
|
|
140 |
|
|
141 |
//! WLAN Sniffer engine
|
|
142 |
WlanSnifferEngine *mEngine;
|
|
143 |
//! WLAN ON/OFF switch action
|
|
144 |
HbAction *mSwitchWlanAction;
|
|
145 |
//! Add WLAN manually action
|
|
146 |
HbAction *mAddWlanAction;
|
|
147 |
//! WLAN Sniffer list view widget
|
|
148 |
HbListWidget *mWlanList;
|
|
149 |
//! WLAN Status label
|
|
150 |
HbLabel *mStatusLabel;
|
|
151 |
//! WLAN ON/OFF button
|
|
152 |
HbPushButton *mWlanButton;
|
|
153 |
|
|
154 |
// Friend classes
|
|
155 |
};
|
|
156 |
|
|
157 |
#endif // WLANSNIFFERLISTVIEW_H
|