1 | /* -*- C++ -*- |
2 | * |
3 | * kPPP: A pppd front end for the KDE project |
4 | * |
5 | * $Id$ |
6 | * |
7 | * Copyright (C) 1997 Bernd Johannes Wuebben |
8 | * wuebben@math.cornell.edu |
9 | * |
10 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU Library General Public |
12 | * License as published by the Free Software Foundation; either |
13 | * version 2 of the License, or (at your option) any later version. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 | * Library General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU Library General Public |
21 | * License along with this program; if not, write to the Free |
22 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 | */ |
24 | |
25 | #ifndef _CONWINDOW_H_ |
26 | #define _CONWINDOW_H_ |
27 | |
28 | |
29 | #include <qtimer.h> |
30 | #include <qpushbutton.h> |
31 | #include <qlabel.h> |
32 | #include <qdialog.h> |
33 | #include <q3frame.h> |
34 | #include <qevent.h> |
35 | #include <qlayout.h> |
36 | //Added by qt3to4: |
37 | #include <QVBoxLayout> |
38 | #include <QCloseEvent> |
39 | |
40 | class PPPStats; |
41 | |
42 | class ConWindow : public QWidget { |
43 | Q_OBJECT |
44 | |
45 | public: |
46 | ConWindow(QWidget *parent, const char *name,QWidget *main, PPPStats *st); |
47 | ~ConWindow(); |
48 | |
49 | protected: |
50 | void closeEvent( QCloseEvent *e ); |
51 | bool event( QEvent *e ); |
52 | |
53 | private slots: |
54 | void timeclick(); |
55 | void dock(); |
56 | |
57 | public: |
58 | void setConnectionSpeed(const QString&); |
59 | void startClock(); |
60 | void stopClock(); |
61 | void accounting(bool); // show/ hide accounting info |
62 | |
63 | public slots: |
64 | void slotAccounting(const QString &, const QString &); |
65 | |
66 | private: |
67 | QLabel *info1; |
68 | QLabel *info2; |
69 | QPushButton *cancelbutton; |
70 | QPushButton *statsbutton; |
71 | QString prettyPrintVolume(unsigned int); |
72 | int minutes; |
73 | int seconds; |
74 | int hours; |
75 | int days; |
76 | QFrame *fline; |
77 | QLabel *timelabel1; |
78 | QLabel *timelabel2; |
79 | QLabel *total_bill, *total_bill_l; |
80 | QLabel *session_bill, *session_bill_l; |
81 | QString caption_string; |
82 | QString time_string2; |
83 | QString time_string; |
84 | QTimer *clocktimer; |
85 | QVBoxLayout *tl1; |
86 | QLabel *vollabel; |
87 | QLabel *volinfo; |
88 | PPPStats *stats; |
89 | bool accountingEnabled; |
90 | bool volumeAccountingEnabled; |
91 | }; |
92 | |
93 | |
94 | #endif |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | |