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 WLANSNIFFERLISTVIEW_H |
|
19 #define WLANSNIFFERLISTVIEW_H |
|
20 |
|
21 #include <HbView> |
|
22 #include "wlanqtutilscommon.h" |
|
23 |
|
24 class HbListWidget; |
|
25 class HbListWidgetItem; |
|
26 class HbLabel; |
|
27 class WlanSniffer; |
|
28 class WlanQtUtilsWlanIap; |
|
29 class WlanQtUtilsWlanAp; |
|
30 |
|
31 class WlanSnifferListView : public HbView |
|
32 { |
|
33 Q_OBJECT |
|
34 |
|
35 public: |
|
36 WlanSnifferListView(WlanSniffer *appRef); |
|
37 virtual ~WlanSnifferListView(); |
|
38 |
|
39 void update(); |
|
40 void updateConnectionOpened(int iapId); |
|
41 void updateConnectionClosed(int iapId); |
|
42 |
|
43 signals: |
|
44 void detailsTriggered(int); |
|
45 void completeServiceTriggered(); |
|
46 |
|
47 public slots: |
|
48 void handleContextMenuClosed(); |
|
49 |
|
50 private slots: |
|
51 void handleListItemActivated(HbListWidgetItem *item); |
|
52 void handleListItemLongPressed(HbListWidgetItem *item, const QPointF &coords); |
|
53 void handleListItemDisconnect(); |
|
54 void handleDisconnect(); |
|
55 |
|
56 private: |
|
57 QString signalStrengthIconChoose(int signalStrength, WlanQtUtilsWlanSecMode secMode); |
|
58 HbListWidgetItem *wlanListItemIapCreate(const WlanQtUtilsWlanIap *iap); |
|
59 HbListWidgetItem *wlanListItemApCreate(const WlanQtUtilsWlanAp *ap); |
|
60 |
|
61 private: |
|
62 HbListWidget *mWlanList; |
|
63 HbLabel *mStatusLabel; |
|
64 WlanSniffer *mAppRef; |
|
65 int mConnectingIapId; |
|
66 /*! |
|
67 * Data identifying the network for which the context menu has been |
|
68 * opened: WlanQtUtilsAp class, or int IAP ID |
|
69 */ |
|
70 QVariant mContextMenuData; |
|
71 HbMenu *mContextMenu; //!< Context menu reference, if one is open |
|
72 }; |
|
73 |
|
74 #endif |
|