*******************************************************************************/
// Created by Bartosz Szatkowski
+ #include <QString>
+ #include <QDialog>
+ #include <QObject>
+ #include <QList>
+ #include "CommonDictInterface.h"
+ #include "translation.h"
+ #include "settings.h"
+
+
+//! Interface for dict engines plugins
class CommonDictInterface : public QObject {
+ Q_OBJECT
public:
CommonDictInterface(const QObject *parent = 0) = 0;
+
+ //! returns source language code iso 639-2
virtual QString langFrom() const = 0;
+
+ //! returns destination language code iso 639-2
virtual QString langTo() const = 0;
+
+ //! returns dictionary name (like "old english" or so
virtual QString name() const = 0;
+
+ //! returns dictionary type (xdxf, google translate, etc)
virtual QString type() const = 0;
+
+ //! returns information about dictionary in html (name, authors, etc)
virtual QString infoNote() const = 0;
+
+ //! return dialog that creates new dictionary and fills necesary options
+ //! QDialog should returns Setting* object after being showed
virtual QDialog* loadDialog() = 0;
+
+ //! return dialog with dictionary settings
virtual QDialog* settingsDialog() = 0;
+
+ //! 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
virtual bool isAvailable() const = 0;
public Q_SLOTS:
*******************************************************************************/
//Created by Bartosz Szatkowski
+ #include <QString>
+ #include "CommonDictInterface.h"
+//! Plugin specific configuration
class Settings {
public:
- QString value(const QString) const = 0;
- void setValue(const QString, const QString) = 0;
++<<<<<<< HEAD
+ //! \retrun value fo given key
+ //! \param key
+ QString value(const QString key) const = 0;
+
+ //! sets key to value
- void setValue(const QString key, const Qstring value) = 0;
++ void setValue(const QString key, const QString value) = 0;
+
+ //! \return dict CommonDictInterface
CommonDictInterface type() const = 0;
+
+ //! sets settings type to given dictionary
void setType(const CommonDictInterface) = 0;
}
*******************************************************************************/
//Created by Bartosz Szatkowski
+ #include <QString>
+//! Keeping raw form of translation to be parsed only when needed
class Translation {
public:
+ //! \return word to be translated
QString key() const = 0;
+
+ //! \returns dictionary information (plugin name, languages, <logo> etc)\
+ //! to be displayed in translation table header
QString dictionaryInfo() const = 0;
+
+ //! \return parsed raw format into html
QString toHtml() const = 0;
}