summaryrefslogtreecommitdiff
authortille <tille>2003-05-25 00:47:30 (UTC)
committer tille <tille>2003-05-25 00:47:30 (UTC)
commit672a9a2ecd1132aadcf1043946e27339693145a4 (patch) (unidiff)
tree9393acea880576582306679081dc0d7fb16aac6c
parentd1c32c127b4dabb716064a790da6be7c24975a92 (diff)
downloadopie-672a9a2ecd1132aadcf1043946e27339693145a4.zip
opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.gz
opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.bz2
debug window gone
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/debug.cpp141
-rw-r--r--noncore/settings/networksettings/ppp/debug.h70
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp26
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.h43
-rw-r--r--noncore/settings/networksettings/ppp/ppp.pro4
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp1
6 files changed, 3 insertions, 282 deletions
diff --git a/noncore/settings/networksettings/ppp/debug.cpp b/noncore/settings/networksettings/ppp/debug.cpp
deleted file mode 100644
index 447ccf2..0000000
--- a/noncore/settings/networksettings/ppp/debug.cpp
+++ b/dev/null
@@ -1,141 +0,0 @@
1/*
2 * kPPP: A pppd front end for the KDE project
3 *
4 * $Id$
5 * Copyright (C) 1997 Bernd Wuebben
6 * wuebben@math.cornel.edu
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include "debug.h"
24//#include "main.h"
25#include "pppdata.h"
26//#include <klocale.h>
27#define i18n QObject::tr
28#include "kpppwidget.h"
29#include <assert.h>
30
31extern KPPPWidget *p_kppp;
32
33myMultiEdit::myMultiEdit(QWidget *parent, const char *name)
34 : QMultiLineEdit(parent, name)
35{
36 setReadOnly(true);
37}
38
39void myMultiEdit::insertChar(unsigned char c) {
40 QMultiLineEdit::insert(QChar(c));
41}
42
43
44void myMultiEdit::newLine() {
45 QMultiLineEdit::newLine();
46}
47
48
49DebugWidget::DebugWidget(QWidget *parent, const char *name)
50 : QDialog(parent, name, FALSE)
51{
52 setCaption(i18n("Login Script Debug Window"));
53
54 text_window = new myMultiEdit(this,"debugwindow");
55 text_window->setGeometry(2,5,400, 300);
56 // text_window->setReadOnly(FALSE);
57
58 statuslabel = new QLabel("", this, "statuslabel");
59
60 statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
61 statuslabel->setAlignment( AlignLeft|AlignVCenter );
62 statuslabel->setGeometry(2, 307, 400, 20);
63 //statusPageLabel->setFont( QFont("helvetica",12,QFont::Normal) );
64
65 dismiss = new QPushButton(this);
66 dismiss->setGeometry(330,340,70,30);
67 dismiss->setText(i18n("Close"));
68 dismiss->setFocus();
69 connect(dismiss, SIGNAL(clicked()), SLOT(hide()));
70
71
72 /* fline = new QFrame(this,"line");
73 fline->setFrameStyle(QFrame::HLine |QFrame::Sunken);
74 fline->setGeometry(2,332,398,5);*/
75 adjustSize();
76 setMinimumSize(width(),height());
77
78}
79
80void DebugWidget::hideEvent(QHideEvent *)
81{
82 assert(p_kppp);
83// p_kppp->con->debug->setOn(false);
84}
85
86void DebugWidget::clear() {
87 text_window->clear();
88}
89
90
91void DebugWidget::addChar(unsigned char c) {
92 QString stuff;
93
94 if(c == '\r' || c == '\n') {
95 if(c == '\n')
96 text_window->newLine();
97 } else
98 text_window->insertChar(c);
99}
100
101
102void DebugWidget::statusLabel(const QString &s) {
103 statuslabel->setText(s);
104}
105
106
107/*
108void DebugWidget::keyPressEvent(QKeyEvent *k) {
109}
110
111*/
112void DebugWidget::resizeEvent(QResizeEvent *e){
113 int w = width() ;
114 int h = height();
115 e = e;
116
117 text_window->setGeometry(2,5,w - 2 ,h - 63);
118 statuslabel->setGeometry(2, h - 56 , w -2 , 20);
119 dismiss->setGeometry(w - 72 , h - 32, 70, 30);
120 // fline->setGeometry(2,h -70 ,w - 4,5);
121}
122
123
124void DebugWidget::enter() {
125 text_window->append("\r\n");
126}
127
128
129void DebugWidget::toggleVisibility() {
130 if(isVisible())
131 hide();
132 else
133 show();
134
135 bool showlog = isVisible();
136 PPPData::data()->set_show_log_window(showlog);
137}
138
139
140
141
diff --git a/noncore/settings/networksettings/ppp/debug.h b/noncore/settings/networksettings/ppp/debug.h
deleted file mode 100644
index 3565cec..0000000
--- a/noncore/settings/networksettings/ppp/debug.h
+++ b/dev/null
@@ -1,70 +0,0 @@
1/*
2 * kPPP: A pppd front end for the KDE project
3 *
4 * $Id$
5 * Copyright (C) 1997 Bernd Wuebben
6 * wuebben@math.cornel.edu
7 *
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
18 *
19 * You should have received a copy of the GNU Library General Public
20 * License along with this program; if not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */
23
24#ifndef _DEBUGWIDGET_
25#define _DEBUGWIDGET_
26
27#include <qdialog.h>
28#include <qstring.h>
29#include <qlabel.h>
30#include <qmultilineedit.h>
31#include <qpushbutton.h>
32
33
34class myMultiEdit : public QMultiLineEdit {
35public:
36
37 myMultiEdit(QWidget *parent=0, const char *name=0);
38
39 void newLine();
40 void insertChar(unsigned char c);
41};
42
43
44class DebugWidget : public QDialog {
45 Q_OBJECT
46public:
47 DebugWidget(QWidget *parent=0, const char *name=0);
48
49 void clear();
50
51public slots:
52 void statusLabel(const QString &);
53 void toggleVisibility();
54 void addChar(unsigned char);
55
56protected:
57 virtual void hideEvent(QHideEvent *);
58 virtual void resizeEvent(QResizeEvent *e);
59
60private:
61 void enter();
62 QFrame *fline;
63 QPushButton *dismiss;
64 myMultiEdit *text_window;
65
66 QLabel *statuslabel;
67};
68
69#endif
70
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp
index 8d70cd4..f8a8dc3 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.cpp
+++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp
@@ -243,6 +243,2 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl
243 243
244 debugwindow = new DebugWidget(0,"debugwindow");
245 // KWin::setIcons(debugwindow->winId(), kapp->icon(), kapp->miniIcon());
246 debugwindow->hide();
247
248 // load up the accounts combo box 244 // load up the accounts combo box
@@ -259,10 +255,2 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl
259 // connect the ConnectWidgets various signals 255 // connect the ConnectWidgets various signals
260// connect(con, SIGNAL(closeDebugWindow()),
261 // debugwindow, SLOT(hide()));
262// connect(con, SIGNAL(debugMessage(const QString &)),
263 // debugwindow, SLOT(statusLabel(const QString &)));
264// connect(con, SIGNAL(toggleDebugWindow()),
265 // debugwindow, SLOT(toggleVisibility()));
266// connect(con, SIGNAL(debugPutChar(unsigned char)),
267 // debugwindow, SLOT(addChar(unsigned char)));
268// // connect(con, SIGNAL(startAccounting()), 256// // connect(con, SIGNAL(startAccounting()),
@@ -276,7 +264,2 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl
276 264
277// debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55,
278 // debugwindow->width(),debugwindow->height());
279
280// move(desk.center().x()-width()/2, desk.center().y()-height()/2);
281
282 265
@@ -637,11 +620,2 @@ void KPPPWidget::beginConnect() {
637 620
638 bool show_debug = PPPData::data()->get_show_log_window();
639 // con->debug->setOn(show_debug);// toggle button
640 debugwindow->clear();
641 if (!show_debug)
642 debugwindow->hide();
643 else {
644 debugwindow->show();
645// con->raise();
646 }
647 621
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.h b/noncore/settings/networksettings/ppp/kpppwidget.h
index 266d829..d7e74af 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.h
+++ b/noncore/settings/networksettings/ppp/kpppwidget.h
@@ -31,3 +31,2 @@
31 31
32//#include "accounting.h"
33#include "conwindow.h" 32#include "conwindow.h"
@@ -35,19 +34,5 @@
35#include "connect.h" 34#include "connect.h"
36#include "debug.h"
37//#include "pppstatdlg.h"
38 35
39//class GraphSetup;
40//class AboutWidget;
41//class PPPStats;
42class QDialog;
43class QPushButton; 36class QPushButton;
44 37
45/* class SignalEvent : public QEvent { */
46/* public: */
47/* SignalEvent(int s) : QEvent(User), sig(s) { } */
48/* int sigType() const { return sig; } */
49/* private: */
50/* int sig; */
51/* }; */
52
53 38
@@ -61,6 +46,3 @@ public:
61 void setPW_Edit(const QString &); 46 void setPW_Edit(const QString &);
62 // virtual bool eventFilter(QObject *, QEvent *);
63 47
64 void setQuitOnDisconnect (bool b);
65 // bool quitOnDisconnect () {return m_bQuitOnDisconnect;};
66 48
@@ -68,8 +50,4 @@ private slots:
68 void newdefaultaccount(int); 50 void newdefaultaccount(int);
69// void expandbutton();
70 void beginConnect(); 51 void beginConnect();
71 void quitbutton(); 52 void quitbutton();
72 // void helpbutton();
73 // void setup();
74 // void rulesetLoadError();
75 void usernameChanged(const QString &); 53 void usernameChanged(const QString &);
@@ -81,15 +59,6 @@ private slots:
81 59
82/* protected slots: */
83/* virtual void accept(); */
84/* virtual void reject(); */
85 60
86public slots: 61public slots:
87 // void resetaccounts();
88/* void resetCosts(const QString &); */
89/* void resetVolume(const QString &); */
90 void disconnect(); 62 void disconnect();
91 void log_window_toggled(bool on); 63 void log_window_toggled(bool on);
92/* void startAccounting(); */
93/* void stopAccounting(); */
94/* void showStats(); */
95 64
@@ -102,3 +71,2 @@ public:
102 bool connected; 71 bool connected;
103 DebugWidget *debugwindow;
104 QString con_speed; 72 QString con_speed;
@@ -121,3 +89,2 @@ private:
121 89
122 // QPushButton *help_b;
123 QPushButton *setup_b; 90 QPushButton *setup_b;
@@ -139,12 +106,2 @@ private:
139 106
140
141 // QTabWidget *tabWindow;
142 // AccountWidget *accounts;
143 // GeneralWidget *general;
144 // ModemWidget *modem1;
145 // ModemWidget2 *modem2;
146 // GraphSetup *graph;
147 // AboutWidget *about;
148
149
150/* QString m_strCmdlAccount; */ 107/* QString m_strCmdlAccount; */
diff --git a/noncore/settings/networksettings/ppp/ppp.pro b/noncore/settings/networksettings/ppp/ppp.pro
index ebfc713..a2e0118 100644
--- a/noncore/settings/networksettings/ppp/ppp.pro
+++ b/noncore/settings/networksettings/ppp/ppp.pro
@@ -6,4 +6,4 @@ CONFIG += qt warn_on debug
6DESTDIR = $(OPIEDIR)/plugins/networksettings 6DESTDIR = $(OPIEDIR)/plugins/networksettings
7 HEADERS = pppmodule.h devices.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h knuminput.h knumvalidator.h kpppwidget.h conwindow.h debug.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h 7 HEADERS = pppmodule.h devices.h modem.h modeminfo.h pppdata.h kpppconfig.h pppdata.h runtests.h general.h modemcmds.h knuminput.h knumvalidator.h kpppwidget.h conwindow.h accounts.h connect.h edit.h scriptedit.h pppdargs.h iplined.h pwentry.h pppconfig.h
8 SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp knuminput.cpp knumvalidator.cpp kpppwidget.cpp conwindow.cpp debug.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp 8 SOURCES = pppmodule.cpp modem.cpp modeminfo.cpp pppdata.cpp runtests.cpp general.cpp modemcmds.cpp knuminput.cpp knumvalidator.cpp kpppwidget.cpp conwindow.cpp accounts.cpp connect.cpp edit.cpp scriptedit.cpp pppdargs.cpp iplined.cpp pwentry.cpp pppconfig.cpp
9 INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/ 9 INCLUDEPATH+= $(OPIEDIR)/include ../ ../interfaces/
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index e13f8c8..fb2f3e5 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -82,2 +82,3 @@ QList<Interface> PPPModule::getInterfaces(){
82 // List all of the files in the peer directory 82 // List all of the files in the peer directory
83 qDebug("PPPModule::getInterfaces");
83 return list; 84 return list;