Deleting xxmklink_readme.txt
[qtdict.git] / dictionary.h
blob4b2f50fb12d2ba3998899efdd9133fc8d61ba15f
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 <iostream>
14 #include "ui_dictionary.h"
15 #include "settings.h"
16 #include <QTextCodec>
17 #include <QDialog>
18 #include <QBuffer>
19 #include <QHttp>
20 #include <QHttpResponseHeader>
22 class Dictionary : public QDialog, public Ui::Form
24 Q_OBJECT
26 public:
27 Dictionary(QWidget *parent = 0);
29 private slots:
30 void statusChanged();
31 void translateClicked();
32 void httpRequestFinished(int requestId, bool error);
33 void readResponseHeader(const QHttpResponseHeader &responseHeader);
34 void enableTranslateButton();
35 void enablePrevButton();
36 void enableNextButton();
37 void setMode(int index);
38 void setHits(int index);
39 void setDic(int index);
40 void aboutClicked();
41 void deleteHistoryClicked();
42 void stepPrev();
43 void stepNext();
44 private:
46 void fillTable(QStringList word_list,QStringList meaning_list);
47 QStringList filter(QString html,QRegExp rx);
48 void updateHistory(settings &set);
49 void updateUi(settings &set);
50 void translate(settings &set);
52 QList<settings> history;
53 QList<settings>::iterator hIter;
55 QString appver;
56 QStringList html_list;
57 QStringList latin_list;
58 QStringList hex_list;
59 QHttp *http;
60 QString szotar;
61 QString dic;
62 QString mode;
63 QString hits;
64 QBuffer *buffer;
65 int httpGetId;
68 #endif