*******************************************************************************/
-
/*! \file GooglePlugin.h
+
+ \author Jakub Jaszczynski <j.j.jaszczynski@gmail.com>
*/
+
#ifndef GOOGLEPLUGIN_H
#define GOOGLEPLUGIN_H
//! returns whether plugin can start searching
bool isAvailable() const;
+ void setConnectionAccept(QString connectionAcepted);
+
+ bool isConnectionAccept() const;
+
//! returns a description of a word given by a QString
QString search(QString key);
Settings* settings();
//! Sets new settings
- void setSettings(Settings*);
+ void setSettings(const Settings*);
//! returns plugin icon
QIcon* icon();
Translation* getTranslationFor(QString key);
+ static QMap<QString, QString> initLanguages();
+
public slots:
/*! performs search in dictionary
\param word word to search in dictionary
void done();
-private:
- void initLanguages();
QString jsonParse(QString result);
+
+private:
void getDictionaryInfo();
QMap<QString, QString> languages;
-
- //! language from which we translate
- QString _langFrom;
- //! language to which we translate
- QString _langTo;
- //! name of a dictionary
QString _name;
//! type of a dictionary
QString _type;
//! information about dictionary
QString _infoNote;
- //! path to dictionary file
- QString path;
uint _hash;
QIcon _icon;
Settings *_settings;
bool stopped;
+ bool _connectionAccept;
volatile bool wait;
QHttp *http;
GoogleDictDialog *_dictDialog;