-rw-r--r-- | noncore/settings/networksettings/ppp/debug.cpp | 141 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/debug.h | 70 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/kpppwidget.cpp | 26 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/kpppwidget.h | 43 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/ppp.pro | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 1 |
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 | |||
31 | extern KPPPWidget *p_kppp; | ||
32 | |||
33 | myMultiEdit::myMultiEdit(QWidget *parent, const char *name) | ||
34 | : QMultiLineEdit(parent, name) | ||
35 | { | ||
36 | setReadOnly(true); | ||
37 | } | ||
38 | |||
39 | void myMultiEdit::insertChar(unsigned char c) { | ||
40 | QMultiLineEdit::insert(QChar(c)); | ||
41 | } | ||
42 | |||
43 | |||
44 | void myMultiEdit::newLine() { | ||
45 | QMultiLineEdit::newLine(); | ||
46 | } | ||
47 | |||
48 | |||
49 | DebugWidget::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 | |||
80 | void DebugWidget::hideEvent(QHideEvent *) | ||
81 | { | ||
82 | assert(p_kppp); | ||
83 | // p_kppp->con->debug->setOn(false); | ||
84 | } | ||
85 | |||
86 | void DebugWidget::clear() { | ||
87 | text_window->clear(); | ||
88 | } | ||
89 | |||
90 | |||
91 | void 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 | |||
102 | void DebugWidget::statusLabel(const QString &s) { | ||
103 | statuslabel->setText(s); | ||
104 | } | ||
105 | |||
106 | |||
107 | /* | ||
108 | void DebugWidget::keyPressEvent(QKeyEvent *k) { | ||
109 | } | ||
110 | |||
111 | */ | ||
112 | void 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 | |||
124 | void DebugWidget::enter() { | ||
125 | text_window->append("\r\n"); | ||
126 | } | ||
127 | |||
128 | |||
129 | void 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 | |||
34 | class myMultiEdit : public QMultiLineEdit { | ||
35 | public: | ||
36 | |||
37 | myMultiEdit(QWidget *parent=0, const char *name=0); | ||
38 | |||
39 | void newLine(); | ||
40 | void insertChar(unsigned char c); | ||
41 | }; | ||
42 | |||
43 | |||
44 | class DebugWidget : public QDialog { | ||
45 | Q_OBJECT | ||
46 | public: | ||
47 | DebugWidget(QWidget *parent=0, const char *name=0); | ||
48 | |||
49 | void clear(); | ||
50 | |||
51 | public slots: | ||
52 | void statusLabel(const QString &); | ||
53 | void toggleVisibility(); | ||
54 | void addChar(unsigned char); | ||
55 | |||
56 | protected: | ||
57 | virtual void hideEvent(QHideEvent *); | ||
58 | virtual void resizeEvent(QResizeEvent *e); | ||
59 | |||
60 | private: | ||
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 | |||
@@ -241,10 +241,6 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl | |||
241 | // statdlg = new PPPStatsDlg(0, "stats", this, stats); | 241 | // statdlg = new PPPStatsDlg(0, "stats", this, stats); |
242 | // statdlg->hide(); | 242 | // statdlg->hide(); |
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 |
249 | 245 | ||
250 | // resetaccounts(); | 246 | // resetaccounts(); |
@@ -257,14 +253,6 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl | |||
257 | // con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); | 253 | // con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); |
258 | 254 | ||
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()), |
269 | // // this, SLOT(startAccounting())); | 257 | // // this, SLOT(startAccounting())); |
270 | // // connect(con, SIGNAL(stopAccounting()), | 258 | // // connect(con, SIGNAL(stopAccounting()), |
@@ -274,11 +262,6 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl | |||
274 | // connect(qApp, SIGNAL(shutDown()), | 262 | // connect(qApp, SIGNAL(shutDown()), |
275 | // this, SLOT(shutDown())); | 263 | // this, SLOT(shutDown())); |
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 | ||
283 | // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); | 266 | // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); |
284 | 267 | ||
@@ -635,15 +618,6 @@ void KPPPWidget::beginConnect() { | |||
635 | 618 | ||
636 | // con->show(); | 619 | // con->show(); |
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 | ||
648 | emit begin_connect(); | 622 | emit begin_connect(); |
649 | } | 623 | } |
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 | |||
@@ -29,27 +29,12 @@ | |||
29 | 29 | ||
30 | #include <qstring.h> | 30 | #include <qstring.h> |
31 | 31 | ||
32 | //#include "accounting.h" | ||
33 | #include "conwindow.h" | 32 | #include "conwindow.h" |
34 | #include "accounts.h" | 33 | #include "accounts.h" |
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; | ||
42 | class QDialog; | ||
43 | class QPushButton; | 36 | class 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 | ||
54 | class KPPPWidget : public QDialog { | 39 | class KPPPWidget : public QDialog { |
55 | Q_OBJECT | 40 | Q_OBJECT |
@@ -59,19 +44,12 @@ public: | |||
59 | ~KPPPWidget(); | 44 | ~KPPPWidget(); |
60 | 45 | ||
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 | ||
67 | private slots: | 49 | 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 &); |
76 | void passwordChanged(const QString &); | 54 | void passwordChanged(const QString &); |
77 | void enterPressedInID(); | 55 | void enterPressedInID(); |
@@ -79,19 +57,10 @@ private slots: | |||
79 | void saveMyself(); | 57 | void saveMyself(); |
80 | void shutDown(); | 58 | void shutDown(); |
81 | 59 | ||
82 | /* protected slots: */ | ||
83 | /* virtual void accept(); */ | ||
84 | /* virtual void reject(); */ | ||
85 | 60 | ||
86 | public slots: | 61 | public 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 | ||
96 | signals: | 65 | signals: |
97 | void begin_connect(); | 66 | void begin_connect(); |
@@ -100,7 +69,6 @@ signals: | |||
100 | public: | 69 | public: |
101 | QCheckBox *log; | 70 | QCheckBox *log; |
102 | bool connected; | 71 | bool connected; |
103 | DebugWidget *debugwindow; | ||
104 | QString con_speed; | 72 | QString con_speed; |
105 | // ConnectWidget *con; | 73 | // ConnectWidget *con; |
106 | // ConWindow *con_win; | 74 | // ConWindow *con_win; |
@@ -119,7 +87,6 @@ private: | |||
119 | 87 | ||
120 | QString ruleset_load_errmsg; | 88 | QString ruleset_load_errmsg; |
121 | 89 | ||
122 | // QPushButton *help_b; | ||
123 | QPushButton *setup_b; | 90 | QPushButton *setup_b; |
124 | QFrame *fline; | 91 | QFrame *fline; |
125 | QFrame *fline1; | 92 | QFrame *fline1; |
@@ -137,16 +104,6 @@ private: | |||
137 | QLabel *label6; | 104 | QLabel *label6; |
138 | QLabel *radio_label; | 105 | QLabel *radio_label; |
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; */ |
151 | /* bool m_bQuitOnDisconnect; */ | 108 | /* bool m_bQuitOnDisconnect; */ |
152 | /* bool m_bCmdlAccount; */ | 109 | /* bool m_bCmdlAccount; */ |
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 | |||
@@ -4,8 +4,8 @@ TEMPLATE = lib | |||
4 | #CONFIG += qt warn_on release | 4 | #CONFIG += qt warn_on release |
5 | CONFIG += qt warn_on debug | 5 | CONFIG += qt warn_on debug |
6 | DESTDIR = $(OPIEDIR)/plugins/networksettings | 6 | DESTDIR = $(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/ |
10 | DEPENDPATH+= $(OPIEDIR)/include | 10 | DEPENDPATH+= $(OPIEDIR)/include |
11 | LIBS += -lqpe -L../interfaces/ -linterfaces | 11 | LIBS += -lqpe -L../interfaces/ -linterfaces |
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 | |||
@@ -80,6 +80,7 @@ QWidget *PPPModule::information(Interface *i){ | |||
80 | */ | 80 | */ |
81 | QList<Interface> PPPModule::getInterfaces(){ | 81 | 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; |
84 | } | 85 | } |
85 | 86 | ||