#include <QDialog>
#include <QObject>
#include <QList>
- #include "CommonDictInterface.h"
#include "translation.h"
- #include "settings.h"
+ class Settings;
-
+Q_DECLARE_INTERFACE (CommonDictInterface, "xdxfInterface")
//! Interface for dict engines plugins
class CommonDictInterface : public QObject {
//! return new, clean copy of plugin with setting set as in Settings*
virtual CommonDictInterface* getNew(const Settings*) const = 0;
- //! returns whether plugin can start searching
+ //! returns whether plugin can start searching
virtual bool isAvailable() const = 0;
++ //! returns the actual translation of a word given in key
+ virtual QString search(QString key) = 0;
+
+ //! \returns unique value (unique for every dictionary not plugin
+ virtual uint hash() const = 0;
+
public Q_SLOTS:
-- /*! performes search in dictionary
++ /*! performs search in dictionary
\param word word to search in dictionary
\param limit limit on number of results
void loaded(CommonDictInterface*);
};
- #endif // COMMONDICTINTERFACE_H
+ Q_DECLARE_INTERFACE(CommonDictInterface, "CommonDictInterface/0.1");
+
+ #endif