summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/protolistview.cpp
authormickeyl <mickeyl>2003-05-08 09:12:24 (UTC)
committer mickeyl <mickeyl>2003-05-08 09:12:24 (UTC)
commit215b9cbd3d1316887674b92268610c8f63a5caaf (patch) (side-by-side diff)
tree92f77edcb0f997cf180d545dd78a40fe23a44169 /noncore/net/wellenreiter/gui/protolistview.cpp
parenteb1dba5550e63ab7b915d55048175e2992ab5447 (diff)
downloadopie-215b9cbd3d1316887674b92268610c8f63a5caaf.zip
opie-215b9cbd3d1316887674b92268610c8f63a5caaf.tar.gz
opie-215b9cbd3d1316887674b92268610c8f63a5caaf.tar.bz2
add fine tuning of parsing process - the semantics is not yet set in stone however...
Diffstat (limited to 'noncore/net/wellenreiter/gui/protolistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index d4b0dfe..f4b45d0 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -28,7 +28,7 @@
ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f )
:QScrollView( parent, name, f )
{
- actions = ( QString( "parsePackets" ) == QString( name ) );
+ parse = ( QString( "parsePackets" ) == QString( name ) );
setMargins( 3, 3, 0, 0 );
viewport()->setBackgroundColor( QCheckBox(0).palette().color( QPalette::Active, QColorGroup::Background ) );
@@ -40,7 +40,7 @@ ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f
QHBox* hbox = new QHBox( vbox );
hbox->setSpacing( 40 );
new QLabel( tr( "Protocol Family" ), hbox );
- if ( actions ) new QLabel( tr( "Perform Action" ), hbox );
+ new QLabel( tr( "Perform Action" ), hbox );
QFrame* frame = new QFrame( vbox );
frame->setFrameStyle( QFrame::HLine + QFrame::Sunken );
@@ -78,13 +78,14 @@ void ProtocolListView::addProtocol( const QString& name )
QHBox* hbox = new QHBox( vbox );
new QCheckBox( name, hbox, (const char*) name );
- if ( actions )
+ if ( parse )
{
QComboBox* combo = new QComboBox( hbox, (const char*) name );
#ifdef QWS
combo->setFixedWidth( 75 );
#endif
combo->insertItem( "Ignore" );
+ combo->insertItem( "Discard!" );
combo->insertItem( "TouchSound" );
combo->insertItem( "AlarmSound" );
combo->insertItem( "KeySound" );
@@ -93,6 +94,15 @@ void ProtocolListView::addProtocol( const QString& name )
combo->insertItem( "LogMessage" );
combo->insertItem( "MessageBox" );
}
+ else
+ {
+ QComboBox* combo = new QComboBox( hbox, (const char*) name );
+ #ifdef QWS
+ combo->setFixedWidth( 75 );
+ #endif
+ combo->insertItem( "Pass" );
+ combo->insertItem( "Discard!" );
+ }
}
@@ -105,9 +115,6 @@ bool ProtocolListView::isProtocolChecked( const QString& name )
QString ProtocolListView::protocolAction( const QString& name )
{
- //QObject * child ( const char * objName, const char * inheritsClass = 0,
- // bool recursiveSearch = TRUE )
-
QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" );
if ( combo )
return combo->currentText();