1/* -*- C++ -*-
2 * kPPP: A pppd front end for the KDE project
3 *
4 * $Id$
5 *
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
8 *
9 * based on EzPPP:
10 * Copyright (C) 1997 Jay Painter
11 *
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.
16 *
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.
21 *
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.
25 */
26
27#ifndef _ACCOUNTS_H_
28#define _ACCOUNTS_H_
29
30#include <qwidget.h>
31#include <qpushbutton.h>
32#include <q3listbox.h>
33//Added by qt3to4:
34#include <QLabel>
35#include "acctselect.h"
36#include <kdialog.h>
37
38class KPageDialog;
39class QCheckBox;
40class QLineEdit;
41class DialWidget;
42class ScriptWidget;
43class IPWidget;
44class DNSWidget;
45class GatewayWidget;
46
47class AccountWidget : public QWidget {
48 Q_OBJECT
49public:
50 explicit AccountWidget( QWidget *parent=0, const char *name=0 );
51 ~AccountWidget() {}
52
53private slots:
54 void editaccount();
55 void copyaccount();
56 void newaccount();
57 void deleteaccount();
58 void slotListBoxSelect(int);
59 void resetClicked();
60 void viewLogClicked();
61
62private:
63 int doTab();
64
65signals:
66 void resetaccounts();
67 void resetCosts(const QString &);
68 void resetVolume(const QString &);
69
70private:
71 QString prettyPrintVolume(unsigned int);
72
73 KPageDialog *tabWindow;
74 DialWidget *dial_w;
75 AccountingSelector *acct;
76 IPWidget *ip_w;
77 DNSWidget *dns_w;
78 GatewayWidget *gateway_w;
79 ScriptWidget *script_w;
80
81 QPushButton *reset;
82 QPushButton *log;
83 QLabel *costlabel;
84 QLineEdit *costedit;
85 QLabel *vollabel;
86 QLineEdit *voledit;
87
88 Q3ListBox *accountlist_l;
89 QPushButton *edit_b;
90 QPushButton *copy_b;
91 QPushButton *new_b;
92 QPushButton *delete_b;
93};
94
95
96class QueryReset : public KDialog {
97 Q_OBJECT
98public:
99 QueryReset(QWidget *parent);
100
101 enum {COSTS=1, VOLUME=2};
102
103private slots:
104 void accepted();
105
106private:
107 QCheckBox *costs, *volume;
108};
109
110#endif
111
112