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> |
10 | // |
11 | // derived from Jay Painters "ezppp" |
12 | // |
13 | //--------------------------------------------------------------------------- |
14 | // |
15 | // $Id$ |
16 | // |
17 | //--------------------------------------------------------------------------- |
18 | // |
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. |
23 | // |
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. |
28 | // |
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. |
32 | // |
33 | //--------------------------------------------------------------------------- |
34 | |
35 | #ifndef PROVIDER_DB |
36 | #define PROVIDER_DB |
37 | |
38 | #include <k3wizard.h> |
39 | #include <qwidget.h> |
40 | |
41 | class QLineEdit; |
42 | class Q3ListBox; |
43 | class KConfig; |
44 | |
45 | class PDB_Intro : public QWidget { |
46 | Q_OBJECT |
47 | public: |
48 | PDB_Intro(QWidget *parent); |
49 | }; |
50 | |
51 | |
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; |
59 | |
60 | public slots: |
61 | void selectionChanged(int); |
62 | }; |
63 | |
64 | |
65 | class PDB_Provider : public QWidget { |
66 | Q_OBJECT |
67 | public: |
68 | PDB_Provider(QWidget *parent); |
69 | |
70 | void setDir(const QString &d); |
71 | QString getDir(); |
72 | |
73 | Q3ListBox *lb; |
74 | |
75 | public slots: |
76 | void selectionChanged(int); |
77 | |
78 | private: |
79 | QString dir; |
80 | }; |
81 | |
82 | |
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(); |
90 | |
91 | public slots: |
92 | void textChanged(const QString &); |
93 | |
94 | private: |
95 | QLineEdit *_username; |
96 | QLineEdit *_password; |
97 | }; |
98 | |
99 | |
100 | class PDB_DialPrefix : public QWidget { |
101 | Q_OBJECT |
102 | public: |
103 | PDB_DialPrefix(QWidget *parent); |
104 | QString prefix(); |
105 | void activate(); |
106 | |
107 | private: |
108 | QLineEdit *_prefix; |
109 | }; |
110 | |
111 | |
112 | class PDB_Finished : public QWidget { |
113 | Q_OBJECT |
114 | public: |
115 | PDB_Finished(QWidget *parent); |
116 | }; |
117 | |
118 | |
119 | class ProviderDB : public K3Wizard { |
120 | Q_OBJECT |
121 | public: |
122 | ProviderDB(QWidget *parent); |
123 | ~ProviderDB(); |
124 | static Q3Wizard *wiz; |
125 | |
126 | public slots: |
127 | void pageSelected(); |
128 | void accept(); |
129 | |
130 | private: |
131 | void loadProviderInfo(); |
132 | KConfig *cfg; |
133 | |
134 | PDB_Intro *page1; |
135 | PDB_Country *page2; |
136 | PDB_Provider *page3; |
137 | PDB_UserInfo *page4; |
138 | PDB_DialPrefix *page5; |
139 | PDB_Finished *page9; |
140 | }; |
141 | |
142 | |
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 &); |
146 | |
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 &); |
150 | |
151 | |
152 | #endif |
153 | |