summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 27ecae3..868b0b0 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -1,40 +1,41 @@
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 "configwindow.h" 16#include "configwindow.h"
17#include "gps.h"
17#include "logwindow.h" 18#include "logwindow.h"
18#include "hexwindow.h" 19#include "hexwindow.h"
19#include "mainwindow.h" 20#include "mainwindow.h"
20#include "wellenreiter.h" 21#include "wellenreiter.h"
21#include "scanlist.h" 22#include "scanlist.h"
22 23
23#include <qcombobox.h> 24#include <qcombobox.h>
24#include <qdatastream.h> 25#include <qdatastream.h>
25#include <qfile.h> 26#include <qfile.h>
26#include <qfileinfo.h> 27#include <qfileinfo.h>
27#include <qiconset.h> 28#include <qiconset.h>
28#include <qmenubar.h> 29#include <qmenubar.h>
29#include <qmessagebox.h> 30#include <qmessagebox.h>
30#include <qpopupmenu.h> 31#include <qpopupmenu.h>
31#include <qstatusbar.h> 32#include <qstatusbar.h>
32#include <qtextstream.h> 33#include <qtextstream.h>
33#include <qtoolbutton.h> 34#include <qtoolbutton.h>
34 35
35#ifdef QWS 36#ifdef QWS
36#include <qpe/resource.h> 37#include <qpe/resource.h>
37#include <opie/ofiledialog.h> 38#include <opie/ofiledialog.h>
38#else 39#else
39#include "resource.h" 40#include "resource.h"
40#include <qapplication.h> 41#include <qapplication.h>
@@ -197,53 +198,53 @@ void WellenreiterMainWindow::updateToolButtonState()
197} 198}
198 199
199 200
200void WellenreiterMainWindow::changedSniffingState() 201void WellenreiterMainWindow::changedSniffingState()
201{ 202{
202 startButton->setEnabled( !mw->sniffing ); 203 startButton->setEnabled( !mw->sniffing );
203 menuBar()->setItemEnabled( startID, !mw->sniffing ); 204 menuBar()->setItemEnabled( startID, !mw->sniffing );
204 stopButton->setEnabled( mw->sniffing ); 205 stopButton->setEnabled( mw->sniffing );
205 menuBar()->setItemEnabled( stopID, mw->sniffing ); 206 menuBar()->setItemEnabled( stopID, mw->sniffing );
206} 207}
207 208
208 209
209WellenreiterMainWindow::~WellenreiterMainWindow() 210WellenreiterMainWindow::~WellenreiterMainWindow()
210{ 211{
211 delete infoIconSet; 212 delete infoIconSet;
212 delete settingsIconSet; 213 delete settingsIconSet;
213 delete startIconSet; 214 delete startIconSet;
214 delete stopIconSet; 215 delete stopIconSet;
215}; 216};
216 217
217void WellenreiterMainWindow::demoAddStations() 218void WellenreiterMainWindow::demoAddStations()
218{ 219{
219 //mw = 0; // test SIGSGV handling 220 //mw = 0; // test SIGSGV handling
220 221
221 mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:00:20:EF:A6:43"), true, 6, 80 ); 222 mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:00:20:EF:A6:43"), true, 6, 80, GpsLocation( 10.10, 20.20 ) );
222 mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:30:6D:EF:A6:23"), true, 11, 10 ); 223 mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:30:6D:EF:A6:23"), true, 11, 10, GpsLocation( 0.0, 0.0 ) );
223 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:A0:F8:E7:16:22"), false, 3, 10 ); 224 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:A0:F8:E7:16:22"), false, 3, 10, GpsLocation( 5.5, 2.3 ) );
224 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:AA:01:E7:56:62"), false, 3, 15 ); 225 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:AA:01:E7:56:62"), false, 3, 15, GpsLocation( 2.3, 5.5 ) );
225 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:B0:8E:E7:56:E2"), false, 3, 20 ); 226 mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:B0:8E:E7:56:E2"), false, 3, 20, GpsLocation( -10.0, -20.5 ) );
226} 227}
227 228
228 229
229QString WellenreiterMainWindow::getFileName( bool save ) 230QString WellenreiterMainWindow::getFileName( bool save )
230{ 231{
231 QMap<QString, QStringList> map; 232 QMap<QString, QStringList> map;
232 map.insert( tr("All"), QStringList() ); 233 map.insert( tr("All"), QStringList() );
233 QStringList text; 234 QStringList text;
234 text << "text/*"; 235 text << "text/*";
235 map.insert( tr("Text"), text ); 236 map.insert( tr("Text"), text );
236 text << "*"; 237 text << "*";
237 map.insert( tr("All"), text ); 238 map.insert( tr("All"), text );
238 239
239 QString str; 240 QString str;
240 if ( save ) 241 if ( save )
241 { 242 {
242 #ifdef QWS 243 #ifdef QWS
243 str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); 244 str = OFileDialog::getSaveFileName( 2, "/", QString::null, map );
244 #else 245 #else
245 str = QFileDialog::getSaveFileName(); 246 str = QFileDialog::getSaveFileName();
246 #endif 247 #endif
247 if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ ) 248 if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ )
248 return ""; 249 return "";
249 } 250 }