Merge branch 'cache' into google
authorJakub Jaszczynski <j.j.jaszczynski@gmail.com>
Tue, 24 Aug 2010 13:16:10 +0000 (15:16 +0200)
committerJakub Jaszczynski <j.j.jaszczynski@gmail.com>
Tue, 24 Aug 2010 13:16:10 +0000 (15:16 +0200)
Conflicts:
trunk/src/base/gui/MenuWidget.cpp

39 files changed:
styles.css [new file with mode: 0644]
trunk/src/base/backbone/BookmarkTranslations.h
trunk/src/base/backbone/Bookmarks.h
trunk/src/base/backbone/History.cpp
trunk/src/base/backbone/backbone.cpp
trunk/src/base/backbone/backbone.h
trunk/src/base/gui/BookmarksWidget.h
trunk/src/base/gui/DictManagerWidget.cpp
trunk/src/base/gui/DictManagerWidget.h
trunk/src/base/gui/DictTypeSelectDialog.h
trunk/src/base/gui/HistoryListDialog.h
trunk/src/base/gui/MainWindow.cpp
trunk/src/base/gui/MainWindow.h
trunk/src/base/gui/MenuTabWidget.cpp
trunk/src/base/gui/MenuTabWidget.h
trunk/src/base/gui/MenuWidget.cpp
trunk/src/base/gui/MenuWidget.h
trunk/src/base/gui/SearchBarWidget.cpp
trunk/src/base/gui/SearchBarWidget.h
trunk/src/base/gui/SettingsWidget.cpp
trunk/src/base/gui/SettingsWidget.h
trunk/src/base/gui/TranslationWidget.cpp
trunk/src/base/gui/TranslationWidget.h
trunk/src/base/gui/WelcomeScreenWidget.h
trunk/src/base/gui/WordListProxyStyle.h
trunk/src/base/gui/WordListWidget.cpp
trunk/src/base/gui/WordListWidget.h
trunk/src/base/xsl.xsl
trunk/src/includes/CommonDictInterface.h
trunk/src/includes/DictDialog.h
trunk/src/includes/GUIInterface.h
trunk/src/includes/settings.h
trunk/src/includes/translation.h
trunk/src/plugins/xdxf/src/XdxfDictDialog.h
trunk/src/plugins/xdxf/src/XdxfLoadDialog.h
trunk/src/plugins/xdxf/src/XdxfSettingsDialog.h
trunk/src/plugins/xdxf/src/xdxfplugin.cpp
trunk/src/plugins/xdxf/src/xdxfplugin.h
trunk/tests/mDictionaryTests/tst_Backbone.cpp

diff --git a/styles.css b/styles.css
new file mode 100644 (file)
index 0000000..d606bf3
--- /dev/null
@@ -0,0 +1,8 @@
+table,th,td{border-style:solid;border-color:black;}
+th.info{background-color:#99FF99;}
+th.key{background-color:#99CCFF;}
+/*p{margin:0px 0px 0px 0px;padding:0px 0px 0px 0px;font-style:italic}*/
+p{display:inline;font-style:italic;}
+
+
index 7f2dd6a..ab7ecf3 100644 (file)
@@ -19,9 +19,9 @@
 
 *******************************************************************************/
 
-/*! /file BookmarkTranslation.h
-\brief Bookmarks functionality needs its own translation  object - becouse
-    Translation object should use slighty different api of Bookmarks objects
+/*! \file BookmarkTranslation.h
+\brief Bookmarks functionality needs its own translation  object - because
+    Translation object should use slightly different api of Bookmarks objects
 
 \author Bartosz Szatkowski <bulislaw@linux.com>
 */
index 3726415..700b8da 100644 (file)
@@ -19,9 +19,9 @@
 
 *******************************************************************************/
 
-/*! /file Bookmarks.h
+/*! \file Bookmarks.h
 \brief Bookmarks functionality - marking words as favorite, managing marked
-    words, searching in marked words (witch cached translations)
+    words, searching in marked words (with cached translations)
 
 
 \author Bartosz Szatkowski <bulislaw@linux.com>
@@ -48,9 +48,9 @@ class BookmarkTranslation;
 /*! Bookmarks are way to store words that You think You will need to search
   for often.
 
-  When You add bookmark (by clickin on "star" in words list) You adds it to
+  When You add bookmark (by clickin on "star" in words list) You add it to
   special list with cached translations from all available dictionaries so
-  You can search for them quickly even when You delete coresponding dict.
+  You can search for them quickly even when You delete corresponding dict.
   */
 class Bookmarks
 {
@@ -62,31 +62,31 @@ public:
     */
     void add(Translation* translation);
 
-    /*! Removes word and coresponding translation cache from bookmark list
+    /*! Removes word and corresponding translation cache from bookmark list
         \param translation translation to be removed
     */
     void remove(Translation* translation);
 
     /*! \return all bookmarks (word and translation as a translation object
-     as a list
+     as a list)
      */
     QList<Translation*> list();
 
-    /*! search in bookmarks for given word (wildcards may apply '*' and '?')
+    /*! Searches in bookmarks for given word (wildcards may apply '*' and '?')
       \param word to search for
       \return list of matching Translation objects
       */
     QList<Translation*> searchWordList(QString word);
 
-    /*! Search for final translation of given word
-      \return word translation list in text format xml or html to be formated
+    /*! Searches for final translation of given word
+      \return word translation list in text format xml or html to be formatted
         and displayed
       \param word word to search for
       */
     QStringList search(QString word, QString dbname);
 
 
-    /*! clars bookmarks database */
+    /*! Clears bookmarks database */
     void clear();
 
 
index f4bd934..4693149 100644 (file)
@@ -65,7 +65,7 @@ void History::add(QString word) {
             return;
     }
 
-    //if we are not in head, we deleted everything ahed us
+    //if we are not in head, we deleted everything ahead of us
     if(currentElement > 0) {
         _history.remove(0, currentElement);
     }
@@ -96,7 +96,7 @@ void History::add(QString word) {
         _listAvailable = true;
     }
 
-    emit historyChanged(_prevAvailable,
+    Q_EMIT historyChanged(_prevAvailable,
                         _nextAvailable,
                         _listAvailable);
 }
@@ -111,7 +111,7 @@ QString History::previous() {
             _prevAvailable = false;
         }
 
-        emit historyChanged(_prevAvailable,
+        Q_EMIT historyChanged(_prevAvailable,
                             _nextAvailable,
                             _listAvailable);
 
@@ -130,7 +130,7 @@ QString History::next() {
            _nextAvailable = false;
         }
 
-        emit historyChanged(_prevAvailable,
+        Q_EMIT historyChanged(_prevAvailable,
                             _nextAvailable,
                             _listAvailable);
 
@@ -181,13 +181,13 @@ void History::setCurrentElement(int element) {
         _prevAvailable = false;
     }
 
-    emit historyChanged(_prevAvailable,
+    Q_EMIT historyChanged(_prevAvailable,
                         _nextAvailable,
                         _listAvailable);
 }
 
 void History::refreshStatus() {
-    emit historyChanged(_prevAvailable,
+    Q_EMIT historyChanged(_prevAvailable,
                         _nextAvailable,
                         _listAvailable);
 }
index 05e17f0..c642969 100644 (file)
@@ -18,7 +18,7 @@
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-/*! /file backbone.cpp
+/*! \file backbone.cpp
 \brief Backbone/core main file \see Backbone
 
 
@@ -30,7 +30,7 @@
 
 int Backbone::_searchLimit;
 
-// Sadly QtConcurent mapped dont let me use something like calling method of
+// Sadly QtConcurrent mapped doesn't let me use something like calling method of
 // some class with supplied argument
 QString mappedSearch;
 QList<Translation*> mapSearch(CommonDictInterface *dict) {
@@ -245,7 +245,7 @@ void Backbone::addDictionary(CommonDictInterface *dict, bool active) {
 
 
 void Backbone::translationReady() {
-    bool changed = 0; // prevents doubling ready() signal, when both if are
+    bool changed = 0; // prevents from doubling ready() signal, when both are
                       //  executed in one translationReady() call then second
                       // call doubles ready*() emit without any new data
     if(!dictFin && _innerResult.isFinished()) {
@@ -278,9 +278,9 @@ void Backbone::translationReady() {
 QStringList Backbone::getFilesFromDir(QString dir, QStringList nameFilter) {
     QDir plug(QDir::toNativeSeparators(dir));
     if(!plug.exists()) {
-        qDebug() << plug.absolutePath() << " folder dosen't exists";
+        qDebug() << plug.absolutePath() << " folder doesn't exist";
         Q_EMIT notify(Notify::Warning,
-                QString("%1 folder dosen't exists.").arg(plug.path()));
+                QString("%1 folder doesn't exist.").arg(plug.path()));
         return QStringList();
     }
     plug.setFilter(QDir::Files);
@@ -332,10 +332,10 @@ void Backbone::loadPrefs(QString fileName) {
     QFileInfo file(QDir::toNativeSeparators(fileName));
     QDir confDir(file.dir());
     if(!confDir.exists()){
-        qDebug() << "Configuration file dosn't exists ("
+        qDebug() << "Configuration file doesn't exist ("
                 << file.filePath() << ")";
         Q_EMIT notify(Notify::Warning,
-                QString("%1 configurationfile dosen't exists.")
+                QString("%1 configuration file doesn't exist.")
                 .arg(file.filePath()));
         return;
     }
@@ -377,10 +377,10 @@ void Backbone::loadDicts(QString fileName, bool _default) {
     QFileInfo file(QDir::toNativeSeparators(fileName));
     QDir confDir(file.dir());
     if(!confDir.exists()){
-        qDebug() << "Configuration file dosn't exists ("
+        qDebug() << "Configuration file doesn't exist ("
                 << file.filePath() << ")";
         Q_EMIT notify(Notify::Warning,
-                QString("%1 configurationfile dosen't exists.")
+                QString("%1 configurationfile doesn't exist.")
                 .arg(file.filePath()));
         return;
     }
@@ -395,9 +395,9 @@ void Backbone::loadDicts(QString fileName, bool _default) {
         if(!plug) {
             qDebug() << "Config file error: "
                     << set.value(dict + "/type", "").toString()
-                    << " dosen't exists";
+                    << " doesn't exist";
             Q_EMIT notify(Notify::Warning,
-                    QString("Configuration file error. %2 plugin dosen't exists.")
+                    QString("Configuration file error. %2 plugin doesn't exist.")
                     .arg(set.value(dict + "/type", "").toString()));
             continue;
         }
index 36d344b..17f4a69 100644 (file)
@@ -19,7 +19,7 @@
 
 *******************************************************************************/
 
-/*! /file backbone.cpp
+/*! \file backbone.cpp
 \brief Backbone/core main header \see Backbone
 
 
 
   Each plugin may live in multiple instances - each with its own dictionary,
   backbone must provide way to create them at start (with specific Settings) and
-  distinguich each ditionary.
+  distinguish each ditionary.
 
-  Backbone also manage bookmarks and history: providing interface to gui
+  Backbone also manages bookmarks and history: providing interface to gui.
 
   Backbone is also responsible for saving and spawning session via configs
   file (stored in ~/.mdictionary) -> configs are kind of tricky because
-  mDictionary is delivered with two simple dicts -> its necessary to separate default
-  configs from user configs (updating/reinstaling app results in overwriten
+  mDictionary is delivered with two simple dicts -> it's necessary to separate default
+  configs from user configs (updating/reinstalling app results in overwritten
   default config file), moreover config file there is general mdictionary
-  configuration (aparto from dictionaries and plugin ones).
+  configuration (apart from dictionaries and plugin ones).
 
   Other modules may set some internal backbone behaviour via \see setSettings():
   Settings object with option given:
      * history_size - int, size of stored searches
-     * search_limit - int, how many different word may each dictionary returns
+     * search_limit - int, how many different words each dictionary may return
      * search_dictionaries - true/false, whether search in dictionaries
      * search_bookmarks - true/false, whether search in bookmarks
 
     Searching schema:
         First GUI should ask for list of words matching given pattern
-        then eatch Translation object is capable of finging it own final translation
+        then each Translation object is capable of finding its own final translation
 
-      List of word:
-        - Gui call search(...)
-        - Backbone call plugins searchWordList(...) in idealThreadCount()+1 threads
+      List of words:
+        - Gui calls search(...)
+        - Backbone calls plugins searchWordList(...) in idealThreadCount()+1 threads
         - Backbone sets  the FutureWatcher to be notifed when plugins are done
-        - Backbone fetch results from Future<..> and formats it for gui then
+        - Backbone fetches results from Future<..> and formats it for gui then
            emits ready()
         - Gui calls result()
 
       Final translation:
-         - Gui call searchHtml()
-         - Backbone starts for eatch translation object toHtml in separate threads
+         - Gui calls searchHtml()
+         - Backbone starts for each translation object toHtml in separate threads
          - Backbone sets FutureWatcher to be notified after last toHtml returns
-         - Backbone fetch translation from Future<...> objects and calls
+         - Backbone fetches translation from Future<...> objects and calls
              htmlReady()
-         - gui calls htmlResult()
+         - Gui calls htmlResult()
 
 */
 class Backbone : public QObject
@@ -113,10 +113,10 @@ public:
     ~Backbone();
     Backbone(const Backbone& b);
 
-    //! \return all loadded dictionaries with activity state flag
+    //! \return all loaded dictionaries with activity state flag
     QHash<CommonDictInterface*, bool> getDictionaries();
 
-    //! \return all loadded plugins
+    //! \return all loaded plugins
     QList<CommonDictInterface*> getPlugins();
 
     //! \return history of performed searches
@@ -125,41 +125,41 @@ public:
     //! \return return search fesult
     QMultiHash<QString, Translation*> result();
 
-    //! \return maximum number of word that plugin could find
+    //! \return maximum number of words that plugin could find
     int searchLimit() const;
 
     //! \return final translation (after searching for html)
     QStringList htmls();
 
-    /*! maximum number of translation that each plugin may return; it must be
-        public static becouse of QtConcurent::mapped restrictions about
+    /*! maximum number of translations that each plugin may return; it must be
+        public static because of QtConcurent::mapped restrictions about
         what kind of function may be used there see Qt docs */
     static int _searchLimit;
 
 
 
 public Q_SLOTS:
-    //! stops all current searches and emiting searchCanceled signal
+    //! stops all current searches and emits searchCanceled signal
     void stopSearching();
 
-    /*! search for a word translation
+    /*! searches for a word translation
        \param word to be translated
       */
     void search(QString word);
 
     /*! sets active dictionaries (searches are performed only in active dicts
-       \param List of dictionaris to be activated
+       \param List of dictionaries to be activated
       */
     void selectedDictionaries(QList<CommonDictInterface* >);
 
-    /*! adds new dictionary and activate it
+    /*! adds new dictionary and activates it
       \param dict dictionary to be added
       \param active decides whether searches are perfomed in given dictionaries
       */
     void addDictionary(CommonDictInterface* dict, bool active = 1);
 
 
-    //! stops all current activity - emiting signal \see closeOk
+    //! stops all current activity - emitting signal \see closeOk
     void quit();
 
 
@@ -178,7 +178,7 @@ public Q_SLOTS:
       */
     void removeDictionary(CommonDictInterface* dict);
 
-    /*! saves plugins new state/configuration after each change */
+    /*! Saves plugins new state/configuration after each change */
     void dictUpdated();
 
     /*! Performs search for final translation (html/xml) form
@@ -187,9 +187,9 @@ public Q_SLOTS:
     void searchHtml(QList<Translation*>);
 
 
-    /*! add bookmarks to given translations (translation object is fetched and
-      added to bookmarks data base (key and translation stored in db)
-      \param translation translation object  to be stored in db
+    /*! adds bookmarks to given translations (translation object is fetched and
+      added to bookmarks data base (key and translation stored in db))
+      \param translation translation object to be stored in db
       */
     void addBookmark(QList<Translation*> translations) {
         foreach(Translation* translation, translations)
@@ -198,7 +198,7 @@ public Q_SLOTS:
     }
 
 
-    /*! Remove bookmarks to given translatios
+    /*! Removes bookmarks to given translations
       \param translation remove bookmark to this translation
       */
     void removeBookmark(QList<Translation*> translations) {
@@ -208,16 +208,16 @@ public Q_SLOTS:
 
 
 
-    /*! Remove all bookmarks
+    /*! Removes all bookmarks
       */
     void removeAllBookmark(){
         _bookmarks.clear();
     }
 
 
-   /*! Searching for list of bookmarks may take some time, so i moved it to
-       new thread (to avoid gui blocking), futher its consistent with ordinary
-       searching for list of word (\see search)
+   /*! Searching for list of bookmarks may take some time, so I moved it to
+       new thread (to avoid gui blocking), further it's consistent with ordinary
+       searching for list of words (\see search)
        */
    void fetchBookmarks() {
         _result.clear();
@@ -237,12 +237,12 @@ public Q_SLOTS:
 
    /*! Sets settings for backbone: history_size, search_limit,
        searching backends (search_bookmarks, search_dictionaries)
-       \param settings settings object with opitons set
+       \param settings settings object with options set
        */
     void setSettings(Settings* settings);
 
 
-    /*! \return coresponding settings object with history_size, search_limit,
+    /*! \return corresponding settings object with history_size, search_limit,
        searching backends (search_bookmarks, search_dictionaries)
        */
     Settings* settings();
@@ -253,24 +253,24 @@ public Q_SLOTS:
 
 
 Q_SIGNALS:
-    /*! emmited when backbone is ready to close - after getting stop signal it
+    /*! emitted when backbone is ready to close - after getting stop signal it
         should kill all threads and so on */
     void closeOk();
 
-    //! emitted when there are search result ready to fetch
+    //! emitted when there are search results ready to fetch
     void ready();
 
     //! emitted when html result is ready to fetch
     void htmlReady();
 
-    //! throwed when searches are stopped
+    //! thrown when searches are stopped
     void searchCanceled();
 
-    //! emmited when bookmark list is ready to fetch
+    //! emitted when bookmark list is ready to fetch
     void bookmarksReady();
 
-    /*! emited by direct connection to plugins notifying signals
-        \param Notify::NotifyType gui my dacide to show different typet in
+    /*! emitted by direct connection to plugins notifying signals
+        \param Notify::NotifyType gui may decide to show different types in
             different ways
         \param QString text of the notification
     */
@@ -285,7 +285,7 @@ private:
     QList<CommonDictInterface*> _plugins;  // List of plugins
 
 
-    QFuture<QList<Translation*> > _innerResult; //Res of concurent word search
+    QFuture<QList<Translation*> > _innerResult; //Res of concurrent word search
     QFuture<QString> _innerHtmlResult;  // Result of html search
     QFuture<QList<Translation*> > _innerBookmarks; //Res of search in bookmarks
     QFuture<QList<Translation*> > _innerListBookmarks; //Res of search in bookmarks
@@ -309,10 +309,10 @@ private:
     int _defaultSearchLimit;
     int _historyLen, _defaultHistoryLen;
 
-    bool dryRun; // mainly for testing - when true then dosent bother configs etc
+    bool dryRun; // mainly for testing - when true then doesn't bother configs etc
     bool stopped; // true when user stops searching/fetching
-    bool bookmarkFin, dictFin; // inform whether givent search type is ready
-    bool _searchDicts, _searchBookmarks; // whether perform search in given source
+    bool bookmarkFin, dictFin; // inform whether given search type is ready
+    bool _searchDicts, _searchBookmarks; // whether search performed in given source
 
     Bookmarks _bookmarks;
 
index fcc0c97..9c347fb 100644 (file)
@@ -32,7 +32,7 @@
 
 //! Implements bookmarks management widget
 /*!
-  Allow user to show all or remove all bookmarks
+  Allows user to show all or remove all bookmarks
   */
 class BookmarksWidget : public QDialog
 {
index f11d5ed..22fe241 100644 (file)
@@ -127,7 +127,7 @@ void DictManagerWidget::hideEvent(QHideEvent *e)
             checkedDicts.push_back(dictsHash[item]);
         }
     }
-    emit selectedDictionaries(checkedDicts);
+    Q_EMIT selectedDictionaries(checkedDicts);
 
     QWidget::hideEvent(e);
 }
@@ -142,7 +142,7 @@ void DictManagerWidget::addNewDictButtonClicked() {
 
         if(settings != NULL) {
             CommonDictInterface* newDict = selectedPlugin->getNew(settings);
-            emit addDictionary(newDict);
+            Q_EMIT addDictionary(newDict);
             refreshDictsList();
         }
     }
@@ -156,7 +156,7 @@ void DictManagerWidget::itemSelected(QListWidgetItem *) {
 void DictManagerWidget::removeButtonClicked() {
     QList<QListWidgetItem*> selected = dictListWidget->selectedItems();
     if(selected.count() > 0) {
-        emit removeDictionary(dictsHash[selected[0]]);
+        Q_EMIT removeDictionary(dictsHash[selected[0]]);
         refreshDictsList();
     }
 }
index 324ae11..4d587a2 100644 (file)
@@ -34,7 +34,7 @@
 //! Implements dictionaries management widget
 /*!
   Shows list of loaded dictionaries and their states (active/inactive).
-  It allow to change dicts states, add new dict, remove selected one or
+  It allows to change dicts states, add new dict, remove selected one or
   change settings of selected dict. All changes are saved automatically after
   hiding of this widget.
   */
@@ -54,17 +54,17 @@ protected:
     void hideEvent(QHideEvent *e);
 
 Q_SIGNALS:
-    //! Emited when hiding widget, it will save states of dictionaries
+    //! Emitted when hiding widget, it will save states of dictionaries
     /*! \param list of only active dictionaries
       */
     void selectedDictionaries(QList<CommonDictInterface*>);
 
-    //! Emited when user wants to add new dictionary
-    /*! \param new dictionary returned by specyfic plugin dialog
+    //! Emitted when user wants to add new dictionary
+    /*! \param new dictionary returned by specific plugin dialog
       */
     void addDictionary(CommonDictInterface*);
 
-    //! Emited when user wants to remove dictionary
+    //! Emitted when user wants to remove dictionary
     /*! \param dictionary which will be removed
       */
     void removeDictionary(CommonDictInterface*);
@@ -77,7 +77,7 @@ private Q_SLOTS:
         later passed as parameter of addDictionary signal*/
     void addNewDictButtonClicked();
 
-    /*! Pass selected dictionary from list as parameter of removeDictionary
+    /*! Passes selected dictionary from list as parameter of removeDictionary
         signal */
     void removeButtonClicked();
     void itemSelected(QListWidgetItem*);
index cb805db..6b0537e 100644 (file)
@@ -32,7 +32,7 @@
 #define PLUGIN_ROW_ROLE 99      //TODO remove this
 
 
-//! Implements pluigin selection dialog
+//! Implements plugin selection dialog
 /*!
   Shows list of loaded dictionaries plugins.
   Static function addNewdict will return selected plugin.
@@ -44,13 +44,13 @@ public:
     /*!
       \param plugins list of loaded plugins
       \param parent widget
-      \return selected plugin, if user cancel dialog it returns NULL
+      \return selected plugin, if user cancels dialog it returns NULL
       */
     static CommonDictInterface* addNewDict(
             QList<CommonDictInterface* > plugins,
             QWidget *parent = 0);
 
-    //! Returns selected by user plugin
+    //! Returns plugin selected by user
     CommonDictInterface* selectedPlugin();
 
 protected:
index 84d7cfe..b9aea76 100644 (file)
@@ -33,7 +33,7 @@
 
 //! Implements history list dialog
 /*!
-  Shows history list and allow user to select one word of it.
+  Shows history list and allows user to select one word of it.
   */
 class HistoryListDialog : public QDialog
 {
index aa239f0..1f75d97 100644 (file)
@@ -22,7 +22,6 @@
 //Created by Mateusz Półrola
 
 #include "MainWindow.h"
-#include "ui_MainWindow.h"
 #include <QtGui>
 #ifdef Q_WS_MAEMO_5
     #include <QMaemo5InformationBox>
@@ -63,7 +62,7 @@ void MainWindow::initializeUI() {
         setAttribute(Qt::WA_Maemo5StackedWindow);
     #endif
 
-    //translationWidget is antoher stacked window, so we don't add it to layout
+    //translationWidget is another stacked window, so we don't add it to layout
     //only create it with this widget as parent
     translationWidget = new TranslationWidget(this);
 
@@ -143,8 +142,8 @@ void MainWindow::initializeUI() {
 }
 
 void MainWindow::closeEvent(QCloseEvent *event) {
-    //reqest to stop all searches and close app
-        emit quit();
+    //request to stop all searches and close app
+        Q_EMIT quit();
         event->accept();
 }
 
@@ -181,7 +180,7 @@ void MainWindow::wordListReady() {
         showNotify(Notify::Info, tr("Can't find any matching words"));
 
         //show empty list to remove results of old search
-        emit showWordList(searchResult);
+        Q_EMIT showWordList(searchResult);
     }
     else {
         //find translations of the same key word
@@ -192,19 +191,19 @@ void MainWindow::wordListReady() {
 
 
         if(!exactSearch()) {
-            emit showWordList(searchResult);
+            Q_EMIT showWordList(searchResult);
         }
         else {
             #ifndef Q_WS_MAEMO_5
             //on desktop we show word list in exact search
-                emit showWordList(searchResult);
+                Q_EMIT showWordList(searchResult);
             #endif
             bool foundExactMatch = false;
             QHash<QString, QList<Translation*> >::iterator j;
             for(j = searchResult.begin(); j != searchResult.end(); j++) {
                 if(j.key() == searchString && !foundExactMatch) {
                     foundExactMatch = true;
-                    emit searchTranslations(j.value());
+                    Q_EMIT searchTranslations(j.value());
                     break;
                 }
             }
@@ -213,7 +212,7 @@ void MainWindow::wordListReady() {
                 showNotify(Notify::Info,
                            tr("Can't find exactly matching word"));
 
-                emit showWordList(searchResult);
+                Q_EMIT showWordList(searchResult);
             }
 
         }
@@ -233,7 +232,7 @@ void MainWindow::translationsReady() {
     }
     #endif
 
-    emit showTranslation(backbone->htmls());
+    Q_EMIT showTranslation(backbone->htmls());
 }
 
 QList<CommonDictInterface*> MainWindow::getPlugins() {
@@ -252,7 +251,7 @@ void MainWindow::search(QString word) {
 
 void MainWindow::searchExact(QString word) {
     setExactSearch(true);
-    //searching with searchBar, not directly by emiting searchWordList(),
+    //searching with searchBar, not directly by emitting searchWordList(),
     //because it will set search word in searchBar's edit line
     //this function is only used by history and when searching from attributes
     searchBarWidget->search(word);
index 6e8e44f..66fb906 100644 (file)
@@ -43,9 +43,9 @@
 
 //! Implements interface for GUI
 /*!
-  Create all of GUI subcomponents, and connects all GUI interface signals with
+  Creates all of GUI subcomponents, and connects all GUI interface signals with
   suitable backbone signals and slots. Only this class has direct access to
-  backbone object. It manages all request of subcomponents e. g. searching of
+  backbone object. It manages all requests of subcomponents e. g. searching of
   given word, displaying history, removing dictionary.
   It also provide data from backbone to subcomponents e. g. result of search.
 */
@@ -56,7 +56,7 @@ class MainWindow : public GUIInterface
 public:
     //! Constructor
     /*!
-      \param backbone object which will doing all searches and returns data
+      \param backbone object which will be doing all searches and returning data
       \param parent parent widget of this window
       */
 
@@ -78,19 +78,19 @@ public:
     QList<CommonDictInterface*> getPlugins();
 
     //! Indicates if GUI is in exact search mode.
-    /*! When GUI is in exact search mode it search for word, and
-        if find exacly matching translation it directly displays it, whithout
+    /*! When GUI is in exact search mode it searches for word, and
+        if it finds exactly matching translation it directly displays it, without
         displaying matching word list. This mode is used for browsing search
-        history and search words from application arguments.
+        history and searching words from application arguments.
         \returns flag indicating if GUI is in exact search mode
     */
     bool exactSearch();
 
     //! Sets GUI exact search mode.
-    /*! When GUI is in exact search mode it search for word, and
-        if find exacly matching translation it directly displays it, whithout
+    /*! When GUI is in exact search mode it searches for word, and
+        if it finds exactly matching translation it directly displays it, without
         displaying matching word list. This mode is used for browsing search
-        history and search words from application arguments.
+        history and searching words from application arguments.
         \param exactSearch flag indicating if GUI will be in exact search mode
         \sa exactSearch()
     */
@@ -99,7 +99,7 @@ public:
 
     //! Returns current settings.
     /*!
-       \returns Settings object containing curren application settings
+       \returns Settings object containing current application settings
       */
     Settings* settings();
 
@@ -112,9 +112,9 @@ public:
 
 
  public Q_SLOTS:
-    //! Search in exact mode for given word
+    //! Searches in exact mode for given word
     /*!
-      GUI will be automaticaly set into exact search mode, and after search or
+      GUI will be automatically set into exact search mode, and after search or
       break will be unset from exact search mode.
       \param word which will be searched in dictionaries
       */
@@ -134,20 +134,20 @@ public:
       Checks if received list is empty, in that case displays suitable
       information. If GUI is in exact search mode it will search for exact
       word in received list, and if word is found it will emit signal to
-      display it's translation. Otherwise it will display list of matching
+      display its translation. Otherwise it will display list of matching
       words and show suitable information.
       \sa exactSearch()
       \sa showTranslation()
      */
     void wordListReady();
 
-    //! Gets translation strings from backbone and emit signal to display them
+    //! Gets translation strings from backbone and emits signal to display them
     void translationsReady();
 
     //! Adds to history key words from given translations
     /*!
-      By default this slot is connected to signal searchTranslations, and
-      passed translation list contains only translation with the same key, so
+      By default this slot is connected to searchTranslations signal, and
+      passed translation list contains only translations with the same key, so
       only one word is added to history.
       \param list of translations with key words
       \sa searchTranslations()
@@ -187,13 +187,13 @@ private Q_SLOTS:
     //! Enables menu
     void enableMenu();
 
-    //! When user break searching it make sure that exact search mode will be
+    //! When user breaks searching it makes sure that exact search mode will be
     //! disabled
     void breakSearching();
 
 
 protected:
-    /*! When user wants to close application, we first sends signal to stop all
+    /*! When user wants to close application, we first send signal to stop all
         ongoing searches.
     */
     void closeEvent(QCloseEvent *);
index 0b52973..f2585bb 100644 (file)
@@ -31,7 +31,7 @@ MenuTabWidget::MenuTabWidget(QWidget *parent) :
 
 
 void MenuTabWidget::hideEvent(QHideEvent *e) {
-    //just set parent to null, and allow event to by handled by default handler
+    //just set parent to null, and allow event to be handled by default handler
     setParent(NULL);
 
 
index b78e909..cb7c915 100644 (file)
@@ -38,8 +38,8 @@ public:
 protected:
     /*!
       Reimplemented default hideEvent function.
-      Right before hide widget it sets it's parent to NULL, which prevent
-      widget to be deleted by menu bar.
+      Right before hiding widget it sets its parent to NULL, which prevents
+      widget from being deleted by menu bar.
     */
     void hideEvent(QHideEvent *);
 };
index fa6210b..0df9e24 100644 (file)
@@ -35,7 +35,7 @@ MenuWidget::MenuWidget(QWidget *parent) :
 }
 
 MenuWidget::~MenuWidget() {
-    //because tabWidget have no parent we must destroy it
+    //because tabWidget has no parent we must destroy it
    delete tabWidget;
 }
 
@@ -58,9 +58,9 @@ void MenuWidget::removeSubMenu(QString title) {
 }
 
 QWidget* MenuWidget::createWidget(QWidget *) {
-    /*When we have request to create new widget we returns tabWidget.
+    /*When we have request to create new widget we return tabWidget.
     When the menu is closing, tabWidget will receive hideEvent which will set
-    it parent to NULL and prevent it from delete, so we can still use this
+    its parent to NULL and prevent it from delete, so we can still use this
     widget*/
     return tabWidget;
 
index 37ec77b..1b23106 100644 (file)
@@ -46,8 +46,8 @@ public:
     void addSubMenu(QString title, QWidget* widget);
 
     /*!
-        Remove submenu from menu. It will remove first menu with passed title.
-        /param title Name of submeny which will be removed.
+        Removes submenu from menu. It will remove first menu with passed title.
+        /param title Name of submenu which will be removed.
     */
     void removeSubMenu(QString title);
 
index cc4e6c8..43519dc 100644 (file)
@@ -185,9 +185,8 @@ void SearchBarWidget::initializeUI() {
                 fullScreenToolButton->sizeHint().height()*2);
     #endif*/
 
-
-    searchingProgressBar = new QProgressBar(this);
-    //progress bar have minimum and maximum values set to 0, which will effect
+    searchingProgressBar = new QProgressBar();
+    //progress bar has minimum and maximum values set to 0, which will effect
     //with "I'm alive" bar
     searchingProgressBar->setMinimum(0);
     searchingProgressBar->setMaximum(0);
@@ -219,7 +218,7 @@ void SearchBarWidget::initializeUI() {
 
 void SearchBarWidget::searchPushButtonClicked() {
     if(_isSearching) {
-        emit stopSearching();
+        Q_EMIT stopSearching();
     }
     else {
         search(searchWordLineEdit->text());
@@ -230,7 +229,7 @@ void SearchBarWidget::searchPushButtonClicked() {
 void SearchBarWidget::search(QString word) {
     if(!_isSearching && !word.isEmpty()) {
         searchWordLineEdit->setText(word);
-        emit searchForTranslations(word);
+        Q_EMIT searchForTranslations(word);
     }
 }
 
@@ -251,7 +250,7 @@ void SearchBarWidget::searchDelay(QString word) {
 void SearchBarWidget::delaySearchTimeout() {
     delayTimer.stop();
     if(!_isSearching) {
-        emit searchForTranslations(delayString);
+        Q_EMIT searchForTranslations(delayString);
     }
 }
 
@@ -279,7 +278,7 @@ void SearchBarWidget::setIdle() {
     searchPushButton->setText(tr("Search"));
     setEnabled(true);
     _isSearching = false;
-    emit refreshHistoryButtons();
+    Q_EMIT refreshHistoryButtons();
 }
 
 
index 1172d7b..6fed28f 100644 (file)
@@ -37,7 +37,7 @@
     and buttons to start/stop search and browse search history.
     Line edit and history buttons are disabled when search is ongoing,
     only start/stop button stays active. When searching it also displays
-    progress bar
+    progress bar.
 */
 class SearchBarWidget : public QWidget {
     Q_OBJECT
@@ -46,30 +46,30 @@ public:
     ~SearchBarWidget();
 
 Q_SIGNALS:
-    //! Requests to search for list of matching words to word passed as
+    //! Requests to search for list of words matching word passed as
     //! parameter
     void searchForTranslations(QString);
 
-    //! Request to stop all active searchings
+    //! Requests to stop all active searchings
     void stopSearching();
 
-    //! Request to show previous translation in history
+    //! Requests to show previous translation in history
     void historyPrev();
 
-    //! Request to show next translation in history
+    //! Requests to show next translation in history
     void historyNext();
 
-    //! Request to show history list
+    //! Requests to show history list
     void historyShow();
 
-    //! Request to refresh state of history buttons
+    //! Requests to refresh state of history buttons
     void refreshHistoryButtons();
 
 public Q_SLOTS:
-    //! Enable or disable search word line edit and history buttons
+    //! Enables or disables search word line edit and history buttons
     /*!
       While searching it disables only history button and line edit.
-      Search/Stop button is always enabled
+      Search/Stop button is always enabled.
     */
     void setEnabled(bool);
 
@@ -82,20 +82,20 @@ public Q_SLOTS:
 
     //! Sets search bar in idle state
     /*!
-      Hides "busy" bar and enables all widgets, refresh state of history buttons
-      by emmiting refreshHistoryButtons signal
+      Hides "busy" bar and enables all widgets, refreshes state of history buttons
+      by emitting refreshHistoryButtons signal
       */
     void setIdle();
 
-    //! Search for given word
+    //! Searches for given word
     /*!
       Sets word as text in search word line edit
       */
     void search(QString word);
 
-    //! Start to search for given word after 500 ms
+    //! Starts to search for given word after 500 ms
     /*!
-      Sets word as text in search word line edit, and wait 500 ms to start
+      Sets word as text in search word line edit, and waits 500 ms to start
       search. If in meanwhile this slot is called again it will stop previous
       timers.
       */
index 4cf721d..77a239b 100644 (file)
@@ -117,7 +117,7 @@ void SettingsWidget::hideEvent(QHideEvent *e) {
         else
             newSettings->setValue("search_bookmarks", "false");
 
-        //setting new settings only if their are different that old ones
+        //setting new settings only if they are different that old ones
         QString key;
         foreach(key, newSettings->keys()) {
             if(settings->value(key) != newSettings->value(key)) {
index f7ed38d..4889a91 100644 (file)
@@ -34,8 +34,8 @@
 //! Implements applications settings widget
 /*!
   Shows settings that user can change.
-  It allow to change limit of searches and limit of history.
-  Also it allow to select if application have to search in dictionaries or in
+  It allows to change limit of searches and limit of history.
+  It also allows to select if application has to search in dictionaries or in
   bookmarks or in both of them. All changes are saved automatically after
   hiding of this widget.
   */
@@ -47,7 +47,7 @@ public:
     /*!
       \param parent parent of this widget, which must be subclass of
       GUIInterface, because it will use it to get current settings and
-      sets new ones.
+      set new ones.
       */
     explicit SettingsWidget(GUIInterface *parent = 0);
 
index f62ffda..cacfebf 100644 (file)
@@ -46,6 +46,11 @@ TranslationWidget::TranslationWidget(QWidget *parent):
     connect(textEdit, SIGNAL(search()),
            this, SLOT(searchSelected()));
 
+    QFile file(":/xsl/xsl.xsl");
+    if(!file.open(QFile::ReadOnly))
+        qDebug()<<"can't open a xslt file";
+    else
+        xslt=file.readAll();
 }
 
 
@@ -85,21 +90,13 @@ void TranslationWidget::show(QStringList translations) {
     textEdit->repaint(this->rect());
     update(this->rect());
 
-    emit updateSize();
+    Q_EMIT updateSize();
 }
 
 QString TranslationWidget::XslConversion(QString translation)
 {
     QXmlQuery myQuery(QXmlQuery::XSLT20);
     myQuery.setFocus(translation);
-
-    QFile file(":/xsl/xsl.xsl");
-    if(!file.open(QFile::ReadOnly)){
-        qDebug()<<"can't open a xslt file";
-        return translation;
-    }
-    QString xslt;
-    xslt=file.readAll();
     myQuery.setQuery(xslt);
     QString result("");
     myQuery.evaluateTo(&result);
@@ -275,7 +272,7 @@ void TranslationWidget::searchSelected() {
     #ifdef Q_WS_MAEMO_5
         hide();
     #endif
-    emit search(textEdit->textCursor().selectedText());
+    Q_EMIT search(textEdit->textCursor().selectedText());
 }
 
 #ifdef Q_WS_MAEMO_5
index 46ac8c1..c172d04 100644 (file)
@@ -37,7 +37,7 @@
 
 //! Displays translation of word found in dictionaries
 /*!
-    Display many translation of word, formatted as html.
+    Displays many translations of word, formatted as html.
 */
 class TranslationWidget : public QScrollArea {
     Q_OBJECT
@@ -53,7 +53,7 @@ public Q_SLOTS:
     //! Show widget.
     void show();
 
-    //! Request to show translation of word list passed as parameter.
+    //! Requests to show translation of word list passed as parameter.
     void show(QStringList);
 
 protected:
@@ -73,6 +73,7 @@ private:
     QToolButton* zoomInToolButton;
     QToolButton* zoomOutToolButton;
     TranslationTextEdit *textEdit;
+    QString xslt;
     #ifdef Q_WS_MAEMO_5
         QToolButton* zoomInButton;
         QToolButton* zoomOutButton;
index 463d979..aedc0e3 100644 (file)
@@ -29,7 +29,7 @@
 #include <QScrollArea>
 #include <QtGui>
 
-//! Displays wlecome screen with logo and name of application
+//! Displays welcome screen with logo and name of application
 class WelcomeScreenWidget : public QScrollArea
 {
     Q_OBJECT
index 4a1647c..6843298 100644 (file)
@@ -20,7 +20,7 @@
 
 *******************************************************************************/
 //! \file WordListProxyStyle.h
-//! \brief Implements custom style which draw checkboxes as stars
+//! \brief Implements custom style which draws checkboxes as stars
 //! \author Mateusz Półrola <mateusz.polrola@comarch.pl>
 
 #ifndef WORDLISTPROXYSTYLE_H
 #include <QProxyStyle>
 #include <QtGui>
 
-//! Custom proxy style that draw checkboxes as stars.
-//! It will automatically wrap setted style and change only
+//! Custom proxy style that draws checkboxes as stars.
+//! It will automatically wrap set style and change only
 //! checkboxes drawing.
 class WordListProxyStyle : public QProxyStyle
 {
 public:
     WordListProxyStyle();
-    //! Reimplemented drawPrimitive method which only draw different
+    //! Reimplemented drawPrimitive method which only draws different
     //! PE_IndicatorCheckBox elements
     //! \sa QProxyStyle::drawPrimitive()
     void drawPrimitive(PrimitiveElement element,
index a753588..02aba20 100644 (file)
@@ -66,7 +66,7 @@ void WordListWidget::addWord(QString word, int row) {
                            Qt::ItemIsUserCheckable);
 
     /*checking if word is already in bookmarks, information about that is
-    stored in it's translation object (not all translation have to be in
+    stored in its translation object (not all translations have to be in
     bookmarks)*/
     bool bookmark = false;
     Translation* t;
@@ -112,7 +112,7 @@ void WordListWidget::showSearchResults(
 void WordListWidget::wordClicked(QModelIndex index) {
     //we're getting translation based on data in index
     qDebug()<<searchResult[index.data().toString()].at(0)->dictionaryInfo();
-    emit showTranslation(
+    Q_EMIT showTranslation(
             searchResult[index.data().toString()]);
 }
 
@@ -129,15 +129,15 @@ void WordListWidget::wordChecked(QModelIndex index) {
     QModelIndex item = selectedIndexes().at(0);
     if(!item.isValid()) return;
 
-    //to shorten lag between clicking on star and it's change
+    //to shorten lag between clicking on star and its change
     repaint();
 
     //depending on new state emit suitable signal
     if(state == Qt::Checked) {
-        emit addBookmark(searchResult[item.data().toString()]);
+        Q_EMIT addBookmark(searchResult[item.data().toString()]);
     }
     else {
-        emit removeBookmark(searchResult[item.data().toString()]);
+        Q_EMIT removeBookmark(searchResult[item.data().toString()]);
     }
 }
 
@@ -147,16 +147,16 @@ void WordListWidget::mouseReleaseEvent(QMouseEvent *event) {
     //firstly we normally handle this event
     QTreeView::mouseReleaseEvent(event);
 
-    //then we checking at which item user clicked
+    //then we check at which item user clicked
     QModelIndex index = indexAt(event->pos());
     if(!index.isValid()) return;
 
     /*if there are no selected items we return, that occurs sometimes
-    on maemo, when user is scrolling list and click to stop the scroll,
-    system don't select item but emitting mouseReleaseEvent*/
+    on maemo, when user is scrolling list and clicks to stop the scroll,
+    system doesn't select item but emits mouseReleaseEvent*/
     if(selectedIndexes().count() == 0) return;
 
-    //if user don't click on word either on star return
+    //if user doesn't click either on word or on star, return
     if(selectedIndexes().at(0) != index && selectedIndexes().at(1) != index)
         return;
 
index 1ff0c12..877be76 100644 (file)
@@ -33,9 +33,9 @@
 
 //! Displays list of words found in dictionaries
 /*!
-    It allow user to select word to see it's translation or to mark or unmark
-    it as "star" (add/remove from bookmarks). It inherit from QTreeView
-    to allow display two columns, one with words and second with stars.
+    It allows user to select word to see its translation or to mark or unmark
+    it as "star" (add/remove from bookmarks). It inherits from QTreeView
+    to allow to display two columns, one with words and second with stars.
     Star is normal checkable item. To get effect of star we need to set
     style (WordListProxyStyle) for this widget.
   */
@@ -46,26 +46,26 @@ public:
 
 
 Q_SIGNALS:
-    //! Request to show translation which is described by passed translations
+    //! Requests to show translation which is described by passed translations
     //! objects
     void showTranslation(QList<Translation*>);
 
 
-    //! Request to add selected word to bookmarks
+    //! Requests to add selected word to bookmarks
     void addBookmark(QList<Translation*>);
 
-    //! Request to remove selected word from bookmarks
+    //! Requests to remove selected word from bookmarks
     void removeBookmark(QList<Translation*>);
 
 
 public Q_SLOTS:
     //! Shows search results
     /*!
-      \param hash of found words and it's translations objects
+      \param hash of found words and its translations objects
     */
     void showSearchResults(QHash<QString, QList<Translation*> >);
 
-    //! Lock words list, while backbone is doing somethig in background
+    //! Locks words list, while backbone is doing something in background
     void lockList();
 
     //! Unlocks words list
@@ -73,10 +73,10 @@ public Q_SLOTS:
 
 protected:
     //! Reimplemented standard mouseReleaseEvent to check if user clicked on
-    //! word on it's star to emit suitable signal
+    //! word or on its star to emit suitable signal
     void mouseReleaseEvent(QMouseEvent *event);
 
-    //! Resize the size of columns to assure that stars are always on right
+    //! Resizes the size of columns to assure that stars are always on right
     //! side next to scroll bar
     void resizeEvent(QResizeEvent *event);
 
@@ -102,7 +102,7 @@ private:
     //! Resizes sizes of colums after adding new words or after resize event.
     void resizeColumns();
 
-    //! Association between words and their's translations
+    //! Association between words and their translations
     QHash<QString, QList<Translation*> > searchResult;
 };
 
index e966813..a3dd6e1 100644 (file)
@@ -3,8 +3,11 @@
 
 <xsl:template match="/">
        <html>
-       <body bgcolor="#FF0000">
-               <table border="1" WIDTH="100%">
+        <head>
+        <link rel="stylesheet" type="text/css" href="styles.css" />  
+        </head>
+       <body>
+               <table>
                <xsl:for-each select="ar/dict"> 
                        <xsl:apply-templates/>
                </xsl:for-each>
@@ -14,6 +17,7 @@
 </xsl:template> 
 
 <xsl:template match="info">
+<<<<<<< HEAD
        <!-- <xsl:variable name="path" select="info/@path"/>-->
        <tr bgcolor="#99FF99">
                <th>            
                </xsl:if>
                <xsl:value-of select="."/> <!-- <img src="{$path}"/> -->
                </th>
+=======
+       <tr>
+       <th class="info"><xsl:value-of select="."/></th>
+>>>>>>> 3e7118bfec64f44b11205ca836cb1a82c725d123
        </tr>
 </xsl:template>
 
 <xsl:template match="key">
+<<<<<<< HEAD
        <tr bgcolor="#99CCFF">
        <th><xsl:value-of select="."/></th>                     
        </tr>
+=======
+       <tr>
+       <th class="key"><xsl:value-of select="."/></th>         
+        </tr>
+>>>>>>> 3e7118bfec64f44b11205ca836cb1a82c725d123
 </xsl:template> 
 
 <xsl:template match="t">
 </xsl:template>
 
 <xsl:template match="tr">
-       [<i><xsl:apply-templates/></i>]
+       [<p><xsl:apply-templates/></p>]
 </xsl:template> 
 
 <xsl:template match="pot">
-       ,<i><xsl:apply-templates/></i>
+       ,<p><xsl:apply-templates/></p>
 </xsl:template>
 
 <xsl:template match="tence">
-       ,<i><xsl:apply-templates/></i>
+       ,<p><xsl:apply-templates/></p>
 </xsl:template>
 
 <xsl:template match="def">
@@ -59,7 +73,7 @@
 
 <xsl:template match="c">
        <xsl:variable name="atr" select="@c"/>
-       <font color="{$atr}"> <xsl:apply-templates/> </font>
+       <font color="{$atr}"> <xsl:apply-templates/></font>
 </xsl:template>
 
 </xsl:stylesheet> 
index 74a67cb..9034317 100644 (file)
@@ -19,7 +19,7 @@
 
 *******************************************************************************/
 
-/*! /file CommonDictInterface.h
+/*! \file CommonDictInterface.h
 \brief Common interface for all dicts and plugins \see CommonDictInterface
 
 \author Bartosz Szatkowski <bulislaw@linux.com>
@@ -53,7 +53,7 @@ class CommonDictInterface : public QObject {
     //! 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)
@@ -63,7 +63,7 @@ class CommonDictInterface : public QObject {
     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;
 
 
@@ -76,7 +76,7 @@ class CommonDictInterface : public QObject {
     //! 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)
@@ -96,7 +96,7 @@ class CommonDictInterface : public QObject {
         \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;
@@ -112,7 +112,7 @@ class CommonDictInterface : public QObject {
     //! 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
index 7932404..30e9457 100644 (file)
@@ -37,13 +37,13 @@ public:
 
     /*!
       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;
 };
index 17aa8ee..8eb4934 100644 (file)
@@ -62,10 +62,10 @@ public:
     virtual QList<CommonDictInterface*> getPlugins() = 0;
 
     //! Indicates if GUI is in exact search mode.
-    /*! When GUI is in exact search mode it search for word, and
-        if find exacly matching translation it directly displays it, whithout
+    /*! When GUI is in exact search mode it searches for word, and
+        if it finds exactly matching translation it directly displays it, without
         displaying matching word list. This mode should be
-        used for browsing search history and search words from application
+        used for browsing search history and searching words from application
         arguments.
         \returns flag indicating if GUI is in exact search mode
     */
@@ -81,9 +81,9 @@ public:
 
 
 public Q_SLOTS:
-    //! Search in exact mode for given word
+    //! Searches in exact mode for given word
     /*!
-      GUI will be automaticaly set into exact search mode, and after search or
+      GUI will be automatically set into exact search mode, and after search or
       break will be unset from exact search mode.
       \param word which will be searched in dictionaries
       */
@@ -123,68 +123,68 @@ public Q_SLOTS:
       Checks if received list is empty, in that case displays suitable
       information. If GUI is in exact search mode it will search for exact
       word in received list, and if word is found it will emit signal to
-      display it's translation. Otherwise it will display list of matching
+      display its translation. Otherwise it will display list of matching
       words and show suitable information.
       \sa exactSearch()
       \sa showTranslation()
      */
     virtual void wordListReady() = 0;
 
-    //! Gets translation strings from backbone and emit signal to display them
+    //! Gets translation strings from backbone and emits signal to display them
     virtual void translationsReady() = 0;
 
 Q_SIGNALS:
-    //! Should be emited when user wants to close application to stop
+    //! Should be emitted when user wants to close application to stop
     //! all ongoing searches
     void quit();
 
-    //! Emited when user want to search for list of words matching given word
-    /*! \param word word which will be matched, it can contains wildcards
+    //! Emitted when user wants to search for list of words matching given word
+    /*! \param word word which will be matched, it can contain wildcards
     */
     void searchWordList(QString word);
 
-    //! Emited when user wants to see translation of words.
+    //! Emitted when user wants to see translation of words.
     /*! \param list of translations for given word which will be received
         in wordListReady() slot
         \sa wordListReady()
     */
     void searchTranslations(QList<Translation*>);
 
-    //! Emited when starting search, will disable GUI components
+    //! Emitted when starting search, will disable GUI components
     //! and shows progress bars
     void setBusy();
 
-    //! Emited when searching ends, will enable GUI components
+    //! Emitted when searching ends, will enable GUI components
     void setIdle();
 
-    //! Emited when user want to break search
+    //! Emitted when user wants to break search
     void stopSearching();
 
-    //! Emited after received word list in wordListReady() slot, will display
+    //! Emitted after receiving word list in wordListReady() slot, will display
     //! list of matched words
     /*! \param hash of word and list of translation of this word found
          in dictionaries
      */
     void showWordList(QHash<QString, QList<Translation*> >);
 
-    //! Emited after received translation strings in translationsReady() slot,
+    //! Emitted after receiving translation strings in translationsReady() slot,
     //! will display translation of given word
     /*! \param list of translations from different dictionaries
          in dictionaries
      */
     void showTranslation(QStringList);
 
-    //! Emited when user wants to add new dictionary
-    /*! \param new dictionary returned by specyfic plugin dialog
+    //! Emitted when user wants to add new dictionary
+    /*! \param new dictionary returned by specific plugin dialog
       */
     void addNewDictionary(CommonDictInterface*);
 
-    //! Emited when user wants to remove dictionary
+    //! Emitted when user wants to remove dictionary
     /*! \param dictionary which will be removed
       */
     void removeDictionary(CommonDictInterface*);
 
-    //! Emited when user changes dictionaries active/inactive states
+    //! Emitted when user changes dictionaries active/inactive states
     /*! \param list of only active dictionaries
       */
     void selectedDictionaries(QList<CommonDictInterface* >);
index c50136a..bc8c35b 100644 (file)
@@ -19,8 +19,8 @@
 
 *******************************************************************************/
 
-/*! /file settings.h
-\brief Settings object for pluggins \see Settings
+/*! \file settings.h
+\brief Settings object for plugins \see Settings
 
 \author Bartosz Szatkowski <bulislaw@linux.com>
 */
 class CommonDictInterface;
 
 /*! Plugins or dictionaries may need to keep some of configuration between
-  sessions, moreover Backbone or GUI may want store some additional info in
+  sessions, moreover Backbone or GUI may want to 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(){}
index 3940f60..11da8f0 100644 (file)
@@ -19,7 +19,7 @@
 
 *******************************************************************************/
 
-/*! /file translation.h
+/*! \file translation.h
 \brief Interface for translation instances \see Translation
 
 \author Bartosz Szatkowski <bulislaw@linux.com>
@@ -34,7 +34,7 @@ class CommonDictInterface;
 
 
 /*! 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:
@@ -53,7 +53,7 @@ class Translation {
     //! \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;
    }
index ac83859..e0b2ba8 100644 (file)
@@ -38,13 +38,13 @@ public:
     explicit XdxfDictDialog(XdxfPlugin* plugin, QObject *parent = 0);
     /*!
       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);
 
index ff8e43f..9311429 100644 (file)
@@ -29,7 +29,7 @@
 #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:
@@ -37,14 +37,14 @@ 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:
index da1cc5e..abcf16c 100644 (file)
@@ -38,10 +38,10 @@ public:
 
     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:
index 407b41a..15eb1e7 100644 (file)
@@ -332,7 +332,7 @@ void XdxfPlugin::setSettings(Settings *settings) {
     }
     delete settings;
 
-    emit settingsChanged();
+    Q_EMIT settingsChanged();
 }
 
 void XdxfPlugin::getDictionaryInfo() {
index e413e2c..f844971 100644 (file)
@@ -59,7 +59,7 @@ public:
     //! 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)
@@ -69,7 +69,7 @@ public:
     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();
 
@@ -85,7 +85,7 @@ public:
     //! 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
@@ -114,7 +114,7 @@ public Q_SLOTS:
     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);
 
@@ -158,10 +158,9 @@ private:
     QSqlDatabase db;
     QString db_name;
 
-    //! number of words in dicrionary
+    //! number of words in dictionary
     long _wordsCount;
 
-
     volatile bool stopped;
     Settings *_settings;
     XdxfDictDialog* _dictDialog;
index a29199c..300984a 100644 (file)
@@ -18,7 +18,7 @@
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-/*! /file tst_backbone.cpp
+/*! \file tst_backbone.cpp
 \brief Backbone tests
 
 \author Bartosz Szatkowski <bulislaw@linux.com>