4 #include "../../../includes/CommonDictInterface.h"
9 #include "XdxfDictDialog.h"
11 class TranslationXdxf;
13 class XdxfPlugin : public CommonDictInterface
16 Q_INTERFACES(CommonDictInterface)
18 XdxfPlugin(QObject *parent=0);
20 //! returns source language code iso 639-2
21 QString langFrom() const;
23 //! returns destination language code iso 639-2
24 QString langTo() const;
26 //! returns dictionary name (like "old english" or so)
29 //! returns dictionary type (xdxf, google translate, etc)
32 //! returns information about dictionary in html (name, authors, etc)
33 QString infoNote() const;
35 /*! returns DictDialog object that creates dialogs
36 for adding new dictionary and change plugin settings
38 DictDialog* dictDialog();
41 //! returns new, clean copy of plugin with setting set as in Settings*
42 CommonDictInterface* getNew(const Settings*) const;
44 //! returns whether plugin can start searching
45 bool isAvailable() const;
47 //! returns a description of a word given by a QString
48 QString search(QString key);
50 //! returns a unique hash for a dictionary
53 //! set unique value (unique for every dictionary not plugin)
56 //! returns current plugin settings
60 /*! performs search in dictionary
61 \param word word to search in dictionary
62 \param limit limit on number of results
64 After finishing search it has to emit
65 \see CommonDictInterface:finalTranslation finalTranslation
67 QList<Translation*> searchWordList(QString word, int limit);
69 //! stop current operation
80 QDialog *_settingsDialog;
83 bool stopped; /*volatile*/
85 XdxfDictDialog* _dictDialog;
88 #endif // XDXFPLUGIN_H