add getTranslationFor function for googlePlugin
[mdictionary] / trunk / src / plugins / google / src / TranslationGoogle.h
1 #ifndef TRANSLATIONGOOGLE_H
2 #define TRANSLATIONGOOGLE_H
3
4 #include "../../../includes/translation.h"
5 #include "GooglePlugin.h"
6
7 class GooglePlugin;
8
9 class TranslationGoogle : public Translation
10 {
11 public:
12     TranslationGoogle();
13
14     TranslationGoogle(QString _key,QString _trans,QString _dictionaryInfo, GooglePlugin *googlePlugin);
15
16     //! \return word to be translated
17     QString key() const;
18
19     /*! \returns dictionary information (plugin name, languages, <logo> etc)\
20         to be displayed in translation table header*/
21     QString dictionaryInfo() const;
22
23     //! \return parsed raw format into html
24     QString toHtml() const;
25
26     /*! sets the word for which we want to find a translation
27         \param word for which we want to find a translation */
28     void setKey(QString);
29
30     //! sets information about dictionary
31     void setDictionaryInfo(QString);
32
33     //! \retrun whether given translation is taken from bookmarks
34     bool isBookmark() const {
35         return _bookmark;
36    }
37
38     //! returns coresponding dict object
39     uint dict() const {return _dictHash;}
40
41 private:
42     QString _key;
43     QString _dictionaryInfo;
44     QString _trans;
45     GooglePlugin *googlePlugin;
46     int _dictHash;
47
48 };
49
50 #endif // TRANSLATIONGOOGLE_H