Further improvements in documentation
authorPiotrek <ppilar11@gmail.com>
Thu, 9 Sep 2010 11:33:56 +0000 (13:33 +0200)
committerPiotrek <ppilar11@gmail.com>
Thu, 9 Sep 2010 11:33:56 +0000 (13:33 +0200)
17 files changed:
src/desktopWidget/MainWidget.h
src/include/AccentsNormalizer.h
src/include/CommonDictInterface.h
src/include/GUIInterface.h
src/include/translation.h
src/mdictionary/backbone/Bookmarks.h
src/mdictionary/backbone/History.cpp
src/mdictionary/backbone/backbone.cpp
src/mdictionary/backbone/backbone.h
src/mdictionary/gui/DBusAdapter.h
src/mdictionary/gui/MainWindow.cpp
src/mdictionary/gui/MainWindow.h
src/mdictionary/gui/SearchBarWidget.h
src/plugins/google/GooglePlugin.h
src/plugins/google/TranslationGoogle.h
src/plugins/xdxf/XdxfDialog.cpp
src/plugins/xdxf/xdxfplugin.h

index 3ee4c2b..c3386a7 100644 (file)
@@ -33,7 +33,7 @@
 //! Implements widget for maemo that allows user to search quickly right from home screen using mdictionary.
 /*!
   Shows tool button with logo of mDictionary which can start application.
-  In line edit user inputs word, and using button next to it or by pressing enter, widget runs mDictionary which immediately starts searching for given word.
+  In line edit user inputs word, and using button next to it or by pressing enter, widget runs mDictionary which immediately starts searching for a given word.
   If mDictionary is already running in background it will show the program.
   */
 class HomeWidget : public QWidget
index 9381313..9246901 100644 (file)
@@ -37,7 +37,7 @@ class AccentsNormalizer {
     QMap<QChar, QRegExp> letters;
     QRegExp noLetter;
 
-    //! removes accents from letters in searched word (e.g. ą -> a, ł -> l)
+    //! removes accents from letters in a word searched for (e.g. ą -> a, ł -> l)
     QString removeAccents(QString string) {
        string = string.toLower();
        QString normalized = string.normalized(QString::NormalizationForm_KD);
index a3c9790..4e8cebc 100644 (file)
@@ -101,8 +101,8 @@ class CommonDictInterface : public QObject, public AccentsNormalizer {
 
 
  public Q_SLOTS:
-    /*! performs search in dictionary
-        \param  word word to search in dictionary
+    /*! performs search in a dictionary
+        \param  word word to search for in a dictionary
         \param  limit limit on number of results,
                 if limit=0 all matching words are returned
 
@@ -118,7 +118,7 @@ class CommonDictInterface : public QObject, public AccentsNormalizer {
     virtual void retranslate() {}
 
   Q_SIGNALS:
-    //! emitted after change in dictionary settings
+    //! emitted after change in a dictionary settings
     void settingsChanged();
 
     /*! emitted to backbone when it's needed to inform user about something
@@ -130,7 +130,7 @@ class CommonDictInterface : public QObject, public AccentsNormalizer {
     
 
 protected:
-//! removes accents from letters in searched word (e.g. ą -> a, ł -> l)
+//! removes accents from letters in a word searched for (e.g. ą -> a, ł -> l)
     QString removeAccents(QString string) {
         if(settings()->value("strip_accents") == "true")
             return AccentsNormalizer::removeAccents(string);
index 6f94f06..ceb7796 100644 (file)
@@ -61,10 +61,10 @@ public:
     virtual QList<CommonDictInterface*> getPlugins() = 0;
 
     //! Indicates if GUI is in exact search mode.
-    /*! When GUI is in exact search mode it searches for word, and
+    /*! When GUI is in exact search mode it searches for a 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 searching words from application
+        used for browsing search history and searching for words from application
         arguments.
         \returns flag indicating if GUI is in exact search mode
     */
@@ -80,11 +80,11 @@ public:
 
 
 public Q_SLOTS:
-    //! Searches in exact mode for given word
+    //! Searches in exact mode for a given word
     /*!
       GUI will be automatically set into exact search mode, and after search or
       break it will be unset from exact search mode.
-      \param word which will be searched in dictionaries
+      \param word which will be searched for in dictionaries
       */
     virtual void searchExact(QString word) = 0;
 
@@ -104,7 +104,7 @@ public Q_SLOTS:
     //! Shows translation of next word in history
     /*!
       It will work only if there is next word available in history.
-      Translation of word is searched with searchExact() function
+      Translation of a word is searched for with searchExact() function
       \sa searchExact()
       */
     virtual void historyNext() = 0;
@@ -112,7 +112,7 @@ public Q_SLOTS:
     //! Shows translation of previous word in history
     /*!
       It will work only if there is previous word available in history.
-      Translation of word is searched with searchExact() function
+      Translation of word is searched for with searchExact() function
       \sa searchExact()
       */
     virtual void historyPrev() = 0;
@@ -137,13 +137,13 @@ Q_SIGNALS:
     //! all ongoing searches
     void quit();
 
-    //! Emitted when user wants to search for list of words matching given word
+    //! Emitted when user wants to search for a list of words matching a given word
     /*! \param word word which will be matched, it can contain wildcards
     */
     void searchWordList(QString word);
 
     //! Emitted when user wants to see translation of words.
-    /*! \param list of translations for given word which will be received
+    /*! \param list of translations for a given word which will be received
         in wordListReady() slot
         \sa wordListReady()
     */
@@ -167,7 +167,7 @@ Q_SIGNALS:
     void showWordList(QHash<QString, QList<Translation*> >);
 
     //! Emitted after receiving translation strings in translationsReady() slot,
-    //! will display translation of given word
+    //! will display translation of a given word
     /*! \param list of translations from different dictionaries
          in dictionaries
      */
index 7e9ebf7..d6e63c8 100644 (file)
@@ -36,7 +36,7 @@ class CommonDictInterface;
 
 
 /*! Translation is kind of GoF proxy, it stores key:translation pair and
-  provides it in lazy way -> key is available always, but translation is fetched
+  provides it in a lazy way -> key is available always, but translation is fetched
   as late as possible*/
 class Translation {
   public:
index 472ac2b..fb4ffd2 100644 (file)
@@ -46,7 +46,7 @@
 class BookmarkTranslation;
 
 
-/*! Bookmarks are way to store words that You think You will need to search
+/*! Bookmarks are a way to store words that You think You will need to search
   for often.
 
   When You add bookmark (by clicking on "star" in words list) You add it to
@@ -73,13 +73,13 @@ public:
      */
     QList<Translation*> list();
 
-    /*! Searches in bookmarks for given word (wildcards may apply '*' and '?')
+    /*! Searches in bookmarks for a given word (wildcards may apply '*' and '?')
       \param word to search for
       \return list of matching Translation objects
       */
     QList<Translation*> searchWordList(QString word);
 
-    /*! Searches for final translation of given word
+    /*! Searches for final translation of a given word
       \return word translation list in text format xml or html to be formatted
         and displayed
       \param word word to search for
@@ -91,7 +91,7 @@ public:
     void clear();
 
 
-    /*! \return true if given word is already in bookmarks
+    /*! \return true if a given word is already in bookmarks
       \param word to check
       */
     bool inBookmarks(QString word);
index 0fe31e8..3d4fc54 100644 (file)
@@ -60,7 +60,7 @@ int History::maxSize() {
 
 void History::add(QString word) {
     if(currentElement != -1) {
-        //we search the same word so we don't add it again
+        //we search for the same word so we don't add it again
         if(_history[currentElement] == word)
             return;
     }
index 8f37781..23ec569 100644 (file)
@@ -470,7 +470,7 @@ void Backbone::dictUpdated() {
 
     // For convienence this function is called for each change in dictionaries
     // and each call dumps configuration for all dictionaries into file.
-    // Maybe better way would be to store new/changed configuration but
+    // Maybe a better way would be to store new/changed configuration but
     // parsing settings file and figuring out what was changed, in my opinion,
     // would take more time
     _history->setMaxSize(_historyLen);
index 89a9da7..c87a2f2 100644 (file)
@@ -60,7 +60,7 @@
   new searches and threads, merging search results from multiple dictionaries.
 
   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
+  backbone must provide a way to create them at start (with specific Settings) and
   distinguish each ditionary.
 
   Backbone also manages bookmarks and history: providing interface to GUI.
@@ -149,7 +149,7 @@ public Q_SLOTS:
       */
     void search(QString word);
 
-    /*! sets active dictionaries (searches are performed only in active dicts
+    /*! sets active dictionaries (searches are performed only in active dicts)
        \param List of dictionaries to be activated
       */
     void selectedDictionaries(QList<CommonDictInterface* >);
@@ -217,9 +217,9 @@ public Q_SLOTS:
     }
 
 
-   /*! Searching for list of bookmarks may take some time, so I moved it to
+   /*! Searching a 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)
+       searching a list of words (\see search)
        */
    void fetchBookmarks() {
         _result.clear();
@@ -328,7 +328,7 @@ private:
     void addInternalDictionary(CommonDictInterface*, bool);
     void savePrefs(QSettings*);
 
-    CommonDictInterface* plugin(QString type); // searches for plugin of given type
+    CommonDictInterface* plugin(QString type); // searches for plugin of a given type
     QList<CommonDictInterface*> activeDicts();
     bool containsDict(uint hash) const;
     int _dictNum;
index e9ed118..77a9dfa 100644 (file)
@@ -40,7 +40,7 @@ public:
     explicit DBusAdapter(MainWindow* w);
 
 public slots:
-    //! Search for given word
+    //! Searches for a given word
     void search(QString word);
 
     //! Shows application in foreground, can be used to trun on mdictionary
index 243f8c1..42f17cd 100644 (file)
@@ -543,7 +543,7 @@ void MainWindow::connectMenu() {
 
 void MainWindow::connectBookmarksWidget() {
     #ifdef Q_WS_MAEMO_5
-        //after removing bookmarks we search for them once again to clear word list
+        //after removing bookmarks we search for them once again to clear the words list
         connect(bookmarksWidget, SIGNAL(removeAllBookmarks()),
                 this, SLOT(removeBookmarks()));
 
index b4738b3..f4a0f0b 100644 (file)
@@ -46,7 +46,7 @@
   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 requests of subcomponents e. g. searching of given word,
+  It manages all requests of subcomponents e. g. searching for a given word,
   displaying history, removing dictionary.
   It also provides data from backbone to subcomponents e. g. result of search.
 */
@@ -78,7 +78,7 @@ public:
     QList<CommonDictInterface*> getPlugins();
 
     //! Indicates if GUI is in exact search mode.
-    /*! When GUI is in exact search mode it searches for word, and if it
+    /*! When GUI is in exact search mode it searches for a word, and if it
         finds exactly matching translation it displays matching words list
         and then directly displays translation of first exactly matched word.
         This mode is used for browsing search history and searching words
@@ -105,30 +105,30 @@ public:
 
 
  public Q_SLOTS:
-    //! Searches in exact mode for given word
+    //! Searches in exact mode for a given word
     /*!
       GUI will be automatically set into exact search mode, and after search or
       when user breaks the search it will be unset from exact search mode.
-      \param word which will be searched in dictionaries
+      \param word which will be searched for in dictionaries
       \sa search()
     */
     void searchExact(QString);
 
 
-    //! Searches for given word
+    //! Searches for a given word
     /*!
-      It sets passed word in line edit of search bar and searches for given word.
-      \param word which will be searched in dictionaries
+      It sets passed word in line edit of a search bar and searches for a given word.
+      \param word which will be searched for in dictionaries
       \sa SearchBarWidget
       \sa searchExact()
     */
     void search(QString);
 
-    //! Starts searching for given word after 500 ms delay
+    //! Starts searching for a given word after 500 ms delay
     /*!
       After time's up it sets passed word in line edit of search bar and searches
-      for given word.
-      \param word which will be searched in dictionaries
+      for a given word.
+      \param word which will be searched for in dictionaries
       \sa SearchBarWidget
       \sa searchExact()
       \sa search()
@@ -160,7 +160,7 @@ public:
       Checks if received list is empty, in that case it displays suitable
       information. Otherwise it merges results of the same key word and emits
       signal to display word list.
-      If GUI is in exact search mode it will search for exact word in received
+      If GUI is in exact search mode it will search for an exact word in received
       list and if any of found words match exactly the word passed to
       searchExact() method.
       \sa isInExactSearch()
@@ -195,7 +195,7 @@ public:
     //! Shows translation of next word in history
     /*!
       It will work only if there is next word available in history.
-      Translation of word is searched with searchDelay() function.
+      Translation of word is searched for with searchDelay() function.
       On maemo search is in normal mode, on desktop in exact search mode.
       \sa searchDelay()
       \sa searchExact()
@@ -205,7 +205,7 @@ public:
     //! Shows translation of previous word in history
     /*!
       It will work only if there is available previous word in history.
-      Translation of word is searched with searchDelay() function.
+      Translation of word is searched for with searchDelay() function.
       On maemo search is in normal mode, on desktop in exact search mode.
       \sa searchDelay()
       \sa searchExact()
index 0309bd9..31e8fa7 100644 (file)
@@ -45,7 +45,7 @@ public:
     ~SearchBarWidget();
 
 Q_SIGNALS:
-    //! Requests to search for list of words matching word passed as
+    //! Requests to search for a list of words matching word passed as
     //! parameter
     void searchForTranslations(QString);
 
@@ -90,13 +90,13 @@ public Q_SLOTS:
     */
     void setIdle();
 
-    //! Searches for given word
+    //! Searches for a given word
     /*!
       Sets word as text in search word line edit
     */
     void search(QString word);
 
-    //! Starts to search for given word after 500 ms delay
+    //! Starts to search for a given word after 500 ms delay
     /*!
       Sets word as text in search word line edit, and waits 500 ms to start
       search. If in the meantime this slot is called again it will stop previous
index a87e7e9..e8aacb2 100644 (file)
@@ -109,8 +109,8 @@ public:
     static QMap<QString, QString> languages;
 
 public slots:
-    /*! performs search in dictionary
-      \param  word word to search in dictionary
+    /*! performs search in a dictionary
+      \param  word word to search for in a dictionary
       \param limit limit on number of results
 
       After finishing search it has to emit
index b92189e..92d036c 100644 (file)
@@ -57,7 +57,7 @@ public:
         return _bookmark;
    }
 
-    //! returns coresponding dict object
+    //! returns corresponding dict object
     uint dict() const {return _dictHash;}
 
 private:
index ef18a4b..8732940 100644 (file)
@@ -33,7 +33,7 @@ XdxfDialog::XdxfDialog(XdxfPlugin *plugin,
 
 
     cacheToolTip = tr("Optimize for quicker searches (may take some time)");
-    accentsToolTip = tr("Strip accents (searching takes more time, but spelling don't have to be exact)");
+    accentsToolTip = tr("Strip accents (searching takes more time, but spelling doesn't have to be exact)");
 
     initializeUI();
 
index d47d43f..9da9d3b 100644 (file)
@@ -86,7 +86,7 @@ public:
     //! returns current plugin settings
     Settings* settings();
 
-    //! returns words count in dictionary
+    //! returns words count in a dictionary
     long wordsCount();
 
     //! Sets new settings
@@ -103,8 +103,8 @@ public:
 
 
 public Q_SLOTS:
-    /*! performs search in dictionary
-      \param  word word to search in dictionary
+    /*! performs search in a dictionary
+      \param  word word to search for in a dictionary
       \param limit limit on number of results
 
       After finishing search it has to emit
@@ -181,7 +181,7 @@ private:
     QIcon _icon;
     QSqlDatabase db;
     QString db_name;
-    //! number of words in dictionary
+    //! number of words in a dictionary
     long _wordsCount;
     //! indicates if search is stopped
     volatile bool stopped;