1 /*******************************************************************************
3 This file is part of mDictionary.
5 mDictionary is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 mDictionary is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
18 Copyright 2010 Comarch S.A.
20 *******************************************************************************/
23 /*! \file GooglePlugin.h
25 #ifndef GOOGLEPLUGIN_H
26 #define GOOGLEPLUGIN_H
34 #include "../../../includes/CommonDictInterface.h"
35 #include "../../../includes/settings.h"
38 class GooglePlugin : public CommonDictInterface
41 Q_INTERFACES(CommonDictInterface)
43 GooglePlugin(QObject *parent=0);
46 //! returns source language code iso 639-2
47 QString langFrom() const;
49 //! returns destination language code iso 639-2
50 QString langTo() const;
52 //! returns dictionary name (like "old english" or so)
55 //! returns dictionary type (xdxf, google translate, etc)
58 //! returns information about dictionary in html (name, authors, etc)
59 QString infoNote() const;
61 /*! returns DictDialog object that creates dialogs
62 for adding new dictionary and change plugin tings
64 DictDialog* dictDialog();
66 //! returns new, clean copy of plugin with setting set as in Settings*
67 CommonDictInterface* getNew(const Settings*) const;
69 //! returns whether plugin can start searching
70 bool isAvailable() const;
72 //! returns a description of a word given by a QString
73 QString search(QString key);
75 //! returns a unique hash for a dictionary
78 //! set unique value (unique for every dictionary not plugin)
81 //! returns current plugin settings
85 void setSettings(Settings*);
87 //! returns plugin icon
91 /*! performs search in dictionary
92 \param word word to search in dictionary
93 \param limit limit on number of results
95 After finishing search it has to emit
96 \see CommonDictInterface:finalTranslation finalTranslation
98 QList<Translation*> searchWordList(QString word, int limit=0);
100 //! stop current operation
104 //! language from which we translate
106 //! language to which we translate
108 //! name of a dictionary
110 //! type of a dictionary
112 //! information about dictionary
114 //! path to dictionary file
122 #endif // GOOGLEPLUGIN_H