Merge change in interfaces files
[mdictionary] / trunk / src / includes / CommonDictInterface.h
index f4a4921..6310ba7 100644 (file)
 #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:
-    virtual void search(QString, int) = 0;                         
+    /*! performes search in dictionary
+        \param  word word to search in dictionary
+        \param limit limit on number of results
+
+        After finishing search it have to emit 
+        \see CommonDictInterface:finalTranslation  finalTranslation
+
+    */
+    virtual void search(QString word, int limit) = 0;                         
+
+    //! stop current operation
     virtual void stop() = 0;                        
 
   Q_SIGNALS:
+    //! emit list of finded Translations
     void finalTranslation(QList<Translation*>);
-    void load(CommonDictInterface*);
+
+    //! emited after dictionary is ready to use afer being loaded
+    void loaded(CommonDictInterface*);
 }