doxygen comments
[aspt.git] / configtab.h
1 /*******************************************************************
2 Jan Cermak | johniez | aspt.johniez.com
3 Creative Commons 2.5 Attribution-NonCommercial-NoDerivs 2.5 license
4 http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode
5 *******************************************************************/
6
7 #ifndef CONFIGTAB__H__
8 #define CONFIGTAB__H__
9
10 #include <QWidget>
11 #include <QTabWidget>
12 #include <QVBoxLayout>
13 #include <QHBoxLayout>
14 #include <QGroupBox>
15 #include <QPushButton>
16 #include <QComboBox>
17 #include <QLabel>
18 #include <QLineEdit>
19 #include <QFile>
20 #include <QtNetwork>
21 #include <QMessageBox>
22 //#include <QTextStream>
23
24 #include "proxyset.h"
25
26 extern void parse(const QString &);
27
28 /// Config widget.
29 class ConfigTab: public QWidget {
30         Q_OBJECT
31         QVBoxLayout *mainLayout, *group1Layout, *group2Layout;
32         QHBoxLayout *row1, *row2;
33         QFile *file;
34         QHttp *http;
35         QString num;
36         int httpId;
37         QLineEdit *nick, *pass;
38         QPushButton *butDown, *butProxy;
39         int langToSave;
40         QLabel *msgbox;
41         int useProxy;
42         ProxySet *proxyWin;
43         QLabel *warnLabel, *nickLabel, *passLabel;
44         QGroupBox *group1, *group2;
45         QComboBox *lang;
46         QPushButton *setLang;
47         QLabel *langWarn;
48 public:
49         ConfigTab(QWidget *parent = 0);
50         ~ConfigTab();
51 private slots:
52         void httpRequestFinished(int requestId, bool error);
53         void readResponseHeader(const QHttpResponseHeader &responseHeader);
54         void downloadLatest();
55         
56         void changeLang(int langId);
57         void saveSettings();
58         
59         void showMsgBox(const QString &);
60         void openProxy();
61 signals:
62         void dataLoaded();
63         void errMsgBox(const QString &);
64 };
65
66 #endif