implement a lot's of function of googlePlugin
[mdictionary] / trunk / src / plugins / google / src / GooglePlugin.h
index 272afd9..33e779c 100644 (file)
 #include <QDialog>
 #include <QtPlugin>
 #include <QIcon>
+#include <QtNetwork>
 
 #include "../../../includes/CommonDictInterface.h"
 #include "../../../includes/settings.h"
+#include "../../../includes/DictDialog.h"
+#include "TranslationGoogle.h"
+#include "GoogleDictDialog.h"
 
+class GoogleDictDialog;
 
 class GooglePlugin : public CommonDictInterface
 {
@@ -58,6 +63,10 @@ public:
     //! returns information about dictionary in html (name, authors, etc)
     QString infoNote() const;
 
+    void setLangTo(QString langTo);
+
+    void setLangFrom(QString langFrom);
+
     /*! returns DictDialog object that creates dialogs
         for adding new dictionary and change plugin tings
       */
@@ -88,7 +97,7 @@ public:
     QIcon* icon();
 
 
-public Q_SLOTS:
+public slots:
     /*! performs search in dictionary
       \param  word word to search in dictionary
       \param limit limit on number of results
@@ -101,6 +110,9 @@ public Q_SLOTS:
     //! stop current operation
     void stop();
 
+    void done();
+    void started(int);
+
 private:
     void initLanguages();
     QMap<QString, QString> languages;
@@ -121,6 +133,9 @@ private:
     QIcon _icon;
     Settings *_settings;
     bool stopped;
+    volatile bool wait;
+    QHttp *http;
+    GoogleDictDialog *_dictDialog;
 };
 
 #endif // GOOGLEPLUGIN_H