00001 /* -*- C++ -*- 00002 * 00003 * kPPP: A pppd front end for the KDE project 00004 * 00005 * $Id: conwindow.h,v 1.3 2003/08/09 17:14:55 kergoth Exp $ 00006 * 00007 * Copyright (C) 1997 Bernd Johannes Wuebben 00008 * wuebben@math.cornell.edu 00009 * 00010 * This program is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Library General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2 of the License, or (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Library General Public 00021 * License along with this program; if not, write to the Free 00022 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00023 */ 00024 00025 #ifndef _CONWINDOW_H_ 00026 #define _CONWINDOW_H_ 00027 00028 00029 #include <qtimer.h> 00030 #include <qpushbutton.h> 00031 #include <qlabel.h> 00032 #include <qdialog.h> 00033 #include <qframe.h> 00034 #include <qevent.h> 00035 #include <qlayout.h> 00036 00037 class PPPData; 00038 00039 class ConWindow : public QWidget { 00040 Q_OBJECT 00041 00042 public: 00043 ConWindow(PPPData*, QWidget *parent, const char *name, QDialog* ); 00044 ~ConWindow(); 00045 00046 protected: 00047 void closeEvent( QCloseEvent *e ); 00048 bool event( QEvent *e ); 00049 00050 private slots: 00051 void timeclick(); 00052 // void dock(); 00053 00054 public: 00055 void setConnectionSpeed(const QString&); 00056 void startClock(); 00057 void stopClock(); 00058 // void accounting(bool); // show/ hide accounting info 00059 00060 public slots: 00061 void slotAccounting(QString, QString); 00062 00063 private: 00064 QLabel *info1; 00065 QLabel *info2; 00066 QPushButton *cancelbutton; 00067 QPushButton *statsbutton; 00068 QString prettyPrintVolume(unsigned int); 00069 int minutes; 00070 int seconds; 00071 int hours; 00072 int days; 00073 QFrame *fline; 00074 QLabel *timelabel1; 00075 QLabel *timelabel2; 00076 QLabel *total_bill, *total_bill_l; 00077 QLabel *session_bill, *session_bill_l; 00078 QString caption_string; 00079 QString time_string2; 00080 QString time_string; 00081 QTimer *clocktimer; 00082 QVBoxLayout *tl1; 00083 QLabel *vollabel; 00084 QLabel *volinfo; 00085 PPPData *_pppdata; 00086 }; 00087 00088 00089 #endif 00090 00091 00092 00093 00094
1.4.2