summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/protolistview.cpp
authormickeyl <mickeyl>2003-05-05 22:27:02 (UTC)
committer mickeyl <mickeyl>2003-05-05 22:27:02 (UTC)
commit58a78cbe1bc5ded219ba23432041f20e03404403 (patch) (side-by-side diff)
treee06706f3cbd0303cdcd52ab4a94650b2059ed07c /noncore/net/wellenreiter/gui/protolistview.cpp
parent3f8c29b3cbbb32864694fe9c95b43d1cb777360e (diff)
downloadopie-58a78cbe1bc5ded219ba23432041f20e03404403.zip
opie-58a78cbe1bc5ded219ba23432041f20e03404403.tar.gz
opie-58a78cbe1bc5ded219ba23432041f20e03404403.tar.bz2
major overhaul of the configuration window - showing what will come soon...
Diffstat (limited to 'noncore/net/wellenreiter/gui/protolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp95
1 files changed, 95 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index e69de29..8b86072 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -0,0 +1,95 @@
+/**********************************************************************
+** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
+**
+** This file is part of Opie Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+**********************************************************************/
+
+/* LOCAL */
+#include "protolistview.h"
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qhbox.h>
+#include <qvbox.h>
+#include <qpalette.h>
+#include <qcolor.h>
+#include <qlabel.h>
+#include <qframe.h>
+
+ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f )
+ :QScrollView( parent, name, f )
+{
+ actions = ( QString( "parsePackets" ) == QString( name ) );
+
+ setMargins( 3, 3, 0, 0 );
+ viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) );
+
+ vbox = new QVBox( viewport() );
+ vbox->setSpacing( 1 );
+ addChild( vbox );
+
+ QHBox* hbox = new QHBox( vbox );
+ hbox->setSpacing( 40 );
+ new QLabel( tr( "Protocol Family" ), hbox );
+ if ( actions ) new QLabel( tr( "Perform Action" ), hbox );
+ QFrame* frame = new QFrame( vbox );
+ frame->setFrameStyle( QFrame::HLine + QFrame::Sunken );
+
+ //TODO: hardcoded for now...a protocol database would be nice!?
+
+ //addProtocol( "Ethernet" );
+ addProtocol( "Prism" );
+ //addProtocol( "802.11" );
+ addProtocol( "802.11 Management" );
+ addProtocol( "802.11 SSID" );
+ addProtocol( "802.11 Rates" );
+ addProtocol( "802.11 CF" );
+ addProtocol( "802.11 FH" );
+ addProtocol( "802.11 DS" );
+ addProtocol( "802.11 Tim" );
+ addProtocol( "802.11 IBSS" );
+ addProtocol( "802.11 Challenge" );
+ addProtocol( "802.11 Data" );
+ addProtocol( "802.11 LLC" );
+ addProtocol( "802.11 Data" );
+ addProtocol( "IP" );
+ addProtocol( "ARP" );
+ addProtocol( "UDP" );
+ addProtocol( "TCP" );
+}
+
+
+ProtocolListView::~ProtocolListView()
+{
+}
+
+
+void ProtocolListView::addProtocol( const QString& name )
+{
+ QHBox* hbox = new QHBox( vbox );
+ new QCheckBox( name, hbox, (const char*) name );
+
+ if ( actions )
+ {
+ QComboBox* combo = new QComboBox( hbox, (const char*) name );
+ #ifdef QWS
+ combo->setFixedWidth( 75 );
+ #endif
+ combo->insertItem( "Ignore" );
+ combo->insertItem( "TouchSound" );
+ combo->insertItem( "AlarmSound" );
+ combo->insertItem( "KeySound" );
+ combo->insertItem( "LedOn" );
+ combo->insertItem( "LedOff" );
+ }
+}
+