author | mickeyl <mickeyl> | 2002-12-14 18:30:49 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-14 18:30:49 (UTC) |
commit | 57918323f3b2e1377d9cf97ed6466e31b260d24a (patch) (unidiff) | |
tree | de2cc333e1239464d3af1f23fbe5a6006bcc8e85 /noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |
parent | ade8c5fddf3f125ee276c4c19d1646a9ef4cab08 (diff) | |
download | opie-57918323f3b2e1377d9cf97ed6466e31b260d24a.zip opie-57918323f3b2e1377d9cf97ed6466e31b260d24a.tar.gz opie-57918323f3b2e1377d9cf97ed6466e31b260d24a.tar.bz2 |
- support compilation for Qt/X11
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiterbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.cpp | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index aa94c81..5017b08 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |||
@@ -17,25 +17,30 @@ | |||
17 | 17 | ||
18 | #include <qheader.h> | 18 | #include <qheader.h> |
19 | #include <qlabel.h> | 19 | #include <qlabel.h> |
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 <opie/otabwidget.h> | ||
24 | #include <qlayout.h> | 23 | #include <qlayout.h> |
25 | #include <qvariant.h> | 24 | #include <qvariant.h> |
26 | #include <qtooltip.h> | 25 | #include <qtooltip.h> |
27 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
28 | #include <qimage.h> | 27 | #include <qimage.h> |
29 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
30 | 29 | ||
31 | #include "logwindow.h" | 30 | #include "logwindow.h" |
32 | #include "hexwindow.h" | 31 | #include "hexwindow.h" |
33 | #include "configwindow.h" | 32 | #include "configwindow.h" |
34 | 33 | ||
34 | #ifdef QWS | ||
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | #include <opie/otabwidget.h> | ||
37 | #else | ||
38 | #include "resource.h" | ||
39 | #include <qtabwidget.h> | ||
40 | #endif | ||
36 | 41 | ||
37 | 42 | ||
38 | /* | 43 | /* |
39 | * Constructs a WellenreiterBase which is a child of 'parent', with the | 44 | * Constructs a WellenreiterBase which is a child of 'parent', with the |
40 | * name 'name' and widget flags set to 'f' | 45 | * name 'name' and widget flags set to 'f' |
41 | */ | 46 | */ |
@@ -46,15 +51,17 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f | |||
46 | setName( "WellenreiterBase" ); | 51 | setName( "WellenreiterBase" ); |
47 | resize( 191, 294 ); | 52 | resize( 191, 294 ); |
48 | setCaption( tr( "Wellenreiter" ) ); | 53 | setCaption( tr( "Wellenreiter" ) ); |
49 | WellenreiterBaseLayout = new QVBoxLayout( this ); | 54 | WellenreiterBaseLayout = new QVBoxLayout( this ); |
50 | WellenreiterBaseLayout->setSpacing( 2 ); | 55 | WellenreiterBaseLayout->setSpacing( 2 ); |
51 | WellenreiterBaseLayout->setMargin( 0 ); | 56 | WellenreiterBaseLayout->setMargin( 0 ); |
52 | 57 | #ifdef QWS | |
53 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); | 58 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); |
54 | 59 | #else | |
60 | TabWidget = new QTabWidget( this, "TabWidget" ); | ||
61 | #endif | ||
55 | ap = new QWidget( TabWidget, "ap" ); | 62 | ap = new QWidget( TabWidget, "ap" ); |
56 | apLayout = new QVBoxLayout( ap ); | 63 | apLayout = new QVBoxLayout( ap ); |
57 | apLayout->setSpacing( 2 ); | 64 | apLayout->setSpacing( 2 ); |
58 | apLayout->setMargin( 2 ); | 65 | apLayout->setMargin( 2 ); |
59 | 66 | ||
60 | //--------- NETVIEW TAB -------------- | 67 | //--------- NETVIEW TAB -------------- |
@@ -74,28 +81,26 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f | |||
74 | netview->setColumnAlignment( 5, AlignCenter ); | 81 | netview->setColumnAlignment( 5, AlignCenter ); |
75 | 82 | ||
76 | netview->setFrameShape( QListView::StyledPanel ); | 83 | netview->setFrameShape( QListView::StyledPanel ); |
77 | netview->setFrameShadow( QListView::Sunken ); | 84 | netview->setFrameShadow( QListView::Sunken ); |
78 | netview->setRootIsDecorated( TRUE ); | 85 | netview->setRootIsDecorated( TRUE ); |
79 | apLayout->addWidget( netview ); | 86 | apLayout->addWidget( netview ); |
80 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) ); | 87 | |
81 | 88 | ||
82 | //--------- LOG TAB -------------- | 89 | //--------- LOG TAB -------------- |
83 | 90 | ||
84 | logwindow = new MLogWindow( TabWidget, "Log" ); | 91 | logwindow = new MLogWindow( TabWidget, "Log" ); |
85 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); | 92 | |
86 | 93 | ||
87 | //--------- HEX TAB -------------- | 94 | //--------- HEX TAB -------------- |
88 | 95 | ||
89 | hexwindow = new MHexWindow( TabWidget, "Hex" ); | 96 | hexwindow = new MHexWindow( TabWidget, "Hex" ); |
90 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); | ||
91 | 97 | ||
92 | //--------- CONFIG TAB -------------- | 98 | //--------- CONFIG TAB -------------- |
93 | 99 | ||
94 | configwindow = new WellenreiterConfigWindow( TabWidget, "Config" ); | 100 | configwindow = new WellenreiterConfigWindow( TabWidget, "Config" ); |
95 | TabWidget->addTab( configwindow, "wellenreiter/config", tr( "Config" ) ); | ||
96 | 101 | ||
97 | //--------- ABOUT TAB -------------- | 102 | //--------- ABOUT TAB -------------- |
98 | 103 | ||
99 | about = new QWidget( TabWidget, "about" ); | 104 | about = new QWidget( TabWidget, "about" ); |
100 | aboutLayout = new QGridLayout( about ); | 105 | aboutLayout = new QGridLayout( about ); |
101 | aboutLayout->setSpacing( 6 ); | 106 | aboutLayout->setSpacing( 6 ); |
@@ -126,21 +131,36 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f | |||
126 | "Michael Lauer<br><hr>\n" | 131 | "Michael Lauer<br><hr>\n" |
127 | "<b>www.remote-exploit.org</b>\n" | 132 | "<b>www.remote-exploit.org</b>\n" |
128 | "</p>" ) ); | 133 | "</p>" ) ); |
129 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); | 134 | TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); |
130 | 135 | ||
131 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); | 136 | aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); |
132 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); | ||
133 | WellenreiterBaseLayout->addWidget( TabWidget ); | ||
134 | 137 | ||
135 | button = new QPushButton( this, "button" ); | 138 | button = new QPushButton( this, "button" ); |
136 | button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, button->sizePolicy().hasHeightForWidth() ) ); | 139 | button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, button->sizePolicy().hasHeightForWidth() ) ); |
137 | button->setText( tr( "Start Scanning" ) ); | 140 | button->setText( tr( "Start Scanning" ) ); |
138 | WellenreiterBaseLayout->addWidget( button ); | ||
139 | 141 | ||
142 | #ifdef QWS | ||
143 | TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) ); | ||
144 | TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); | ||
145 | TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); | ||
146 | TabWidget->addTab( configwindow, "wellenreiter/config", tr( "Config" ) ); | ||
147 | TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); | ||
148 | #else | ||
149 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); | ||
150 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); | ||
151 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); | ||
152 | TabWidget->addTab( configwindow, /* "wellenreiter/config", */ tr( "Config" ) ); | ||
153 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); | ||
154 | #endif | ||
155 | WellenreiterBaseLayout->addWidget( TabWidget ); | ||
156 | WellenreiterBaseLayout->addWidget( button ); | ||
157 | |||
158 | #ifdef QWS | ||
140 | TabWidget->setCurrentTab( tr( "Networks" ) ); | 159 | TabWidget->setCurrentTab( tr( "Networks" ) ); |
160 | #endif | ||
141 | 161 | ||
142 | } | 162 | } |
143 | 163 | ||
144 | /* | 164 | /* |
145 | * Destroys the object and frees any allocated resources | 165 | * Destroys the object and frees any allocated resources |
146 | */ | 166 | */ |