2
* proxy.h - classes for handling proxy profiles
3
* Copyright (C) 2003 Justin Karneges
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
#include<qvaluelist.h>
29
class HostPortEdit : public QWidget
33
HostPortEdit(QWidget *parent=0, const char *name=0);
38
void setHost(const QString &);
40
void fixTabbing(QWidget *a, QWidget *b);
49
typedef QValueList<ProxyItem> ProxyItemList;
56
QString host, user, pass;
61
QDomElement toXml(QDomDocument *) const;
62
bool fromXml(const QDomElement &);
65
class ProxyEdit : public QGroupBox
69
ProxyEdit(QWidget *parent=0, const char *name=0);
73
void setType(const QString &s);
74
ProxySettings proxySettings() const;
75
void setProxySettings(const ProxySettings &);
76
void fixTabbing(QWidget *a, QWidget *b);
79
void ck_toggled(bool);
86
class ProxyDlg : public ProxyUI
90
ProxyDlg(const ProxyItemList &, const QStringList &, int def, QWidget *parent=0, const char *name=0);
94
void applyList(const ProxyItemList &, int cur);
99
void cb_activated(int);
100
void qlbx_highlighted(int);
101
void qle_textChanged(const QString &);
108
void selectCurrent();
109
QString getUniqueName() const;
112
void saveIntoItem(int);
115
class ProxyChooser : public QWidget
119
ProxyChooser(ProxyManager *, QWidget *parent=0, const char *name=0);
122
int currentItem() const;
123
void setCurrentItem(int);
124
void fixTabbing(QWidget *a, QWidget *b);
127
void pm_settingsChanged();
134
void buildComboBox();
142
int id; // used to keep track of 'old' position in a list
145
ProxySettings settings;
148
class ProxyManager : public QObject
152
ProxyManager(QObject *parent=0);
155
ProxyChooser *createProxyChooser(QWidget *parent=0);
156
ProxyItemList itemList() const;
157
const ProxyItem & getItem(int) const;
158
int lastEdited() const;
159
void setItemList(const ProxyItemList &);
160
QStringList methodList() const;
161
int findOldIndex(int) const;
164
void settingsChanged();
167
void openDialog(int);
170
void pd_applyList(const ProxyItemList &, int cur);