Contact cannot be a null ptr, and it is accessed before anyway. Disscussed with kedge.
[kdenetwork.git] / kppp / accounts.h
blob5a57a0f12bc036744fca0081899d21a6637a2d85
1 /* -*- C++ -*-
2 * kPPP: A pppd front end for the KDE project
4 * $Id$
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
9 * based on EzPPP:
10 * Copyright (C) 1997 Jay Painter
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 _ACCOUNTS_H_
28 #define _ACCOUNTS_H_
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>
38 class KPageDialog;
39 class QCheckBox;
40 class QLineEdit;
41 class DialWidget;
42 class ScriptWidget;
43 class IPWidget;
44 class DNSWidget;
45 class GatewayWidget;
47 class AccountWidget : public QWidget {
48 Q_OBJECT
49 public:
50 explicit AccountWidget( QWidget *parent=0, const char *name=0 );
51 ~AccountWidget() {}
53 private slots:
54 void editaccount();
55 void copyaccount();
56 void newaccount();
57 void deleteaccount();
58 void slotListBoxSelect(int);
59 void resetClicked();
60 void viewLogClicked();
62 private:
63 int doTab();
65 signals:
66 void resetaccounts();
67 void resetCosts(const QString &);
68 void resetVolume(const QString &);
70 private:
71 QString prettyPrintVolume(unsigned int);
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;
81 QPushButton *reset;
82 QPushButton *log;
83 QLabel *costlabel;
84 QLineEdit *costedit;
85 QLabel *vollabel;
86 QLineEdit *voledit;
88 Q3ListBox *accountlist_l;
89 QPushButton *edit_b;
90 QPushButton *copy_b;
91 QPushButton *new_b;
92 QPushButton *delete_b;
96 class QueryReset : public KDialog {
97 Q_OBJECT
98 public:
99 QueryReset(QWidget *parent);
101 enum {COSTS=1, VOLUME=2};
103 private slots:
104 void accepted();
106 private:
107 QCheckBox *costs, *volume;
110 #endif