summaryrefslogtreecommitdiff
authorzecke <zecke>2004-08-24 13:09:19 (UTC)
committer zecke <zecke>2004-08-24 13:09:19 (UTC)
commit102bb2b65c71da12c4f9f1ce7a5d1b37b6eb50ee (patch) (unidiff)
tree7fc5bdf7ec22b8383c5cafc46f733a1db7cdd326
parentb06390cb17114692a9fd5233d77620b385252480 (diff)
downloadopie-102bb2b65c71da12c4f9f1ce7a5d1b37b6eb50ee.zip
opie-102bb2b65c71da12c4f9f1ce7a5d1b37b6eb50ee.tar.gz
opie-102bb2b65c71da12c4f9f1ce7a5d1b37b6eb50ee.tar.bz2
Minor adjustment to the patch:
-insertLine already adds a \n -add a slotTabChanged slot in wellenreiterbase
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index a83f700..5f97f8e 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -1,58 +1,58 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Wellenreiter II. 4** This file is part of Wellenreiter II.
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 "logwindow.h" 16#include "logwindow.h"
17 17
18/* OPIE */ 18/* OPIE */
19#include <opie2/odebug.h> 19#include <opie2/odebug.h>
20using namespace Opie::Core; 20using namespace Opie::Core;
21 21
22/* QT */ 22/* QT */
23#include <qmultilineedit.h> 23#include <qmultilineedit.h>
24#include <qdatetime.h> 24#include <qdatetime.h>
25 25
26MLogWindow* MLogWindow::_instance; 26MLogWindow* MLogWindow::_instance;
27 27
28MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) 28MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
29 :QVBox( parent, name, f ) 29 :QVBox( parent, name, f )
30{ 30{
31 ledit = new QMultiLineEdit( this ); 31 ledit = new QMultiLineEdit( this );
32 ledit->setReadOnly( true ); 32 ledit->setReadOnly( true );
33 ledit->setUndoEnabled( false ); 33 ledit->setUndoEnabled( false );
34 34
35 35
36 MLogWindow::_instance = this; 36 MLogWindow::_instance = this;
37} 37}
38 38
39 39
40void MLogWindow::log( QString text ) 40void MLogWindow::log( QString text )
41{ 41{
42 QTime time = QTime::currentTime(); 42 QTime time = QTime::currentTime();
43 QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text ); 43 QString line = QString( "[%1] %2" ).arg(time.toString() ).arg( text );
44 ledit->insertLine( line ); 44 ledit->insertLine( line );
45 odebug << line << oendl; 45 odebug << line << oendl;
46} 46}
47 47
48 48
49void MLogWindow::clear() 49void MLogWindow::clear()
50{ 50{
51 ledit->clear(); 51 ledit->clear();
52} 52}
53 53
54 54
55const QString MLogWindow::getLog() const 55const QString MLogWindow::getLog() const
56{ 56{
57 return ledit->text(); 57 return ledit->text();
58} 58}
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h
index e40b699..c39be48 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.h
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h
@@ -10,68 +10,70 @@
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#ifndef WELLENREITERBASE_H 16#ifndef WELLENREITERBASE_H
17#define WELLENREITERBASE_H 17#define WELLENREITERBASE_H
18 18
19#include <qvariant.h> 19#include <qvariant.h>
20#include <qwidget.h> 20#include <qwidget.h>
21class QVBoxLayout; 21class QVBoxLayout;
22class QHBoxLayout; 22class QHBoxLayout;
23class QGridLayout; 23class QGridLayout;
24class QLabel; 24class QLabel;
25class MScanListView; 25class MScanListView;
26class MScanListItem; 26class MScanListItem;
27class QPushButton; 27class QPushButton;
28class MLogWindow; 28class MLogWindow;
29class MStatWindow; 29class MStatWindow;
30class MGraphWindow; 30class MGraphWindow;
31class PacketView; 31class PacketView;
32 32
33#ifdef QWS 33#ifdef QWS
34#include <opie2/otabwidget.h> 34#include <opie2/otabwidget.h>
35using namespace Opie; 35using namespace Opie;
36#else 36#else
37class QTabWidget; 37class QTabWidget;
38#endif 38#endif
39 39
40class WellenreiterBase : public QWidget 40class WellenreiterBase : public QWidget
41{ 41{
42 Q_OBJECT 42 Q_OBJECT
43 43
44public: 44public:
45 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 45 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
46 ~WellenreiterBase(); 46 ~WellenreiterBase();
47 47
48#ifdef QWS 48#ifdef QWS
49 Opie::Ui::OTabWidget* TabWidget; 49 Opie::Ui::OTabWidget* TabWidget;
50#else 50#else
51 QTabWidget* TabWidget; 51 QTabWidget* TabWidget;
52#endif 52#endif
53 QWidget* ap; 53 QWidget* ap;
54 MScanListView* netview; 54 MScanListView* netview;
55 MLogWindow* logwindow; 55 MLogWindow* logwindow;
56 PacketView* hexwindow; 56 PacketView* hexwindow;
57 MStatWindow* statwindow; 57 MStatWindow* statwindow;
58 MGraphWindow* graphwindow; 58 MGraphWindow* graphwindow;
59 QWidget* about; 59 QWidget* about;
60 QLabel* PixmapLabel1_3_2; 60 QLabel* PixmapLabel1_3_2;
61 QLabel* TextLabel1_4_2; 61 QLabel* TextLabel1_4_2;
62 62
63protected: 63protected:
64 QVBoxLayout* WellenreiterBaseLayout; 64 QVBoxLayout* WellenreiterBaseLayout;
65 QVBoxLayout* apLayout; 65 QVBoxLayout* apLayout;
66 QGridLayout* aboutLayout; 66 QGridLayout* aboutLayout;
67 bool event( QEvent* ); 67 bool event( QEvent* );
68 68
69 QPixmap* ani1; 69 QPixmap* ani1;
70 QPixmap* ani2; 70 QPixmap* ani2;
71 QPixmap* ani3; 71 QPixmap* ani3;
72 QPixmap* ani4; 72 QPixmap* ani4;
73 73
74private slots:
75 virtual void slotTabChanged( QWidget* ) = 0;
74 76
75}; 77};
76 78
77#endif // WELLENREITERBASE_H 79#endif // WELLENREITERBASE_H