icons on message box buttons
[kdenetwork.git] / kppp / providerdb.h
blob1c0999a328cc176da76491406bacca8b1898e88a
1 //---------------------------------------------------------------------------
2 //
3 // kPPP: A pppd front end for the KDE project
4 //
5 //---------------------------------------------------------------------------
6 //
7 // (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
8 // (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
9 // (c) 1998-1999 Harri Porten <porten@kde.org>
11 // derived from Jay Painters "ezppp"
13 //---------------------------------------------------------------------------
15 // $Id$
17 //---------------------------------------------------------------------------
19 // This program is free software; you can redistribute it and-or
20 // modify it under the terms of the GNU Library General Public
21 // License as published by the Free Software Foundation; either
22 // version 2 of the License, or (at your option) any later version.
24 // This program is distributed in the hope that it will be useful,
25 // but WITHOUT ANY WARRANTY; without even the implied warranty of
26 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 // Library General Public License for more details.
29 // You should have received a copy of the GNU Library General Public
30 // License along with this program; if not, write to the Free
31 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 //---------------------------------------------------------------------------
35 #ifndef PROVIDER_DB
36 #define PROVIDER_DB
38 #include <k3wizard.h>
39 #include <qwidget.h>
41 class QLineEdit;
42 class Q3ListBox;
43 class KConfig;
45 class PDB_Intro : public QWidget {
46 Q_OBJECT
47 public:
48 PDB_Intro(QWidget *parent);
52 class PDB_Country : public QWidget {
53 Q_OBJECT
54 public:
55 PDB_Country(QWidget *parent);
56 ~PDB_Country();
57 Q3ListBox *lb;
58 QStringList *list;
60 public slots:
61 void selectionChanged(int);
65 class PDB_Provider : public QWidget {
66 Q_OBJECT
67 public:
68 PDB_Provider(QWidget *parent);
70 void setDir(const QString &d);
71 QString getDir();
73 Q3ListBox *lb;
75 public slots:
76 void selectionChanged(int);
78 private:
79 QString dir;
83 class PDB_UserInfo : public QWidget {
84 Q_OBJECT
85 public:
86 PDB_UserInfo(QWidget *parent);
87 QString username();
88 QString password();
89 void activate();
91 public slots:
92 void textChanged(const QString &);
94 private:
95 QLineEdit *_username;
96 QLineEdit *_password;
100 class PDB_DialPrefix : public QWidget {
101 Q_OBJECT
102 public:
103 PDB_DialPrefix(QWidget *parent);
104 QString prefix();
105 void activate();
107 private:
108 QLineEdit *_prefix;
112 class PDB_Finished : public QWidget {
113 Q_OBJECT
114 public:
115 PDB_Finished(QWidget *parent);
119 class ProviderDB : public K3Wizard {
120 Q_OBJECT
121 public:
122 ProviderDB(QWidget *parent);
123 ~ProviderDB();
124 static Q3Wizard *wiz;
126 public slots:
127 void pageSelected();
128 void accept();
130 private:
131 void loadProviderInfo();
132 KConfig *cfg;
134 PDB_Intro *page1;
135 PDB_Country *page2;
136 PDB_Provider *page3;
137 PDB_UserInfo *page4;
138 PDB_DialPrefix *page5;
139 PDB_Finished *page9;
143 // Decodes a (some sort of)URL-encoded filename to a human-readable name.
144 // This is used for the provider database
145 void urlDecode(QString &);
147 // Encodes a (some sort of)URL-encoded filename from a human-readable name.
148 // This is used for the provider database
149 void urlEncode(QString &);
152 #endif