author | tille <tille> | 2003-05-25 00:47:30 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-25 00:47:30 (UTC) |
commit | 672a9a2ecd1132aadcf1043946e27339693145a4 (patch) (side-by-side diff) | |
tree | 9393acea880576582306679081dc0d7fb16aac6c | |
parent | d1c32c127b4dabb716064a790da6be7c24975a92 (diff) | |
download | opie-672a9a2ecd1132aadcf1043946e27339693145a4.zip opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.gz opie-672a9a2ecd1132aadcf1043946e27339693145a4.tar.bz2 |
debug window gone
-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 @@ -/* - * kPPP: A pppd front end for the KDE project - * - * $Id$ - * Copyright (C) 1997 Bernd Wuebben - * wuebben@math.cornel.edu - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#include "debug.h" -//#include "main.h" -#include "pppdata.h" -//#include <klocale.h> -#define i18n QObject::tr -#include "kpppwidget.h" -#include <assert.h> - -extern KPPPWidget *p_kppp; - -myMultiEdit::myMultiEdit(QWidget *parent, const char *name) - : QMultiLineEdit(parent, name) -{ - setReadOnly(true); -} - -void myMultiEdit::insertChar(unsigned char c) { - QMultiLineEdit::insert(QChar(c)); -} - - -void myMultiEdit::newLine() { - QMultiLineEdit::newLine(); -} - - -DebugWidget::DebugWidget(QWidget *parent, const char *name) - : QDialog(parent, name, FALSE) -{ - setCaption(i18n("Login Script Debug Window")); - - text_window = new myMultiEdit(this,"debugwindow"); - text_window->setGeometry(2,5,400, 300); - // text_window->setReadOnly(FALSE); - - statuslabel = new QLabel("", this, "statuslabel"); - - statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - statuslabel->setAlignment( AlignLeft|AlignVCenter ); - statuslabel->setGeometry(2, 307, 400, 20); - //statusPageLabel->setFont( QFont("helvetica",12,QFont::Normal) ); - - dismiss = new QPushButton(this); - dismiss->setGeometry(330,340,70,30); - dismiss->setText(i18n("Close")); - dismiss->setFocus(); - connect(dismiss, SIGNAL(clicked()), SLOT(hide())); - - - /* fline = new QFrame(this,"line"); - fline->setFrameStyle(QFrame::HLine |QFrame::Sunken); - fline->setGeometry(2,332,398,5);*/ - adjustSize(); - setMinimumSize(width(),height()); - -} - -void DebugWidget::hideEvent(QHideEvent *) -{ - assert(p_kppp); -// p_kppp->con->debug->setOn(false); -} - -void DebugWidget::clear() { - text_window->clear(); -} - - -void DebugWidget::addChar(unsigned char c) { - QString stuff; - - if(c == '\r' || c == '\n') { - if(c == '\n') - text_window->newLine(); - } else - text_window->insertChar(c); -} - - -void DebugWidget::statusLabel(const QString &s) { - statuslabel->setText(s); -} - - -/* -void DebugWidget::keyPressEvent(QKeyEvent *k) { -} - -*/ -void DebugWidget::resizeEvent(QResizeEvent *e){ - int w = width() ; - int h = height(); - e = e; - - text_window->setGeometry(2,5,w - 2 ,h - 63); - statuslabel->setGeometry(2, h - 56 , w -2 , 20); - dismiss->setGeometry(w - 72 , h - 32, 70, 30); - // fline->setGeometry(2,h -70 ,w - 4,5); -} - - -void DebugWidget::enter() { - text_window->append("\r\n"); -} - - -void DebugWidget::toggleVisibility() { - if(isVisible()) - hide(); - else - show(); - - bool showlog = isVisible(); - PPPData::data()->set_show_log_window(showlog); -} - - - - 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 @@ -/* - * kPPP: A pppd front end for the KDE project - * - * $Id$ - * Copyright (C) 1997 Bernd Wuebben - * wuebben@math.cornel.edu - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef _DEBUGWIDGET_ -#define _DEBUGWIDGET_ - -#include <qdialog.h> -#include <qstring.h> -#include <qlabel.h> -#include <qmultilineedit.h> -#include <qpushbutton.h> - - -class myMultiEdit : public QMultiLineEdit { -public: - - myMultiEdit(QWidget *parent=0, const char *name=0); - - void newLine(); - void insertChar(unsigned char c); -}; - - -class DebugWidget : public QDialog { - Q_OBJECT -public: - DebugWidget(QWidget *parent=0, const char *name=0); - - void clear(); - -public slots: - void statusLabel(const QString &); - void toggleVisibility(); - void addChar(unsigned char); - -protected: - virtual void hideEvent(QHideEvent *); - virtual void resizeEvent(QResizeEvent *e); - -private: - void enter(); - QFrame *fline; - QPushButton *dismiss; - myMultiEdit *text_window; - - QLabel *statuslabel; -}; - -#endif - 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 @@ -236,54 +236,37 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name, bool modal, WFlags fl // constructor of con_win reads position from config file // con_win = new ConWindow(0, "conw", this); // KWin::setIcons(con_win->winId(), kapp->icon(), kapp->miniIcon()); // statdlg = new PPPStatsDlg(0, "stats", this, stats); // statdlg->hide(); - debugwindow = new DebugWidget(0,"debugwindow"); - // KWin::setIcons(debugwindow->winId(), kapp->icon(), kapp->miniIcon()); - debugwindow->hide(); - // load up the accounts combo box // resetaccounts(); // con = new ConnectWidget(0, "con"); //KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() ); // connect(this, SIGNAL(begin_connect()),con, SLOT(preinit())); // Is this the best we can do here? it's not right. // QRect desk = QApplication::desktop()->screenGeometry( // QApplication::desktop()->screenNumber(topLevelWidget())); // con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); // connect the ConnectWidgets various signals -// connect(con, SIGNAL(closeDebugWindow()), -// debugwindow, SLOT(hide())); -// connect(con, SIGNAL(debugMessage(const QString &)), -// debugwindow, SLOT(statusLabel(const QString &))); -// connect(con, SIGNAL(toggleDebugWindow()), -// debugwindow, SLOT(toggleVisibility())); -// connect(con, SIGNAL(debugPutChar(unsigned char)), -// debugwindow, SLOT(addChar(unsigned char))); // // connect(con, SIGNAL(startAccounting()), // // this, SLOT(startAccounting())); // // connect(con, SIGNAL(stopAccounting()), // // this, SLOT(stopAccounting())); // connect(qApp, SIGNAL(saveYourself()), // this, SLOT(saveMyself())); // connect(qApp, SIGNAL(shutDown()), // this, SLOT(shutDown())); -// debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55, -// debugwindow->width(),debugwindow->height()); - -// move(desk.center().x()-width()/2, desk.center().y()-height()/2); - // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); // m_strCmdlAccount = args->getOption("c"); // m_bQuitOnDisconnect = args->isSet("q"); // if(!m_strCmdlAccount.isEmpty()) { // m_bCmdlAccount = true; @@ -630,25 +613,16 @@ void KPPPWidget::beginConnect() { this->hide(); QString tit = i18n("Connecting to: %1").arg(PPPData::data()->accname()); // con->setCaption(tit); // con->show(); - bool show_debug = PPPData::data()->get_show_log_window(); -// con->debug->setOn(show_debug); // toggle button - debugwindow->clear(); - if (!show_debug) - debugwindow->hide(); - else { - debugwindow->show(); -// con->raise(); - } emit begin_connect(); } void KPPPWidget::disconnect() { if (!PPPData::data()->command_before_disconnect().isEmpty()) { // con_win->hide(); 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 @@ -24,88 +24,56 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __KPPPWIDGET_H__ #define __KPPPWIDGET_H__ #include <qstring.h> -//#include "accounting.h" #include "conwindow.h" #include "accounts.h" #include "connect.h" -#include "debug.h" -//#include "pppstatdlg.h" -//class GraphSetup; -//class AboutWidget; -//class PPPStats; -class QDialog; class QPushButton; -/* class SignalEvent : public QEvent { */ -/* public: */ -/* SignalEvent(int s) : QEvent(User), sig(s) { } */ -/* int sigType() const { return sig; } */ -/* private: */ -/* int sig; */ -/* }; */ - class KPPPWidget : public QDialog { Q_OBJECT public: KPPPWidget( QWidget *parent=0, const char *name=0, bool modal = false, WFlags fl = 0 ); ~KPPPWidget(); void setPW_Edit(const QString &); - // virtual bool eventFilter(QObject *, QEvent *); - void setQuitOnDisconnect (bool b); - // bool quitOnDisconnect () {return m_bQuitOnDisconnect;}; private slots: void newdefaultaccount(int); -// void expandbutton(); void beginConnect(); void quitbutton(); - // void helpbutton(); - // void setup(); - // void rulesetLoadError(); void usernameChanged(const QString &); void passwordChanged(const QString &); void enterPressedInID(); void enterPressedInPW(); void saveMyself(); void shutDown(); -/* protected slots: */ -/* virtual void accept(); */ -/* virtual void reject(); */ public slots: - // void resetaccounts(); -/* void resetCosts(const QString &); */ -/* void resetVolume(const QString &); */ void disconnect(); void log_window_toggled(bool on); -/* void startAccounting(); */ -/* void stopAccounting(); */ -/* void showStats(); */ signals: void begin_connect(); void cmdl_start(); public: QCheckBox *log; bool connected; - DebugWidget *debugwindow; QString con_speed; // ConnectWidget *con; // ConWindow *con_win; // PPPStatsDlg *statdlg; // AccountingBase *acct; QPushButton *quit_b; //PPPStats *stats; @@ -114,17 +82,16 @@ private: void interruptConnection(); void sigChld(); void sigPPPDDied(); QString encodeWord(const QString &s); void showNews (); QString ruleset_load_errmsg; - // QPushButton *help_b; QPushButton *setup_b; QFrame *fline; QFrame *fline1; QPushButton *connect_b; QComboBox *connectto_c; QLabel *ID_Label; QLabel *PW_Label; QLineEdit *ID_Edit; @@ -132,26 +99,16 @@ private: QLabel *label1; QLabel *label2; QLabel *label3; QLabel *label4; QLabel *label5; QLabel *label6; QLabel *radio_label; - - // QTabWidget *tabWindow; - // AccountWidget *accounts; - // GeneralWidget *general; - // ModemWidget *modem1; - // ModemWidget2 *modem2; - // GraphSetup *graph; - // AboutWidget *about; - - /* QString m_strCmdlAccount; */ /* bool m_bQuitOnDisconnect; */ /* bool m_bCmdlAccount; */ }; #endif 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 @@ -1,16 +1,16 @@ #TEMPLATE = app # TEMPLATE = lib #CONFIG += qt warn_on release CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/plugins/networksettings -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 -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 +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 +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 INCLUDEPATH += $(OPIEDIR)/include ../ ../interfaces/ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -L../interfaces/ -linterfaces INTERFACES = TARGET = pppplugin VERSION = 1.0.0 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 @@ -75,16 +75,17 @@ QWidget *PPPModule::information(Interface *i){ /** * Get all active (up or down) interfaces * @return QList<Interface> A list of interfaces that exsist that havn't * been called by isOwner() */ QList<Interface> PPPModule::getInterfaces(){ // List all of the files in the peer directory + qDebug("PPPModule::getInterfaces"); return list; } /** * Attempt to add a new interface as defined by name * @param name the name of the type of interface that should be created given * by possibleNewInterfaces(); * @return Interface* NULL if it was unable to be created. |