Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 085eec4..f4cfe52 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -1,116 +1,117 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | 19 | ||
20 | #include <assert.h> | 20 | #include <assert.h> |
21 | #include <qcursor.h> | ||
21 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
22 | #include <qtextstream.h> | 23 | #include <qtextstream.h> |
23 | #include <qpopupmenu.h> | 24 | #include <qpopupmenu.h> |
24 | 25 | ||
25 | #ifdef QWS | 26 | #ifdef QWS |
26 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
27 | #include <opie/odevice.h> | 28 | #include <opie/odevice.h> |
28 | using namespace Opie; | 29 | using namespace Opie; |
29 | #endif | 30 | #endif |
30 | 31 | ||
31 | 32 | ||
32 | #ifdef QWS | 33 | #ifdef QWS |
33 | #include <qpe/resource.h> | 34 | #include <qpe/resource.h> |
34 | #else | 35 | #else |
35 | #include "resource.h" | 36 | #include "resource.h" |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | const int col_type = 0; | 39 | const int col_type = 0; |
39 | const int col_essid = 0; | 40 | const int col_essid = 0; |
40 | const int col_sig = 1; | 41 | const int col_sig = 1; |
41 | const int col_ap = 2; | 42 | const int col_ap = 2; |
42 | const int col_channel = 3; | 43 | const int col_channel = 3; |
43 | const int col_wep = 4; | 44 | const int col_wep = 4; |
44 | const int col_traffic = 5; | 45 | const int col_traffic = 5; |
45 | const int col_ip = 6; | 46 | const int col_ip = 6; |
46 | const int col_manuf = 7; | 47 | const int col_manuf = 7; |
47 | const int col_firstseen = 8; | 48 | const int col_firstseen = 8; |
48 | const int col_lastseen = 9; | 49 | const int col_lastseen = 9; |
49 | 50 | ||
50 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 51 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
51 | :OListView( parent, name ) | 52 | :OListView( parent, name ) |
52 | { | 53 | { |
53 | 54 | ||
54 | setFrameShape( QListView::StyledPanel ); | 55 | setFrameShape( QListView::StyledPanel ); |
55 | setFrameShadow( QListView::Sunken ); | 56 | setFrameShadow( QListView::Sunken ); |
56 | 57 | ||
57 | addColumn( tr( "Net/Station" ) ); | 58 | addColumn( tr( "Net/Station" ) ); |
58 | setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); | 59 | setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); |
59 | addColumn( tr( "#" ) ); | 60 | addColumn( tr( "#" ) ); |
60 | setColumnAlignment( col_sig, AlignCenter ); | 61 | setColumnAlignment( col_sig, AlignCenter ); |
61 | addColumn( tr( "MAC" ) ); | 62 | addColumn( tr( "MAC" ) ); |
62 | setColumnAlignment( col_ap, AlignCenter ); | 63 | setColumnAlignment( col_ap, AlignCenter ); |
63 | addColumn( tr( "Chn" ) ); | 64 | addColumn( tr( "Chn" ) ); |
64 | setColumnAlignment( col_channel, AlignCenter ); | 65 | setColumnAlignment( col_channel, AlignCenter ); |
65 | addColumn( tr( "W" ) ); | 66 | addColumn( tr( "W" ) ); |
66 | setColumnAlignment( col_wep, AlignCenter ); | 67 | setColumnAlignment( col_wep, AlignCenter ); |
67 | addColumn( tr( "T" ) ); | 68 | addColumn( tr( "T" ) ); |
68 | setColumnAlignment( col_traffic, AlignCenter ); | 69 | setColumnAlignment( col_traffic, AlignCenter ); |
69 | addColumn( tr( "IP" ) ); | 70 | addColumn( tr( "IP" ) ); |
70 | setColumnAlignment( col_ip, AlignCenter ); | 71 | setColumnAlignment( col_ip, AlignCenter ); |
71 | addColumn( tr( "Manufacturer" ) ); | 72 | addColumn( tr( "Manufacturer" ) ); |
72 | setColumnAlignment( col_manuf, AlignCenter ); | 73 | setColumnAlignment( col_manuf, AlignCenter ); |
73 | addColumn( tr( "First Seen" ) ); | 74 | addColumn( tr( "First Seen" ) ); |
74 | setColumnAlignment( col_firstseen, AlignCenter ); | 75 | setColumnAlignment( col_firstseen, AlignCenter ); |
75 | addColumn( tr( "Last Seen" ) ); | 76 | addColumn( tr( "Last Seen" ) ); |
76 | setColumnAlignment( col_lastseen, AlignCenter ); | 77 | setColumnAlignment( col_lastseen, AlignCenter ); |
77 | setRootIsDecorated( true ); | 78 | setRootIsDecorated( true ); |
78 | setAllColumnsShowFocus( true ); | 79 | setAllColumnsShowFocus( true ); |
79 | 80 | ||
80 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), | 81 | connect( this, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), |
81 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); | 82 | this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); |
82 | 83 | ||
83 | #ifdef QWS | 84 | #ifdef QWS |
84 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 85 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
85 | #endif | 86 | #endif |
86 | 87 | ||
87 | }; | 88 | }; |
88 | 89 | ||
89 | 90 | ||
90 | MScanListView::~MScanListView() | 91 | MScanListView::~MScanListView() |
91 | { | 92 | { |
92 | }; | 93 | }; |
93 | 94 | ||
94 | 95 | ||
95 | OListViewItem* MScanListView::childFactory() | 96 | OListViewItem* MScanListView::childFactory() |
96 | { | 97 | { |
97 | return new MScanListItem( this ); | 98 | return new MScanListItem( this ); |
98 | } | 99 | } |
99 | 100 | ||
100 | 101 | ||
101 | void MScanListView::serializeTo( QDataStream& s) const | 102 | void MScanListView::serializeTo( QDataStream& s) const |
102 | { | 103 | { |
103 | qDebug( "serializing MScanListView" ); | 104 | qDebug( "serializing MScanListView" ); |
104 | OListView::serializeTo( s ); | 105 | OListView::serializeTo( s ); |
105 | } | 106 | } |
106 | 107 | ||
107 | 108 | ||
108 | void MScanListView::serializeFrom( QDataStream& s) | 109 | void MScanListView::serializeFrom( QDataStream& s) |
109 | { | 110 | { |
110 | qDebug( "serializing MScanListView" ); | 111 | qDebug( "serializing MScanListView" ); |
111 | OListView::serializeFrom( s ); | 112 | OListView::serializeFrom( s ); |
112 | } | 113 | } |
113 | 114 | ||
114 | 115 | ||
115 | void MScanListView::addNewItem( const QString& type, const QString& essid, const OMacAddress& mac, bool wep, int channel, int signal ) | 116 | void MScanListView::addNewItem( const QString& type, const QString& essid, const OMacAddress& mac, bool wep, int channel, int signal ) |
116 | { | 117 | { |