Cleaning up the code and adding includes.h
[qtdict.git] / dictionary.h
bloba88a080c7d87bba5bc4ebb77e6dd2f0ad535fcc6
1 // Copyright (c) 2008, Andrew BĂ©csi (andrewbecsi @ yahoo . co . uk)
2 //
3 // This program is free software, released under the GNU General Public License
4 // and you are welcome to redistribute it under certain conditions. It comes with
5 // ABSOLUTELY NO WARRANTY; for details read the GNU General Public License to be
6 // found in the file "COPYING" distributed with this program, or online at:
7 // http://www.gnu.org/copyleft/gpl.html
9 #ifndef DICTIONARY_H
10 #define DICTIONARY_H
12 #include "settings.h"
15 class Dictionary : public QDialog, public Ui::Form
17 Q_OBJECT
19 public:
20 Dictionary(QWidget *parent = 0);
22 private slots:
23 void statusChanged();
24 void translateClicked();
25 void httpRequestFinished(int requestId, bool error);
26 void readResponseHeader(const QHttpResponseHeader &responseHeader);
27 void enableTranslateButton();
28 void enablePrevButton();
29 void enableNextButton();
30 void setMode(int index);
31 void setHits(int index);
32 void setDic(int index);
33 void aboutClicked();
34 void deleteHistoryClicked();
35 void stepPrev();
36 void stepNext();
37 private:
39 void fillTable(QStringList word_list,QStringList meaning_list);
40 QStringList filter(QString html,QRegExp rx);
41 void updateHistory(settings &set);
42 void updateUi(settings &set);
43 void translate(settings &set);
45 QList<settings> history;
46 QList<settings>::iterator hIter;
48 QString appver;
50 QStringList html_list;
51 QStringList latin_list;
52 QStringList hex_list;
54 QHttp *http;
55 QString szotar;
56 QString dic;
57 QString mode;
58 QString hits;
59 QBuffer *buffer;
60 int httpGetId;
63 #endif