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 //! returns a description of a word given by a QString
46 QString search(QString key);
48 //! returns a unique hash for a dictionary
52 /*! performs search in dictionary
53 \param word word to search in dictionary
54 \param limit limit on number of results
56 After finishing search it have to emit
57 \see CommonDictInterface:finalTranslation finalTranslation
59 QList<Translation*> searchWordList(QString word, int limit);
61 //! stop current operation
72 QDialog *_settingsDialog;
74 bool stopped; /*volatile*/
77 #endif // XDXFPLUGIN_H