00001 /* 00002 * 00003 * kPPP: A pppd front end for the KDE project 00004 * 00005 * $Id: general.h,v 1.6 2004/10/14 01:44:27 zecke Exp $ 00006 * 00007 * Copyright (C) 1997 Bernd Johannes Wuebben 00008 * wuebben@math.cornell.edu 00009 * 00010 * 00011 * This program is free software; you can redistribute it and/or 00012 * modify it under the terms of the GNU Library General Public 00013 * License as published by the Free Software Foundation; either 00014 * version 2 of the License, or (at your option) any later version. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 * Library General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Library General Public 00022 * License along with this program; if not, write to the Free 00023 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 */ 00025 00026 #ifndef _GENERAL_H_ 00027 #define _GENERAL_H_ 00028 00029 #include <qwidget.h> 00030 00031 class QSlider; 00032 class QSpinBox; 00033 class QCombobox; 00034 class QLabel; 00035 class QCheckBox; 00036 class QComboBox; 00037 class PPPData; 00038 class InterfacePPP; 00039 class QLineEdit; 00040 00041 class ModemWidget : public QWidget { 00042 Q_OBJECT 00043 public: 00044 ModemWidget(PPPData*, QWidget *parent=0, const char *name=0 ); 00045 ~ModemWidget(); 00046 00047 bool save(); 00048 00049 private slots: 00050 /* 00051 * temporarily commit configuration so queryModem 00052 * will use 'current' settings 00053 */ 00054 void slotBeforeModemQuery(); 00055 void slotAfterModemQuery(); 00056 00057 /* private slots: */ 00058 /* void setmodemdc(int); */ 00059 /* void setmodemdc(const QString &); */ 00060 /* void setflowcontrol(int); */ 00061 /* void modemtimeoutchanged(int); */ 00062 /* void modemlockfilechanged(bool); */ 00063 /* void setenter(int); */ 00064 /* void speed_selection(int); */ 00065 00066 private: 00067 QComboBox *enter; 00068 /* QLabel *label1; */ 00069 /* QLabel *label2; */ 00070 /* QLabel *labeltmp; */ 00071 /* QLabel *labelenter; */ 00072 QLineEdit *modemname; 00073 QComboBox *modemdevice; 00074 QComboBox *flowcontrol; 00075 00076 QComboBox *baud_c; 00077 QLabel *baud_label; 00078 00079 QSpinBox *modemtimeout; 00080 QCheckBox *modemlockfile; 00081 PPPData *_pppdata; 00082 00083 private: 00084 QString m_oldModemDev, m_oldSpeed; 00085 bool m_oldModemLock; 00086 int m_oldModemTimeout, m_oldFlowControl, m_oldLineEnd; 00087 }; 00088 00089 00090 class ModemWidget2 : public QWidget { 00091 Q_OBJECT 00092 public: 00093 ModemWidget2( PPPData*, InterfacePPP*, QWidget *parent=0, const char *name=0 ); 00094 bool save(); 00095 00096 signals: 00097 void sig_beforeQueryModem(); 00098 void sig_afterQueryModem(); 00099 00100 private slots: 00101 /* void waitfordtchanged(bool); */ 00102 /* void busywaitchanged(int); */ 00103 // void use_cdline_toggled(bool); 00104 void modemcmdsbutton(); 00105 // void terminal(); 00106 void query_modem(); 00107 // void volumeChanged(int); 00108 00109 private: 00110 QLabel *labeltmp; 00111 QPushButton *modemcmds; 00112 QPushButton *modeminfo_button; 00113 // QPushButton *terminal_button; 00114 // QFrame *fline; 00115 QCheckBox *waitfordt; 00116 QSpinBox *busywait; 00117 QCheckBox *chkbox1; 00118 QSlider *volume; 00119 PPPData *_pppdata; 00120 InterfacePPP *_ifaceppp; 00121 }; 00122 00123 #endif 00124 00125
1.4.2