*******************************************************************************/
-/*! /file CommonDictInterface.h
+/*! \file CommonDictInterface.h
\brief Common interface for all dicts and plugins \see CommonDictInterface
\author Bartosz Szatkowski <bulislaw@linux.com>
//! returns destination language code iso 639-2
virtual QString langTo() const = 0;
- //! returns dictionary name (like "old english" or so
+ //! returns dictionary name (like "old English" or so
virtual QString name() const = 0;
//! returns dictionary type (xdxf, google translate, etc)
virtual QString infoNote() const = 0;
/*! returns DictDialog object that creates dialogs
- for adding new dictionary and change plugin settings*/
+ for adding new dictionary and changing plugin settings*/
virtual DictDialog* dictDialog() = 0;
//! returns the actual translation of a word given in key
virtual QString search(QString key) = 0;
- //! \returns unique value (unique for every dictionary not plugin
+ //! \returns unique value (unique for every dictionary not plugin)
virtual uint hash() const = 0;
//! sets unique value (unique for every dictionary not plugin)
\param limit limit on number of results,
if limit=0 all matching words are returned
- After finishing search it have to emit
+ After finishing search it has to emit
\see CommonDictInterface:finalTranslation finalTranslation
*/
virtual QList<Translation*> searchWordList(QString word, int limit=0) = 0;
//! emited after change dictionary settings
void settingsChanged();
- /*! emmited to backbone when needed to inform user about something
+ /*! emitted to backbone when needed to inform user about something
\param Backbone::NotifyType gui my dacide to show different typet in
different ways
\param QString text of the notification
/*!
Shows add new dictionary dialog and returns settings of new dict
- \param parent parent widget on which will be displayed dialog
+ \param parent parent widget on which dialog will be displayed
*/
virtual Settings* addNewDictionary(QWidget*parent=0)=0;
/*!
Shows settings dialog and save new settings in plugin
- \param parent parent widget on which will be displayed dialog
+ \param parent parent widget on which dialog will be displayed
*/
virtual void changeSettings(QWidget*parent=0)=0;
};
*******************************************************************************/
/*! /file settings.h
-\brief Settings object for pluggins \see Settings
+\brief Settings object for plugins \see Settings
\author Bartosz Szatkowski <bulislaw@linux.com>
*/
sessions, moreover Backbone or GUI may want store some additional info in
plugin Settings.
- Its important for plugin to store all information given it in Settings.*/
+ It's important for plugin to store all information given to it in Settings.*/
class Settings {
public:
Settings(){}
/*! Translation is kind of GoF proxy, it stores key:translation pair and
- provide it in lazy way -> key is available always, but translation is fetched
+ provides it in lazy way -> key is available always, but translation is fetched
as late as possible*/
class Translation {
public:
//! \return parsed raw format into html
virtual QString toHtml() const = 0;
- //! \retrun whether given translation is taken from bookmarks
+ //! \return whether given translation is taken from bookmarks
virtual bool isBookmark() const {
return _bookmark;
}
/*!
Shows add new xdxf dictionary dialog and returns settings of new dict
- \param parent parent widget on which will be displayed dialog
+ \param parent parent widget on which dialog will be displayed
*/
Settings* addNewDictionary(QWidget *parent);
/*!
Shows settings dialog and save new settings in plugin
- \param parent parent widget on which will be displayed dialog
+ \param parent parent widget on which dialog will be displayed
*/
void changeSettings(QWidget *parent);
#include <QtGui>
#include "../../../includes/settings.h"
-//! Displays dialog which allow user to add new xdxf dictionary
+//! Displays dialog which allows user to add new xdxf dictionary
class XdxfLoadDialog : public QDialog {
Q_OBJECT
public:
/*! Displays dialog and returns settings of new dictionary
\return Setting object containing new dictionary settings or NULL in
- case which user cancel dialog
+ case user cancels dialog
*/
static Settings* getSettings(QWidget *parent);
- //! Returns choosen by user dictionary file path
+ //! Returns dictionary file path chosen by user
QString dicitonaryFilePath();
- //! Returns if user want to cache dictionary
+ //! Returns if user wants to cache dictionary
bool generateCache();
signals:
static Settings* getSettings(XdxfPlugin* plugin, QWidget *parent);
- //! Returns choosen by user dictionary file path
+ //! Returns dictionary file path chosen by user
QString dicitonaryFilePath();
- //! Returns if user want to cache dictionary
+ //! Returns if user wants to cache dictionary
bool generateCache();
private Q_SLOTS:
}
delete settings;
- emit settingsChanged();
+ Q_EMIT settingsChanged();
}
void XdxfPlugin::getDictionaryInfo() {
//! returns destination language code iso 639-2
QString langTo() const;
- //! returns dictionary name (like "old english" or so)
+ //! returns dictionary name (like "old English" or so)
QString name() const;
//! returns dictionary type (xdxf, google translate, etc)
QString infoNote() const;
/*! returns DictDialog object that creates dialogs
- for adding new dictionary and change plugin tings
+ for adding new dictionary and changing plugin things
*/
DictDialog* dictDialog();
//! returns a unique hash for a dictionary
uint hash() const;
- //! set unique value (unique for every dictionary not plugin)
+ //! sets unique value (unique for every dictionary not plugin)
void setHash(uint);
//! returns current plugin settings
void stop();
Q_SIGNALS:
- //! emited with percent count of caching progress, and time elapsed from
+ //! emitted with percent count of caching progress, and time elapsed from
//! last signal emit
void updateCachingProgress(int, int);
QSqlDatabase db;
QString db_name;
- //! number of words in dicrionary
+ //! number of words in dictionary
long _wordsCount;
- //! scan dictionary file to get information about it
+ //! scans dictionary file to get information about it
void getDictionaryInfo();
volatile bool stopped;