author | mickeyl <mickeyl> | 2003-02-23 15:14:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-02-23 15:14:18 (UTC) |
commit | 9b7faae2ec12eeb9a056ca6093ac6e0840b11717 (patch) (unidiff) | |
tree | fc4d9de4ee2fd5c502513ccf0fa592bfaaa87185 /noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |
parent | 791c7512c530cb373726f9c01e26229cb8ca992a (diff) | |
download | opie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.zip opie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.tar.gz opie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.tar.bz2 |
- revamped part of the gui
- configuration is now a seperate dialog
- orinoco_hopper is no longer needed
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiterbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.cpp | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index da12f2b..3a703bc 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |||
@@ -20,25 +20,24 @@ | |||
20 | #include <qlistview.h> | 20 | #include <qlistview.h> |
21 | #include <qmultilineedit.h> | 21 | #include <qmultilineedit.h> |
22 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
23 | #include <qlayout.h> | 23 | #include <qlayout.h> |
24 | #include <qvariant.h> | 24 | #include <qvariant.h> |
25 | #include <qtooltip.h> | 25 | #include <qtooltip.h> |
26 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
27 | #include <qimage.h> | 27 | #include <qimage.h> |
28 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
29 | 29 | ||
30 | #include "logwindow.h" | 30 | #include "logwindow.h" |
31 | #include "hexwindow.h" | 31 | #include "hexwindow.h" |
32 | #include "configwindow.h" | ||
33 | #include "scanlist.h" | 32 | #include "scanlist.h" |
34 | 33 | ||
35 | #ifdef QWS | 34 | #ifdef QWS |
36 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
37 | #include <opie/otabwidget.h> | 36 | #include <opie/otabwidget.h> |
38 | #else | 37 | #else |
39 | #include "resource.h" | 38 | #include "resource.h" |
40 | #include <qtabwidget.h> | 39 | #include <qtabwidget.h> |
41 | #endif | 40 | #endif |
42 | 41 | ||
43 | 42 | ||
44 | /* | 43 | /* |
@@ -46,115 +45,108 @@ | |||
46 | * name 'name' and widget flags set to 'f' | 45 | * name 'name' and widget flags set to 'f' |
47 | */ | 46 | */ |
48 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) | 47 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) |
49 | : QWidget( parent, name, fl ) | 48 | : QWidget( parent, name, fl ) |
50 | { | 49 | { |
51 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); | 50 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); |
52 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); | 51 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); |
53 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); | 52 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); |
54 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); | 53 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); |
55 | 54 | ||
56 | if ( !name ) | 55 | if ( !name ) |
57 | setName( "WellenreiterBase" ); | 56 | setName( "WellenreiterBase" ); |
58 | resize( 191, 294 ); | 57 | resize( 191, 294 ); |
59 | setCaption( tr( "Wellenreiter" ) ); | 58 | #ifdef QWS |
60 | WellenreiterBaseLayout = new QVBoxLayout( this ); | 59 | setCaption( tr( "Wellenreiter/Opie" ) ); |
60 | #else | ||
61 | setCaption( tr( "Wellenreiter/X11" ) ); | ||
62 | #endif | ||
63 | WellenreiterBaseLayout = new QVBoxLayout( this ); | ||
61 | WellenreiterBaseLayout->setSpacing( 2 ); | 64 | WellenreiterBaseLayout->setSpacing( 2 ); |
62 | WellenreiterBaseLayout->setMargin( 0 ); | 65 | WellenreiterBaseLayout->setMargin( 0 ); |
63 | #ifdef QWS | 66 | #ifdef QWS |
64 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); | 67 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); |
65 | #else | 68 | #else |
66 | TabWidget = new QTabWidget( this, "TabWidget" ); | 69 | TabWidget = new QTabWidget( this, "TabWidget" ); |
67 | #endif | 70 | #endif |
68 | ap = new QWidget( TabWidget, "ap" ); | 71 | ap = new QWidget( TabWidget, "ap" ); |
69 | apLayout = new QVBoxLayout( ap ); | 72 | apLayout = new QVBoxLayout( ap ); |
70 | apLayout->setSpacing( 2 ); | 73 | apLayout->setSpacing( 2 ); |
71 | apLayout->setMargin( 2 ); | 74 | apLayout->setMargin( 2 ); |
72 | 75 | ||
73 | //--------- NETVIEW TAB -------------- | 76 | //--------- NETVIEW TAB -------------- |
74 | 77 | ||
75 | netview = new MScanListView( ap ); | 78 | netview = new MScanListView( ap ); |
76 | apLayout->addWidget( netview ); | 79 | apLayout->addWidget( netview ); |
77 | 80 | ||
78 | 81 | ||
79 | //--------- LOG TAB -------------- | 82 | //--------- LOG TAB -------------- |
80 | 83 | ||
81 | logwindow = new MLogWindow( TabWidget, "Log" ); | 84 | logwindow = new MLogWindow( TabWidget, "Log" ); |
82 | 85 | ||
83 | 86 | ||
84 | //--------- HEX TAB -------------- | 87 | //--------- HEX TAB -------------- |
85 | 88 | ||
86 | hexwindow = new MHexWindow( TabWidget, "Hex" ); | 89 | hexwindow = new MHexWindow( TabWidget, "Hex" ); |
87 | 90 | ||
88 | //--------- CONFIG TAB -------------- | ||
89 | |||
90 | configwindow = new WellenreiterConfigWindow( TabWidget, "Config" ); | ||
91 | |||
92 | //--------- ABOUT TAB -------------- | 91 | //--------- ABOUT TAB -------------- |
93 | 92 | ||
94 | about = new QWidget( TabWidget, "about" ); | 93 | about = new QWidget( TabWidget, "about" ); |
95 | aboutLayout = new QGridLayout( about ); | 94 | aboutLayout = new QGridLayout( about ); |
96 | aboutLayout->setSpacing( 6 ); | 95 | aboutLayout->setSpacing( 6 ); |
97 | aboutLayout->setMargin( 11 ); | 96 | aboutLayout->setMargin( 11 ); |
98 | 97 | ||
99 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); | 98 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); |
100 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); | 99 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); |
101 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); | 100 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); |
102 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); | 101 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); |
103 | PixmapLabel1_3_2->setLineWidth( 2 ); | 102 | PixmapLabel1_3_2->setLineWidth( 2 ); |
104 | PixmapLabel1_3_2->setMargin( 0 ); | 103 | PixmapLabel1_3_2->setMargin( 0 ); |
105 | PixmapLabel1_3_2->setMidLineWidth( 0 ); | 104 | PixmapLabel1_3_2->setMidLineWidth( 0 ); |
106 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); | 105 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); |
107 | PixmapLabel1_3_2->setScaledContents( TRUE ); | 106 | PixmapLabel1_3_2->setScaledContents( TRUE ); |
108 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); | 107 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); |
109 | 108 | ||
110 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); | 109 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); |
111 | 110 | ||
112 | TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" ); | 111 | TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" ); |
113 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); | 112 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); |
114 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); | 113 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); |
115 | TextLabel1_4_2_font.setPointSize( 10 ); | 114 | TextLabel1_4_2_font.setPointSize( 10 ); |
116 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); | 115 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); |
117 | TextLabel1_4_2->setText( tr( "<p align=center>\n" | 116 | TextLabel1_4_2->setText( tr( "<p align=center>\n" |
118 | "<hr>\n" | 117 | "<hr>\n" |
119 | "Max Moser<br>\n" | 118 | "Max Moser<br>\n" |
120 | "Martin J. Muench<br>\n" | 119 | "Martin J. Muench<br>\n" |
121 | "Michael Lauer<br><hr>\n" | 120 | "Michael Lauer<br><hr>\n" |
122 | "<b>www.remote-exploit.org</b>\n" | 121 | "<b>www.remote-exploit.org</b>\n" |
123 | "</p>" ) ); | 122 | "</p>" ) ); |
124 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); | 123 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); |
125 | 124 | ||
126 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); | 125 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); |
127 | |||
128 | button = new QPushButton( this, "button" ); | ||
129 | button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, button->sizePolicy().hasHeightForWidth() ) ); | ||
130 | button->setText( tr( "Start Scanning" ) ); | ||
131 | 126 | ||
132 | #ifdef QWS | 127 | #ifdef QWS |
133 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) ); | 128 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) ); |
134 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); | 129 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); |
135 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); | 130 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); |
136 | TabWidget->addTab( configwindow, "wellenreiter/config", tr( "Config" ) ); | ||
137 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); | 131 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); |
138 | #else | 132 | #else |
139 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); | 133 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); |
140 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); | 134 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); |
141 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); | 135 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); |
142 | TabWidget->addTab( configwindow, /* "wellenreiter/config", */ tr( "Config" ) ); | ||
143 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); | 136 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); |
144 | #endif | 137 | #endif |
145 | WellenreiterBaseLayout->addWidget( TabWidget ); | 138 | WellenreiterBaseLayout->addWidget( TabWidget ); |
146 | WellenreiterBaseLayout->addWidget( button ); | ||
147 | 139 | ||
148 | #ifdef QWS | 140 | #ifdef QWS |
149 | TabWidget->setCurrentTab( tr( "Networks" ) ); | 141 | TabWidget->setCurrentTab( tr( "Networks" ) ); |
150 | #endif | 142 | #endif |
151 | 143 | ||
152 | } | 144 | } |
153 | 145 | ||
154 | /* | 146 | /* |
155 | * Destroys the object and frees any allocated resources | 147 | * Destroys the object and frees any allocated resources |
156 | */ | 148 | */ |
157 | WellenreiterBase::~WellenreiterBase() | 149 | WellenreiterBase::~WellenreiterBase() |
158 | { | 150 | { |
159 | // no need to delete child widgets, Qt does it all for us | 151 | // no need to delete child widgets, Qt does it all for us |
160 | } | 152 | } |