3 * kPPP: A pppd front end for the KDE project
7 * Copyright (C) 1997 Bernd Johannes Wuebben
8 * wuebben@math.cornell.edu
10 * Copyright (C) 1998-2002 Harri Porten <porten@kde.org>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this program; if not, write to the Free
24 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #ifndef __KPPPWIDGET_H__
28 #define __KPPPWIDGET_H__
34 #include <QGridLayout>
38 #include "accounting.h"
39 #include "conwindow.h"
43 #include "pppstatdlg.h"
55 class SignalEvent
: public QEvent
{
57 SignalEvent(int s
) : QEvent(User
), sig(s
) { }
58 int sigType() const { return sig
; }
64 class KPPPWidget
: public QWidget
{
68 explicit KPPPWidget( QWidget
*parent
=0, const char *name
=0 );
71 void setPW_Edit(const QString
&);
72 virtual bool eventFilter(QObject
*, QEvent
*);
74 void setQuitOnDisconnect (bool b
);
75 bool quitOnDisconnect () {return m_bQuitOnDisconnect
;}
78 void newdefaultaccount(int);
79 void newdefaultmodem(int);
84 void rulesetLoadError();
85 void usernameChanged(const QString
&);
86 void passwordChanged(const QString
&);
87 void enterPressedInID();
88 void enterPressedInPW();
92 void delayedDisconnect();
98 void resetCosts(const QString
&);
99 void resetVolume(const QString
&);
101 void log_window_toggled(bool on
);
102 void startAccounting();
103 void stopAccounting();
105 bool isConnected() const {return connected
;}
107 void begin_connect();
110 signals
: //dbus signal
111 void sig_aboutToConnect();
112 void sig_aboutToDisconnect();
113 void sig_connected();
114 void sig_disconnected();
119 DebugWidget
*debugwindow
;
123 PPPStatsDlg
*statdlg
;
124 AccountingBase
*acct
;
129 void prepareSetupDialog();
130 void interruptConnection();
133 QString
encodeWord(const QString
&s
);
137 QString ruleset_load_errmsg
;
141 KPushButton
*setup_b
;
144 QPushButton
*connect_b
;
145 QComboBox
*connectto_c
;
161 KPageDialog
*tabWindow
;
162 AccountWidget
*accounts
;
163 GeneralWidget
*general
;
164 ModemsWidget
*modems
;
169 QString m_strCmdlAccount
;
170 QString m_strCmdlModem
;
171 bool m_bQuitOnDisconnect
;
176 QTimer
*disconnectTimer
;