4 #include "../../../../includes/CommonDictInterface.h"
8 #include "TranslationXdxf.h"
10 class XdxfPlugin : public CommonDictInterface
13 Q_INTERFACES(CommonDictInterface)
15 XdxfPlugin(QObject *parent=0);
17 //! returns source language code iso 639-2
18 QString langFrom() const;
20 //! returns destination language code iso 639-2
21 QString langTo() const;
23 //! returns dictionary name (like "old english" or so
26 //! returns dictionary type (xdxf, google translate, etc)
29 //! returns information about dictionary in html (name, authors, etc)
30 QString infoNote() const;
32 //! return dialog that creates new dictionary and fills necesary options
33 //! QDialog should returns Setting* object after being showed
34 QDialog* loadDialog();
36 //! return dialog with dictionary settings
37 QDialog* settingsDialog();
39 //! return new, clean copy of plugin with setting set as in Settings*
40 CommonDictInterface* getNew(const Settings*) const;
42 //! returns whether plugin can start searching
43 bool isAvailable() const;
45 QString search(QString key);
50 /*! performs search in dictionary
51 \param word word to search in dictionary
52 \param limit limit on number of results
54 After finishing search it have to emit
55 \see CommonDictInterface:finalTranslation finalTranslation
58 void searchWordList(QString word, int limit);
60 //! stop current operation
71 QDialog *_settingsDialog;
73 bool stopped; /*volatile*/
76 #endif // XDXFPLUGIN_H