4 #include "../../../../includes/CommonDictInterface.h"
10 class TranslationXdxf;
12 class XdxfPlugin : public CommonDictInterface
15 Q_INTERFACES(CommonDictInterface)
17 XdxfPlugin(QObject *parent=0);
19 //! returns source language code iso 639-2
20 QString langFrom() const;
22 //! returns destination language code iso 639-2
23 QString langTo() const;
25 //! returns dictionary name (like "old english" or so)
28 //! returns dictionary type (xdxf, google translate, etc)
31 //! returns information about dictionary in html (name, authors, etc)
32 QString infoNote() const;
34 //! returns dialog that creates new dictionary and fills necessary options
35 //! QDialog should return Setting* object after being shown
36 QDialog* loadDialog();
38 //! returns dialog with dictionary settings
39 QDialog* settingsDialog();
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)
57 /*! performs search in dictionary
58 \param word word to search in dictionary
59 \param limit limit on number of results
61 After finishing search it has to emit
62 \see CommonDictInterface:finalTranslation finalTranslation
64 QList<Translation*> searchWordList(QString word, int limit);
66 //! stop current operation
77 QDialog *_settingsDialog;
80 bool stopped; /*volatile*/
83 #endif // XDXFPLUGIN_H