From: Jakub Jaszczynski Date: Mon, 13 Sep 2010 13:14:42 +0000 (+0200) Subject: Merge branch 'master' into google X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=14cb9cc957bcdc9c39af54ba168c6816a1910a2d;hp=84a7bb82879466daead05222751cfd5c6cdae42f;p=mdictionary Merge branch 'master' into google Conflicts: src/include/CommonDictInterface.h src/mdictionary/backbone/backbone.h src/plugins/google/GooglePlugin.h src/plugins/xdxf/xdxfplugin.h --- diff --git a/data/css/images/header-background.png b/data/css/images/header-background.png deleted file mode 100644 index 6209dc5..0000000 Binary files a/data/css/images/header-background.png and /dev/null differ diff --git a/data/css/images/header-background.xcf b/data/css/images/header-background.xcf deleted file mode 100644 index 158d845..0000000 Binary files a/data/css/images/header-background.xcf and /dev/null differ diff --git a/data/css/images/header-border.png b/data/css/images/header-border.png deleted file mode 100644 index dfb92f2..0000000 Binary files a/data/css/images/header-border.png and /dev/null differ diff --git a/data/css/images/header-border.xcf b/data/css/images/header-border.xcf deleted file mode 100644 index 5515f28..0000000 Binary files a/data/css/images/header-border.xcf and /dev/null differ diff --git a/data/css/images/key-background.png b/data/css/images/key-background.png deleted file mode 100644 index 4f32dd2..0000000 Binary files a/data/css/images/key-background.png and /dev/null differ diff --git a/data/css/images/key-background.xcf b/data/css/images/key-background.xcf deleted file mode 100644 index 7264399..0000000 Binary files a/data/css/images/key-background.xcf and /dev/null differ diff --git a/data/css/images/shadow-grey-bg.png b/data/css/images/shadow-grey-bg.png deleted file mode 100644 index 062aba7..0000000 Binary files a/data/css/images/shadow-grey-bg.png and /dev/null differ diff --git a/data/css/images/shadow-grey-bg.xcf b/data/css/images/shadow-grey-bg.xcf deleted file mode 100644 index 2de7518..0000000 Binary files a/data/css/images/shadow-grey-bg.xcf and /dev/null differ diff --git a/data/css/images/shadow-white-bg.png b/data/css/images/shadow-white-bg.png deleted file mode 100644 index a2d3b53..0000000 Binary files a/data/css/images/shadow-white-bg.png and /dev/null differ diff --git a/data/css/images/shadow-white-bg.xcf b/data/css/images/shadow-white-bg.xcf deleted file mode 100644 index 8e8a72c..0000000 Binary files a/data/css/images/shadow-white-bg.xcf and /dev/null differ diff --git a/data/css/images/tab-background.png b/data/css/images/tab-background.png deleted file mode 100644 index 8a65250..0000000 Binary files a/data/css/images/tab-background.png and /dev/null differ diff --git a/data/css/images/tab-background.xcf b/data/css/images/tab-background.xcf deleted file mode 100644 index fc8c10a..0000000 Binary files a/data/css/images/tab-background.xcf and /dev/null differ diff --git a/data/css/style.css b/data/css/style.css deleted file mode 100644 index 5f03e05..0000000 --- a/data/css/style.css +++ /dev/null @@ -1,81 +0,0 @@ -body, html, body *, html * { - margin : 0px; - padding : 0px; - color : #eee; - font-size : 10pt; - font-family : Tahoma, Helvetica, Arial, Arial, sans-serif; -} -body { - background-color : black; -} - -div.tab { - display : block; - margin : 4px; - margin-top : 8px; - padding : 2px; - padding-bottom : 0px; - background-color : #333; - border-radius : 5px; - border : 1px solid #555; - background-image : url("images/tab-background.png"); - background-repeat : repeat-y; - -webkit-box-reflect : below 5px -webkit-gradient(linear, 0% 0%, 0% 150%, from(transparent), color-stop(0.3, transparent), to(white)); -} - -div.dict { - margin : 0px 0px 5px 5px; - padding : 0px; - background-color : transparent; - - border : solid transparent; - border-width : 13px 13px 13px 13px; - -webkit-border-image : url("images/shadow-grey-bg.png") 13 13 13 13; -} - -div.info { - font-weight : bold; - text-align : center; - padding : 3px; - background-color : #444; - color : #dcbba0; - - border : solid transparent; - border-width : 5px 5px 5px 5px; - -webkit-border-image : url("images/header-border.png") 5 5 5 5; - - background-image : url("images/header-background.png"); - background-repeat : repeat-y; - background-position : -3 0; -} - - -div.key { - text-align : center; - color : #9c9; - - background-image : url("images/key-background.png"); - background-repeat : no-repeat; - background-position : center; - - border-radius : 10px 10px 40px 40px; - border-width : 1px 1px 1px 1px; - border-style : solid; - border-color : #1f1f1f; - - margin-top : 5px; -} - -div.cell { - padding : 0px 0px 0px 10px; -} - -span.i { - font-style : italic; -} -span.b { - font-weight : bold; -} -span.u { - text-decoration : underline; -} diff --git a/data/css_maemo/images/header-background.png b/data/css_maemo/images/header-background.png new file mode 100644 index 0000000..6209dc5 Binary files /dev/null and b/data/css_maemo/images/header-background.png differ diff --git a/data/css_maemo/images/header-background.xcf b/data/css_maemo/images/header-background.xcf new file mode 100644 index 0000000..158d845 Binary files /dev/null and b/data/css_maemo/images/header-background.xcf differ diff --git a/data/css_maemo/images/header-border.png b/data/css_maemo/images/header-border.png new file mode 100644 index 0000000..dfb92f2 Binary files /dev/null and b/data/css_maemo/images/header-border.png differ diff --git a/data/css_maemo/images/header-border.xcf b/data/css_maemo/images/header-border.xcf new file mode 100644 index 0000000..5515f28 Binary files /dev/null and b/data/css_maemo/images/header-border.xcf differ diff --git a/data/css_maemo/images/key-background.png b/data/css_maemo/images/key-background.png new file mode 100644 index 0000000..79b5921 Binary files /dev/null and b/data/css_maemo/images/key-background.png differ diff --git a/data/css_maemo/images/key-background.xcf b/data/css_maemo/images/key-background.xcf new file mode 100644 index 0000000..7264399 Binary files /dev/null and b/data/css_maemo/images/key-background.xcf differ diff --git a/data/css_maemo/images/shadow-grey-bg.png b/data/css_maemo/images/shadow-grey-bg.png new file mode 100644 index 0000000..062aba7 Binary files /dev/null and b/data/css_maemo/images/shadow-grey-bg.png differ diff --git a/data/css_maemo/images/shadow-grey-bg.xcf b/data/css_maemo/images/shadow-grey-bg.xcf new file mode 100644 index 0000000..2de7518 Binary files /dev/null and b/data/css_maemo/images/shadow-grey-bg.xcf differ diff --git a/data/css_maemo/images/shadow-white-bg.png b/data/css_maemo/images/shadow-white-bg.png new file mode 100644 index 0000000..a2d3b53 Binary files /dev/null and b/data/css_maemo/images/shadow-white-bg.png differ diff --git a/data/css_maemo/images/shadow-white-bg.xcf b/data/css_maemo/images/shadow-white-bg.xcf new file mode 100644 index 0000000..8e8a72c Binary files /dev/null and b/data/css_maemo/images/shadow-white-bg.xcf differ diff --git a/data/css_maemo/images/tab-background.png b/data/css_maemo/images/tab-background.png new file mode 100644 index 0000000..8a65250 Binary files /dev/null and b/data/css_maemo/images/tab-background.png differ diff --git a/data/css_maemo/images/tab-background.xcf b/data/css_maemo/images/tab-background.xcf new file mode 100644 index 0000000..fc8c10a Binary files /dev/null and b/data/css_maemo/images/tab-background.xcf differ diff --git a/data/css_maemo/style.css b/data/css_maemo/style.css new file mode 100644 index 0000000..d67bd43 --- /dev/null +++ b/data/css_maemo/style.css @@ -0,0 +1,92 @@ +body, html, body *, html * { + margin : 0px; + padding : 0px; + color : #eee; + font-size : 14pt; + font-family : Tahoma, Helvetica, Arial, Arial, sans-serif; +} +body { + background-color : black; +} + + + +div.tab { + display : block; + margin : 4px; + margin-top : 8px; + padding : 2px; + padding-bottom : 0px; + background-color : #333; + border-radius : 5px; + border : 1px solid #555; + background-image : url("images/tab-background.png"); + background-repeat : repeat-y; + -webkit-box-reflect : below 5px -webkit-gradient(linear, 0% 0%, 0% 150%, from(transparent), color-stop(0.3, transparent), to(white)); +} + +div.dict { + margin : 0px 0px 5px 5px; + padding : 0px; + background-color : transparent; + + border : solid transparent; + border-width : 13px 13px 13px 13px; + -webkit-border-image : url("images/shadow-grey-bg.png") 13 13 13 13; +} + +div.info { + font-weight : bold; + text-align : center; + padding : 3px; + background-color : #444; + color : #dcbba0; + + border : solid transparent; + border-width : 5px 5px 5px 5px; + -webkit-border-image : url("images/header-border.png") 5 5 5 5; + + background-image : url("images/header-background.png"); + background-repeat : repeat-y; + background-position : -3 0; + vertical-align : middle; +} + +img.icon { + vertical-align : middle; + float : left; + height : 16px; + padding : 5px; +} + + +div.key { + text-align : center; + color : #9c9; + + background-image : url("images/key-background.png"); + background-repeat : no-repeat; + background-size : 100% auto; + background-position : center; + + border-radius : 10px 10px 40px 40px; + border-width : 1px 1px 1px 1px; + border-style : solid; + border-color : #1f1f1f; + + margin-top : 5px; +} + +div.cell { + padding : 0px 0px 0px 10px; +} + +span.i { + font-style : italic; +} +span.b { + font-weight : bold; +} +span.u { + text-decoration : underline; +} diff --git a/data/css_meego/images/avatar_icon.png b/data/css_meego/images/avatar_icon.png new file mode 100755 index 0000000..92d039a Binary files /dev/null and b/data/css_meego/images/avatar_icon.png differ diff --git a/data/css_meego/images/avatar_icon2.png b/data/css_meego/images/avatar_icon2.png new file mode 100755 index 0000000..34d186f Binary files /dev/null and b/data/css_meego/images/avatar_icon2.png differ diff --git a/data/css_meego/images/cat.png b/data/css_meego/images/cat.png new file mode 100755 index 0000000..38dfc0a Binary files /dev/null and b/data/css_meego/images/cat.png differ diff --git a/data/css_meego/images/header-background.png b/data/css_meego/images/header-background.png new file mode 100755 index 0000000..159a15d Binary files /dev/null and b/data/css_meego/images/header-background.png differ diff --git a/data/css_meego/images/header-background.xcf b/data/css_meego/images/header-background.xcf new file mode 100755 index 0000000..0c60bfa Binary files /dev/null and b/data/css_meego/images/header-background.xcf differ diff --git a/data/css_meego/images/header-border.png b/data/css_meego/images/header-border.png new file mode 100755 index 0000000..e9b17ed Binary files /dev/null and b/data/css_meego/images/header-border.png differ diff --git a/data/css_meego/images/header-border.xcf b/data/css_meego/images/header-border.xcf new file mode 100755 index 0000000..7108d0d Binary files /dev/null and b/data/css_meego/images/header-border.xcf differ diff --git a/data/css_meego/images/intro-video-thumbnail.png b/data/css_meego/images/intro-video-thumbnail.png new file mode 100755 index 0000000..70eff47 Binary files /dev/null and b/data/css_meego/images/intro-video-thumbnail.png differ diff --git a/data/css_meego/images/key-background.png b/data/css_meego/images/key-background.png new file mode 100755 index 0000000..0679f31 Binary files /dev/null and b/data/css_meego/images/key-background.png differ diff --git a/data/css_meego/images/key-background.xcf b/data/css_meego/images/key-background.xcf new file mode 100755 index 0000000..ee7930e Binary files /dev/null and b/data/css_meego/images/key-background.xcf differ diff --git a/data/css_meego/images/linux_foundation_color.png b/data/css_meego/images/linux_foundation_color.png new file mode 100755 index 0000000..344010d Binary files /dev/null and b/data/css_meego/images/linux_foundation_color.png differ diff --git a/data/css_meego/images/meego-logo.png b/data/css_meego/images/meego-logo.png new file mode 100755 index 0000000..37d5de4 Binary files /dev/null and b/data/css_meego/images/meego-logo.png differ diff --git a/data/css_meego/images/meego-peep.png b/data/css_meego/images/meego-peep.png new file mode 100755 index 0000000..6591da2 Binary files /dev/null and b/data/css_meego/images/meego-peep.png differ diff --git a/data/css_meego/images/people.png b/data/css_meego/images/people.png new file mode 100755 index 0000000..2f2f581 Binary files /dev/null and b/data/css_meego/images/people.png differ diff --git a/data/css_meego/images/shadow-grey-bg.png b/data/css_meego/images/shadow-grey-bg.png new file mode 100755 index 0000000..062aba7 Binary files /dev/null and b/data/css_meego/images/shadow-grey-bg.png differ diff --git a/data/css_meego/images/shadow-grey-bg.xcf b/data/css_meego/images/shadow-grey-bg.xcf new file mode 100755 index 0000000..2de7518 Binary files /dev/null and b/data/css_meego/images/shadow-grey-bg.xcf differ diff --git a/data/css_meego/images/shadow-transparent-bg.png b/data/css_meego/images/shadow-transparent-bg.png new file mode 100755 index 0000000..26aeadd Binary files /dev/null and b/data/css_meego/images/shadow-transparent-bg.png differ diff --git a/data/css_meego/images/shadow-transparent-bg.xcf b/data/css_meego/images/shadow-transparent-bg.xcf new file mode 100755 index 0000000..214bcba Binary files /dev/null and b/data/css_meego/images/shadow-transparent-bg.xcf differ diff --git a/data/css_meego/images/shadow-white-bg.png b/data/css_meego/images/shadow-white-bg.png new file mode 100755 index 0000000..a2d3b53 Binary files /dev/null and b/data/css_meego/images/shadow-white-bg.png differ diff --git a/data/css_meego/images/shadow-white-bg.xcf b/data/css_meego/images/shadow-white-bg.xcf new file mode 100755 index 0000000..8e8a72c Binary files /dev/null and b/data/css_meego/images/shadow-white-bg.xcf differ diff --git a/data/css_meego/images/shutdown-1024x600.png b/data/css_meego/images/shutdown-1024x600.png new file mode 100755 index 0000000..50db205 Binary files /dev/null and b/data/css_meego/images/shutdown-1024x600.png differ diff --git a/data/css_meego/images/shutdown-1366x768.png b/data/css_meego/images/shutdown-1366x768.png new file mode 100755 index 0000000..d6913a5 Binary files /dev/null and b/data/css_meego/images/shutdown-1366x768.png differ diff --git a/data/css_meego/images/splash.png b/data/css_meego/images/splash.png new file mode 100755 index 0000000..0800e86 Binary files /dev/null and b/data/css_meego/images/splash.png differ diff --git a/data/css_meego/images/splash2 (kopia).png b/data/css_meego/images/splash2 (kopia).png new file mode 100755 index 0000000..7f915fa Binary files /dev/null and b/data/css_meego/images/splash2 (kopia).png differ diff --git a/data/css_meego/images/splash2.png b/data/css_meego/images/splash2.png new file mode 100755 index 0000000..edd2a47 Binary files /dev/null and b/data/css_meego/images/splash2.png differ diff --git a/data/css_meego/images/tab-background.png b/data/css_meego/images/tab-background.png new file mode 100755 index 0000000..8a65250 Binary files /dev/null and b/data/css_meego/images/tab-background.png differ diff --git a/data/css_meego/images/tab-background.xcf b/data/css_meego/images/tab-background.xcf new file mode 100755 index 0000000..fc8c10a Binary files /dev/null and b/data/css_meego/images/tab-background.xcf differ diff --git a/data/css_meego/strona.html b/data/css_meego/strona.html new file mode 100755 index 0000000..3ea73bf --- /dev/null +++ b/data/css_meego/strona.html @@ -0,0 +1,27 @@ + + + + + +
+
+
[English-Polish]
+
cat
+
kot
+ (rzeczownik) +: kot, kotka, kociątko, złośliwa kobieta
+ (czasownik) +: podnieść
+ +
CAT
+
+CAT - firma produkująca ciężki sprzęt budowlany
+
+
+
+Basic Thai Language [ENG-THA]
+
cat
+
maeow
+
+
+ diff --git a/data/css_meego/style.css b/data/css_meego/style.css new file mode 100755 index 0000000..d29502a --- /dev/null +++ b/data/css_meego/style.css @@ -0,0 +1,97 @@ +body, html, body *, html * { + margin : 0px; + padding : 0px; + color : #777185; + font-size : 10pt; + font-family : Tahoma, Helvetica, Arial, Arial, sans-serif; +} +body { + background-color : #eeecec; +} + +img.icon { + vertical-align : middle; + float : left; + height : 16px; + padding : 5px; +} + + +div.tab { + background-attachment: scroll; + background-color : transparent; + background-image : url("images/people.png"); + background-repeat : no-repeat; + background-size : contain; + background-position : center bottom; + display : block; + margin : 4px; + margin-top : 8px; + padding : 2px; + padding-bottom : 0px; + + -webkit-box-reflect : below 5px -webkit-gradient(linear, 0% 0%, 0% 120%, from(transparent), color-stop(0.3, transparent), to(white)); +} + +div.dict { + margin : 0px 0px 5px 5px; + padding : 0px; + background-color : transparent; + + border : solid transparent; + border-width : 13px 13px 13px 13px; + -webkit-border-image : url("images/shadow-transparent-bg.png") 13 13 13 13; +} + +div.info { + font-weight : bold; + text-align : center; + padding : 3px; + background-color : transparent; + color : #000000; + + border : solid transparent; + border-width : 5px 5px 5px 5px; + -webkit-border-image : url("images/header-border.png") 5 5 5 5; + + background-image : url("images/header-background.png"); + background-repeat : repeat-y; + background-position : -3 0; +} + + +div.key { + text-align : center; + font-weight : bold; + color : #000000; + + background-image : url("images/key-background.png"); + background-repeat : no-repeat; + background-position : center; + + border : solid transparent; + border-radius : 15px 15px 15px 15px; + border-width : 1px 1px 1px 1px; + border-style : solid; + border-color : #777185; + + margin-top : 5px; +} + +div.cell { + color : #3e3b46; + padding : 0px 0px 0px 10px; +} + +span.i { + color : #3e3b46; + font-style : italic; +} +span.b { + color : #3e3b46; + font-weight : bold; +} +span.u { + color : #3e3b46; + text-decoration : underline; +} diff --git a/data/translations/pl_PL.qm b/data/translations/pl_PL.qm index 50b8233..a65241a 100644 Binary files a/data/translations/pl_PL.qm and b/data/translations/pl_PL.qm differ diff --git a/data/xsl/xsl.xsl b/data/xsl/xsl.xsl index ab99f61..d79990a 100644 --- a/data/xsl/xsl.xsl +++ b/data/xsl/xsl.xsl @@ -17,13 +17,11 @@
- + -
-
diff --git a/debian/mdictionary.install b/debian/mdictionary.install index 9dc5e8a..b67ebf1 100644 --- a/debian/mdictionary.install +++ b/debian/mdictionary.install @@ -6,5 +6,5 @@ usr/lib/mdictionary/plugins/libxdxf.so usr/lib/mdictionary/plugins/eng-us.xdxf usr/lib/mdictionary/plugins/eng-thai.xdxf usr/share/mdictionary/xdxf.png -usr/share/applications/hildon/mdictionary.desktop usr/share/mdictionary/css/ +usr/share/applications/hildon/mdictionary.desktop diff --git a/src/desktopWidget/MainWidget.h b/src/desktopWidget/MainWidget.h index c3386a7..7f4cc14 100644 --- a/src/desktopWidget/MainWidget.h +++ b/src/desktopWidget/MainWidget.h @@ -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 a given word. + In line edit user inputs word, and after using button next to it or 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 diff --git a/src/include/CommonDictInterface.h b/src/include/CommonDictInterface.h index 2c7f8b5..0f0c415 100644 --- a/src/include/CommonDictInterface.h +++ b/src/include/CommonDictInterface.h @@ -47,32 +47,32 @@ class CommonDictInterface : public QObject, public AccentsNormalizer { CommonDictInterface(QObject *parent = 0):QObject(parent) {} virtual ~CommonDictInterface() {} - //! returns source language code iso 639-2 + //! \returns source language code iso 639-2 virtual QString langFrom() const = 0; - //! returns destination language code iso 639-2 + //! \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) + //! \returns dictionary type (xdxf, google translate, etc) virtual QString type() const = 0; //! returns information about dictionary (name, authors, etc) virtual QString infoNote() const = 0; - /*! returns DictDialog object that creates dialogs - for adding new dictionary and changing plugin settings*/ + /*! \returns DictDialog object that creates dialogs + for adding a new dictionary and changing plugin settings*/ virtual DictDialog* dictDialog() = 0; - //! returns new, clean copy of plugin with settings set as in Settings* + //! \returns new, clean copy of plugin with settings set as in Settings* virtual CommonDictInterface* getNew(const Settings*) const = 0; - //! returns whether plugin can start searching + //! \returns whether plugin can start searching virtual bool isAvailable() const = 0; - //! returns the actual translation of a word given in key + //! \returns the actual translation of a word given in a key virtual QString search(QString key) = 0; //! \returns unique value (unique for every dictionary, not plugin) @@ -85,13 +85,13 @@ class CommonDictInterface : public QObject, public AccentsNormalizer { this->_hash=h; } - //! returns current plugin settings + //! \returns current plugin settings virtual Settings* settings() = 0; - //! returns plugin icon + //! \returns plugin icon virtual QIcon* icon() = 0; - //! returns empty translation object (to be fetched later) for given key + //! \returns empty translation object (to be fetched later) for a given key virtual Translation* getTranslationFor(QString ) {return 0;} /*! plugin should delete any files (eg. cache) that have been created and are ready @@ -118,13 +118,13 @@ class CommonDictInterface : public QObject, public AccentsNormalizer { virtual void retranslate() {} Q_SIGNALS: - //! emitted after change in a dictionary settings + //! emitted after change in dictionary settings void settingsChanged(); /*! emitted to backbone when it's needed to inform user about something \param Backbone::NotifyType GUI may decide to show different types in different ways - \param QString text of the notification + \param text of the notification */ void notify(Notify::NotifyType, QString); diff --git a/src/include/DictDialog.h b/src/include/DictDialog.h index 65f4131..206cf3c 100644 --- a/src/include/DictDialog.h +++ b/src/include/DictDialog.h @@ -43,14 +43,14 @@ public: DictDialog(QObject *parent = 0) : QObject(parent) {} /*! - Shows "add new dictionary" dialog and returns settings of new dict - \param parent parent widget on which dialog will be displayed + Shows "add a new dictionary" dialog and returns settings of a new dict + \param parent parent widget on which the dialog will be displayed */ virtual Settings* addNewDictionary(QWidget*parent=0)=0; /*! Shows "settings" dialog and saves new settings in plugin - \param parent parent widget on which dialog will be displayed + \param parent parent widget on which the dialog will be displayed */ virtual void changeSettings(QWidget *parent = 0) = 0; diff --git a/src/include/GUIInterface.h b/src/include/GUIInterface.h index ceb7796..47decc2 100644 --- a/src/include/GUIInterface.h +++ b/src/include/GUIInterface.h @@ -45,11 +45,11 @@ public: GUIInterface(QWidget *parent = 0) :QMainWindow(parent) {} virtual ~GUIInterface() {} - //! Returns all loaded dictionaries with information about that they are + //! Returns all loaded dictionaries with information if they are //! active/inactive /*! - \return Hash of pointers to dictionary and boolean flag indicating if - dictionary is active + \return Hash of pointers to a dictionary and boolean flag indicating if + a dictionary is active */ virtual QHash getDictionaries() = 0; @@ -63,7 +63,7 @@ public: //! Indicates if GUI is in exact search mode. /*! 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 + displaying matching words list. This mode should be used for browsing search history and searching for words from application arguments. \returns flag indicating if GUI is in exact search mode @@ -84,7 +84,7 @@ public Q_SLOTS: /*! 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 for in dictionaries + \param word word which will be searched for in dictionaries */ virtual void searchExact(QString word) = 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 for with searchExact() function + Translation of a word is searched for with searchExact() function \sa searchExact() */ virtual void historyPrev() = 0; @@ -121,7 +121,7 @@ public Q_SLOTS: /*! Checks if received list is empty, in that case it 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 + word in received list, and if the word is found it will emit signal to display its translation. Otherwise it will display list of matching words and show suitable information. \sa exactSearch() @@ -159,9 +159,9 @@ Q_SIGNALS: //! Emitted when user wants to break search void stopSearching(); - //! Emitted after receiving word list in wordListReady() slot, will display + //! Emitted after receiving words list in wordListReady() slot, will display //! list of matched words - /*! \param hash of word and list of translations of this word found + /*! \param hash of a word and list of translations of this word found in dictionaries */ void showWordList(QHash >); @@ -173,12 +173,12 @@ Q_SIGNALS: */ void showTranslation(QStringList); - //! Emitted when user wants to add new dictionary + //! Emitted when user wants to add a new dictionary /*! \param new dictionary returned by specific plugin dialog */ void addNewDictionary(CommonDictInterface*); - //! Emitted when user wants to remove dictionary + //! Emitted when user wants to remove a dictionary /*! \param dictionary which will be removed */ void removeDictionary(CommonDictInterface*); diff --git a/src/include/settings.h b/src/include/settings.h index 9b338ae..96e227f 100644 --- a/src/include/settings.h +++ b/src/include/settings.h @@ -45,9 +45,9 @@ class Settings { _settings = QHash(set->_settings); } - /*! \returns value fo given key - \param key name of given setting - \return value of given setting + /*! \returns value fo a given key + \param key name of a given setting + \return value of a given setting */ QString value(const QString key) const { if(!_settings.contains(key)) { @@ -56,9 +56,9 @@ class Settings { return _settings[key]; } - /*! sets key to value - \param key name of given setting - \param value of given setting + /*! sets key to a value + \param key name of a given setting + \param value value of a given setting */ void setValue(const QString key, const QString value) { _settings.insert(key, value); diff --git a/src/include/translation.h b/src/include/translation.h index f510bfd..bfcf326 100644 --- a/src/include/translation.h +++ b/src/include/translation.h @@ -64,7 +64,7 @@ class Translation { _bookmark = b; } - //! returns coresponding dict object + //! \returns corresponding dict object virtual uint dict() const {return 0;} protected: diff --git a/src/mdictionary/backbone/Bookmarks.h b/src/mdictionary/backbone/Bookmarks.h index 74534a5..3172377 100644 --- a/src/mdictionary/backbone/Bookmarks.h +++ b/src/mdictionary/backbone/Bookmarks.h @@ -49,8 +49,8 @@ class BookmarkTranslation; /*! 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 - special list with cached translations from all available dictionaries so + When You add a bookmark (by clicking on "star" in words list) You add it to + a special list with cached translations from all available dictionaries so You can search for them quickly even when You delete corresponding dict. */ class Bookmarks : public AccentsNormalizer { @@ -63,7 +63,7 @@ public: */ void add(Translation* translation); - /*! Removes word and corresponding translation cache from bookmark list + /*! Removes word and corresponding translation cache from bookmarks list \param translation translation to be removed */ void remove(Translation* translation); @@ -74,7 +74,7 @@ public: QList list(); /*! Searches in bookmarks for a given word (wildcards may apply '*' and '?') - \param word to search for + \param word word to search for \return list of matching Translation objects */ QList searchWordList(QString word); @@ -92,7 +92,7 @@ public: /*! \return true if a given word is already in bookmarks - \param word to check + \param word word to check */ bool inBookmarks(QString word); diff --git a/src/mdictionary/backbone/ConfigGenerator.h b/src/mdictionary/backbone/ConfigGenerator.h index 9d4002c..caeda4c 100644 --- a/src/mdictionary/backbone/ConfigGenerator.h +++ b/src/mdictionary/backbone/ConfigGenerator.h @@ -33,7 +33,7 @@ #include /*! ConfigGenerator generates configuration files (with default values), -if given file doesn't exist. +if a given file doesn't exist. */ class ConfigGenerator { @@ -48,7 +48,7 @@ public: /*! Generates default configuration files \param file file to be generated - \return if file was generated - returns true; if file alredy exists + \return if file was generated - returns true; if file already exists returns true; if file doesn't exist but cannot be generated returns false */ bool generateDefaultConfig(QString file); diff --git a/src/mdictionary/backbone/backbone.h b/src/mdictionary/backbone/backbone.h index a9f05c0..be84df7 100644 --- a/src/mdictionary/backbone/backbone.h +++ b/src/mdictionary/backbone/backbone.h @@ -80,7 +80,7 @@ * search_bookmarks - true/false, whether search in bookmarks Searching schema: - At first GUI should ask for list of words matching given pattern, + At first GUI should ask for a list of words matching a given pattern, then each Translation object is capable of finding its own final translation List of words: @@ -105,9 +105,9 @@ class Backbone : public QObject Q_OBJECT public: - /*!\param pluginPath path to plugins (leave blank for default) - \param configPath path to folder with configuration files - \param dry dry run is mode without paying attention to configuration etc + /*! \param pluginPath path to plugins (leave blank for default) + \param configPath path to folder with configuration files + \param dry dry run is mode without paying attention to configuration etc mainly for testing */ Backbone(QString pluginPath="", QString configPath="", @@ -124,7 +124,7 @@ public: //! \return history of performed searches History* history(); - //! \return return search fesult + //! \return search fesult QMultiHash result(); //! \return maximum number of words that plugin could find @@ -145,16 +145,16 @@ public Q_SLOTS: void stopSearching(); /*! searches for a word translation - \param word to be translated + \param word word to be translated */ void search(QString word); /*! sets active dictionaries (searches are performed only in active dicts) \param List of dictionaries to be activated */ - void selectedDictionaries(QList); + void selectedDictionaries(QList); - /*! adds new dictionary and activates it + /*! adds a new dictionary and activates it \param dict dictionary to be added \param active decides whether searches are perfomed in given dictionaries */ @@ -165,7 +165,7 @@ public Q_SLOTS: void quit(); - /*! Fired by FutureWatcher when list of words is ready (after calling search) + /*! Fired by FutureWatcher when a list of words is ready (after calling search), fetch Future<...> to final result */ void translationReady(); @@ -175,7 +175,7 @@ public Q_SLOTS: */ void xmlTranslationReady(); - /*! Removes given dictionary + /*! Removes a given dictionary \param dict dictionary to be deleted */ void removeDictionary(CommonDictInterface* dict); @@ -191,7 +191,7 @@ public Q_SLOTS: /*! 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 + \param translations list of Translation objects to be stored in db */ void addBookmark(QList translations) { foreach(Translation* translation, translations) @@ -201,7 +201,7 @@ public Q_SLOTS: /*! Removes bookmarks to given translations - \param translation remove bookmark to this translation + \param translations remove bookmark to these translations */ void removeBookmark(QList translations) { foreach(Translation* translation, translations) @@ -217,7 +217,7 @@ public Q_SLOTS: } - /*! Searching a list of bookmarks may take some time, so I moved it to + /*! Searching a list of bookmarks may take some time, so it's moved to a new thread (to avoid GUI blocking), further it's consistent with ordinary searching a list of words (\see search) */ @@ -272,7 +272,7 @@ Q_SIGNALS: /*! 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 + \param text of the notification */ void notify(Notify::NotifyType, QString); diff --git a/src/mdictionary/gui/AboutWidget.cpp b/src/mdictionary/gui/AboutWidget.cpp index 1a4763a..fe421eb 100644 --- a/src/mdictionary/gui/AboutWidget.cpp +++ b/src/mdictionary/gui/AboutWidget.cpp @@ -35,16 +35,16 @@ AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent) comarchNote += "
" "Report bug"; licenseNote = QString("

This program is free" - "software: you can redistribute it and/or modify\n" + " software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as" - "published by\n" + " published by\n" "the Free Software Foundation, either version 3 of the License," - "or\n" + " or\n" "(at your option) any later version.
" "This program is distributed in the hope that it will be" - "useful,\n" + " useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty" - "of\n" + " of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. " "See the\n" "GNU General Public License for more details.
" diff --git a/src/mdictionary/gui/DBusAdapter.h b/src/mdictionary/gui/DBusAdapter.h index 80337b3..358c333 100644 --- a/src/mdictionary/gui/DBusAdapter.h +++ b/src/mdictionary/gui/DBusAdapter.h @@ -29,7 +29,7 @@ #include "MainWindow.h" /*! - Implements dbus adapter which defines dbus interface for application. + Implements dbus adapter which defines dbus interface for an application. Other application can use this interface to call mdictionary methods. */ class DBusAdapter : public QDBusAbstractAdaptor diff --git a/src/mdictionary/gui/DictManagerWidget.h b/src/mdictionary/gui/DictManagerWidget.h index ee085f2..eec621c 100644 --- a/src/mdictionary/gui/DictManagerWidget.h +++ b/src/mdictionary/gui/DictManagerWidget.h @@ -34,7 +34,7 @@ //! Implements dictionaries management widget /*! Shows list of loaded dictionaries and their states (active/inactive). - It allows to change dicts states, add new dict, remove selected one or + It allows to change dicts states, add a new dict, remove selected one or change settings of selected dict. All changes are saved automatically after hiding of this widget. */ @@ -43,7 +43,7 @@ class DictManagerWidget : public QDialog { public: //! Constructor /*! - \param parent parent of this widget, which must be subclass of + \param parent parent of this widget, which must be a subclass of GUIInterface, because it will use it to get info about loaded plugins and dicts. */ @@ -60,13 +60,13 @@ Q_SIGNALS: */ void selectedDictionaries(QList); - //! Emitted when user wants to add new dictionary + //! Emitted when user wants to add a new dictionary /*! \param new dictionary returned by specific plugin dialog */ void addDictionary(CommonDictInterface*); - //! Emitted when user wants to remove dictionary + //! Emitted when user wants to remove a dictionary /*! \param dictionary which will be removed */ @@ -80,16 +80,16 @@ public Q_SLOTS: #endif private Q_SLOTS: - /*! Shows "plugin select" dialog and then plugin specific "add new dictionary - dialog", which will return new CommonDictInterface* object, which is - later passed as parameter of addDictionary signal*/ + /*! Shows "plugin select" dialog and then plugin specific "add a new dictionary" + dialog, which will return new CommonDictInterface* object, which is + later passed as a parameter of addDictionary signal*/ void addNewDictButtonClicked(); - /*! Passes dictionary selected from list as parameter of removeDictionary + /*! Passes dictionary selected from a list as a parameter of removeDictionary signal */ void removeButtonClicked(); - //! user select one of items + //! user selects one of items void itemSelected(QListWidgetItem*); //! Shows plugin's settings dialog diff --git a/src/mdictionary/gui/DictTypeSelectDialog.h b/src/mdictionary/gui/DictTypeSelectDialog.h index 1bb725a..fdfea02 100644 --- a/src/mdictionary/gui/DictTypeSelectDialog.h +++ b/src/mdictionary/gui/DictTypeSelectDialog.h @@ -34,23 +34,23 @@ //! Implements plugin selection dialog /*! - Shows list of loaded dictionaries plugins. + Shows a list of loaded dictionaries plugins. Static function addNewdict will return selected plugin. */ class DictTypeSelectDialog : public QDialog { Q_OBJECT public: - //! Shows dialog with list of plugins + //! Shows dialog with a list of plugins /*! \param plugins list of loaded plugins - \param parent widget + \param parent parent widget \return selected plugin, if user cancels dialog it returns 0 (NULL) */ static CommonDictInterface* addNewDict( QList plugins, QWidget *parent = 0); - //! Returns plugin selected by user + //! \returns plugin selected by user CommonDictInterface* selectedPlugin(); protected: diff --git a/src/mdictionary/gui/HistoryListDialog.h b/src/mdictionary/gui/HistoryListDialog.h index 767a968..20bf354 100644 --- a/src/mdictionary/gui/HistoryListDialog.h +++ b/src/mdictionary/gui/HistoryListDialog.h @@ -32,8 +32,8 @@ //! Implements history list dialog /*! - Shows history list and allows user to select one word of it. - On desktop it is shown as popup. + Shows a history list and allows user to select one word of it. + On desktop it is shown as a popup. */ class HistoryListDialog : public QDialog { @@ -42,14 +42,14 @@ public: //! Constructor /*! \param words list of history words - \param parent widget + \param parent parent widget */ explicit HistoryListDialog(QStringList words, QWidget* parent = 0); - //! Returns word selected by user + //! \returns word selected by user QString selectedWord(); - //! Returns row number of selected word + //! \returns row number of selected word int selectedRow(); private Q_SLOTS: diff --git a/src/mdictionary/gui/MainWindow.h b/src/mdictionary/gui/MainWindow.h index f4a0f0b..06e24e1 100644 --- a/src/mdictionary/gui/MainWindow.h +++ b/src/mdictionary/gui/MainWindow.h @@ -47,7 +47,7 @@ with suitable backbone signals and slots. Only this class has direct access to backbone object. It manages all requests of subcomponents e. g. searching for a given word, - displaying history, removing dictionary. + displaying history, removing a dictionary. It also provides data from backbone to subcomponents e. g. result of search. */ class MainWindow : public GUIInterface @@ -57,17 +57,17 @@ class MainWindow : public GUIInterface public: //! Constructor /*! - \param backbone object which will be doing all searches and returning data + \param backbone backbone object which will be doing all searches and returning data \param parent parent widget of this window */ MainWindow(Backbone* backbone, QWidget *parent = 0); ~MainWindow(); - //! Returns all loaded dictionaries with infromation about that they are + //! Returns all loaded dictionaries with information if they are //! active/inactive /*! - \return Hash of pointers to dictionary and boolean flag indicating if - dictionary is active + \return Hash of pointers to a dictionary and boolean flag indicating if + a dictionary is active */ QHash getDictionaries(); @@ -152,7 +152,7 @@ public: \sa isInExactSearch() \sa setExactSearchString() */ - void setExactSearch(bool); + void setExactSearch(bool exactSearch); //! Gets word list from backbone and prepares received list to display @@ -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 for with searchDelay() function. + Translation of a word is searched for with searchDelay() function. On maemo search is in normal mode, on desktop in exact search mode. \sa searchDelay() \sa searchExact() @@ -204,8 +204,8 @@ 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 for with searchDelay() function. + It will work only if there is previous word available in history. + Translation of a word is searched for with searchDelay() function. On maemo search is in normal mode, on desktop in exact search mode. \sa searchDelay() \sa searchExact() diff --git a/src/mdictionary/gui/NotifyManager.h b/src/mdictionary/gui/NotifyManager.h index 831fcda..edfb5a6 100644 --- a/src/mdictionary/gui/NotifyManager.h +++ b/src/mdictionary/gui/NotifyManager.h @@ -34,9 +34,9 @@ //! Manages notifications in applications /*! - Shows notifications to user, assures that couple of the same notification - will not be displayed at the same time. It automatically delete - notifications after user accept or reject it. + Shows notifications to user, assures that a couple of the same notifications + will not be displayed at the same time. It automatically deletes + notifications after user accepts or rejects them. */ class NotifyManager : public QObject diff --git a/src/mdictionary/gui/SearchBarWidget.cpp b/src/mdictionary/gui/SearchBarWidget.cpp index f4ad398..2300018 100644 --- a/src/mdictionary/gui/SearchBarWidget.cpp +++ b/src/mdictionary/gui/SearchBarWidget.cpp @@ -73,8 +73,8 @@ SearchBarWidget::~SearchBarWidget() { } -QIcon SearchBarWidget::generateIcon(QIcon oryginal, qreal rotation) { - QPixmap p = oryginal.pixmap(64); +QIcon SearchBarWidget::generateIcon(QIcon original, qreal rotation) { + QPixmap p = original.pixmap(64); if(rotation != 0) { diff --git a/src/mdictionary/gui/SearchBarWidget.h b/src/mdictionary/gui/SearchBarWidget.h index 31e8fa7..af7c1b3 100644 --- a/src/mdictionary/gui/SearchBarWidget.h +++ b/src/mdictionary/gui/SearchBarWidget.h @@ -45,8 +45,8 @@ public: ~SearchBarWidget(); Q_SIGNALS: - //! Requests to search for a list of words matching word passed as - //! parameter + //! Requests to search for a list of words matching a word passed as + //! a parameter void searchForTranslations(QString); //! Requests to stop all active searchings @@ -61,7 +61,7 @@ Q_SIGNALS: //! Requests to show history list /*! \param p this argument is used only on desktop, it defines place on - which popup with history will be shown + which a popup with history will be shown */ void historyShow(QPoint p = QPoint(-1,-1)); @@ -143,12 +143,12 @@ private: //! generates icon for maemo (some of icons we use don't have inactive - //! pixmaps, so we generate them + //! pixmaps, so we generate them) /*! - \param oryginal oryginal icon + \param original original icon \param rotation rotation of resulting icon */ - QIcon generateIcon(QIcon oryginal, qreal rotation=0); + QIcon generateIcon(QIcon original, qreal rotation=0); QVBoxLayout* verticalLayout; diff --git a/src/mdictionary/gui/SettingsWidget.h b/src/mdictionary/gui/SettingsWidget.h index 55ad2d0..b8d8bd3 100644 --- a/src/mdictionary/gui/SettingsWidget.h +++ b/src/mdictionary/gui/SettingsWidget.h @@ -46,7 +46,7 @@ class SettingsWidget : public QDialog public: //! Constructor /*! - \param parent parent of this widget, which must be subclass of + \param parent parent of this widget, which must be a subclass of GUIInterface, because it will use it to get current settings and set new ones. */ diff --git a/src/mdictionary/gui/TranslationWidget.h b/src/mdictionary/gui/TranslationWidget.h index b0537d0..9e3e36c 100644 --- a/src/mdictionary/gui/TranslationWidget.h +++ b/src/mdictionary/gui/TranslationWidget.h @@ -34,7 +34,7 @@ #include #include "../../include/GUIInterface.h" -//! Displays translation of word found in dictionaries +//! Displays translation of a word found in dictionaries /*! Displays many translations of word, formatted as xml. */ @@ -50,10 +50,10 @@ public Q_SLOTS: //! Show widget. void show(); - //! Requests to show translation of word list passed as parameter. + //! Requests to show a translation of words list passed as parameter. void show(QStringList); - //! Updates users zoom preferences and sends its to backbone to be saved + //! Updates user's zoom preferences and sends its to backbone to be saved void updateZoom(qreal); protected: diff --git a/src/mdictionary/gui/WordListWidget.cpp b/src/mdictionary/gui/WordListWidget.cpp index 379e691..e44a839 100644 --- a/src/mdictionary/gui/WordListWidget.cpp +++ b/src/mdictionary/gui/WordListWidget.cpp @@ -127,7 +127,7 @@ void WordListWidget::wordChecked(QModelIndex index) { QModelIndex item = selectedIndexes().at(0); if(!item.isValid()) return; - //to shorten lag between clicking on star and its change + //to shorten lag between clicking on a star and its change repaint(); //depending on new state emit suitable signal @@ -154,16 +154,16 @@ void WordListWidget::mouseReleaseEvent(QMouseEvent *event) { system doesn't select item but emits mouseReleaseEvent*/ if(selectedIndexes().count() == 0) return; - //if user doesn't click either on word or on star, return + //if user doesn't click either on a word or on a star, return if(selectedIndexes().at(0) != index && selectedIndexes().at(1) != index) return; int c = index.column(); if(c==0) - //if column is 0 user clicked word + //if column is 0 user clicked on a word wordClicked(index); else - //else user clicked star + //else user clicked on a star wordChecked(index); } diff --git a/src/mdictionary/gui/WordListWidget.h b/src/mdictionary/gui/WordListWidget.h index b854730..7b26e51 100644 --- a/src/mdictionary/gui/WordListWidget.h +++ b/src/mdictionary/gui/WordListWidget.h @@ -75,7 +75,7 @@ public Q_SLOTS: protected: //! Reimplemented standard mouseReleaseEvent to check if user clicked on - //! word or on its star to emit suitable signal + //! a word or on its star to emit suitable signal void mouseReleaseEvent(QMouseEvent *event); //! Resizes the size of columns to assure that stars are always on right @@ -86,11 +86,11 @@ protected: private Q_SLOTS: //! Emits signal to show translation of clicked item. Signal is emitted - //! only when word was clicked. + //! only when a word was clicked. void wordClicked(QModelIndex index); //! Emits signal to show add or remove word from bookmarks. - //! Signal is emitted only when star was clicked. + //! Signal is emitted only when a star was clicked. void wordChecked(QModelIndex index); @@ -101,7 +101,7 @@ private: QStandardItemModel* model; - //! Describes width of star checkbox in pixels + //! Describes width of a star checkbox in pixels int checkBoxWidth; //! Resizes sizes of colums after adding new words or after resize event. diff --git a/src/mdictionary/mdictionary.pro b/src/mdictionary/mdictionary.pro index 096f288..8e3195b 100644 --- a/src/mdictionary/mdictionary.pro +++ b/src/mdictionary/mdictionary.pro @@ -13,6 +13,8 @@ QT = core \ maemo5:QT += maemo5 +message($$CONFIG) + SOURCES += gui/main.cpp \ backbone/ConfigGenerator.cpp \ gui/MainWindow.cpp \ @@ -93,19 +95,34 @@ unix { shared.files += ../../data/icons/16x16/staron.png shared.files += ../../data/xsl/mask.png - css.path = $$DATA_DIR/css - css.files += ../../data/css/style.css - - css_images.path = $$DATA_DIR/css/images - css_images.files += ../../data/css/images/header-background.png - css_images.files += ../../data/css/images/header-border.png - css_images.files += ../../data/css/images/shadow-grey-bg.png - css_images.files += ../../data/css/images/shadow-white-bg.png - css_images.files += ../../data/css/images/tab-background.png - css_images.files += ../../data/css/images/key-background.png - - service.path = $$SHARE_DIR/dbus-1/services - service.files += ../../data/other/com.comarch.mdictionary.service + meego { + css.path = $$DATA_DIR/css + css.files += ../../data/css_meego/style.css + + css_images.path = $$DATA_DIR/css/images + css_images.files += ../../data/css_meego/images/header-background.png + css_images.files += ../../data/css_meego/images/header-border.png + css_images.files += ../../data/css_meego/images/shadow-grey-bg.png + css_images.files += ../../data/css_meego/images/shadow-white-bg.png + css_images.files += ../../data/css_meego/images/tab-background.png + css_images.files += ../../data/css_meego/images/key-background.png + css_images.files += ../../data/css_meego/images/shadow-transparent-bg.png + css_images.files += ../../data/css_meego/images/splash2.png + } + !meego { + css.path = $$DATA_DIR/css + css.files += ../../data/css_maemo/style.css + + css_images.path = $$DATA_DIR/css/images + css_images.files += ../../data/css_maemo/images/header-background.png + css_images.files += ../../data/css_maemo/images/header-border.png + css_images.files += ../../data/css_maemo/images/shadow-grey-bg.png + css_images.files += ../../data/css_maemo/images/shadow-white-bg.png + css_images.files += ../../data/css_maemo/images/tab-background.png + css_images.files += ../../data/css_maemo/images/key-background.png + } + service.path = $$SHARE_DIR/dbus-1/services + service.files += ../../data/other/com.comarch.mdictionary.service INSTALLS += desktop icon64 shared service css css_images } diff --git a/src/plugins/google/GoogleDialog.h b/src/plugins/google/GoogleDialog.h index 289b349..fb6e4ac 100644 --- a/src/plugins/google/GoogleDialog.h +++ b/src/plugins/google/GoogleDialog.h @@ -35,47 +35,47 @@ //! Implementation of google plugin's dialogs. /*! - This class can create dialogs for adding new dictionary or changins settings - of existing one, based on dialog type passed to contructor. - These type are different only in confirm button label. - Both provides comboboxes with availaible languages to choose. + This class can create dialogs for adding a new dictionary or changing settings + of an existing one, based on dialog type passed to constructor. + These types differ only in confirm button label. + Both provide comboboxes with available languages to choose. */ class GoogleDialog : public QDialog { Q_OBJECT public: /*! - Describes type of dialog. New means that dialog confirm button has label - Add", Change means dialog confirm button has label "Save settings" + Describes type of dialog. New means that dialog confirm button has + "Add" label, Change means that dialog confirm button has "Save settings" label. */ enum GoogleDialogType {New, Change}; //! Constructor /*! Creates new google dialog - \param plugin if creating dialog of type Change it must be set to - pointer of plugin whose settings will be changed - \param type describes type of creating dialog - \param parent parent widget of creating dialog + \param plugin if created dialog is of type Change it must be set to + point to plugin whose settings will be changed + \param type describes type of created dialog + \param parent parent widget of created dialog */ explicit GoogleDialog(GooglePlugin* plugin = 0, GoogleDialogType type = New, QWidget* parent = 0); - //! Returns settings of plugin + //! \returns settings of plugin /*! - After acceptance of dialog this method return plugin's settings based on - user choises in dialog. + After acceptance of dialog this method returns plugin's settings based on + user's choices in dialog. */ Settings* getSettings(); Q_SIGNALS: - //! Request to show notification + //! requests to show notification void notify(Notify::NotifyType, QString); public Q_SLOTS: - //! Reimplemented accept method, to save new settings + //! reimplemented accept method, to save new settings void accept(); private Q_SLOTS: diff --git a/src/plugins/google/GoogleDictDialog.h b/src/plugins/google/GoogleDictDialog.h index 243d35b..584509c 100644 --- a/src/plugins/google/GoogleDictDialog.h +++ b/src/plugins/google/GoogleDictDialog.h @@ -20,7 +20,7 @@ *******************************************************************************/ /*! \file GoogleDictDialog.h - \brief Class launches dialog which generates new dictionary, or changes + \brief Class launches dialog which generates a new dictionary, or changes settings \author Jakub Jaszczynski */ @@ -40,7 +40,7 @@ class GoogleDictDialog : public DictDialog public: explicit GoogleDictDialog(GooglePlugin* plugin, QObject *parent = 0); /*! - Shows "add new google dictionary" dialog and returns settings of new dict + Shows "add new google dictionary" dialog and returns settings of a new dict \param parent parent widget on which dialog will be displayed */ Settings* addNewDictionary(QWidget *parent); diff --git a/src/plugins/google/GooglePlugin.h b/src/plugins/google/GooglePlugin.h index c6e201f..01097bb 100644 --- a/src/plugins/google/GooglePlugin.h +++ b/src/plugins/google/GooglePlugin.h @@ -50,16 +50,16 @@ public: GooglePlugin(QObject *parent=0); ~GooglePlugin(); - //! returns source language code iso 639-2 + //! \returns source language code iso 639-2 QString langFrom() const; - //! returns destination language code iso 639-2 + //! \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) + //! \returns dictionary type (xdxf, google translate, etc) QString type() const; //! returns information about dictionary (name, authors, etc) @@ -71,36 +71,36 @@ public: //! sets the language from which the translation is done void setLangFrom(QString langFrom); - /*! returns DictDialog object that creates dialogs + /*! \returns DictDialog object that creates dialogs for adding new dictionaries and changing plugin things */ DictDialog* dictDialog(); - //! returns new, clean copy of plugin with settings set as in Settings* + //! \returns new, clean copy of plugin with settings set as in Settings* CommonDictInterface* getNew(const Settings*) const; - //! returns whether plugin can start searching + //! \returns whether plugin can start searching bool isAvailable() const; //! sets if connection with Internet is possible void setConnectionAccept(QString connectionAcepted); - //! returns the value of "connection_accepted" from settings + //! \returns the value of "connection_accepted" from settings bool isConnectionAccept() const; - //! returns a description of a word given by a QString + //! \returns a description of a word given by a QString QString search(QString key); - //! returns current plugin settings + //! \returns current plugin settings Settings* settings(); //! Sets new settings void setSettings(const Settings*); - //! returns plugin icon + //! \returns plugin icon QIcon* icon(); - //! returns empty translation object (to be fetched later) for given key + //! \returns empty translation object (to be fetched later) for a given key Translation* getTranslationFor(QString key); //! initializes the list of available languages in Google translator @@ -118,7 +118,7 @@ public slots: */ QList searchWordList(QString word, int limit=0); - //! stop current operation + //! stops current operation void stop(); //! function called after the request from Google is returned @@ -141,7 +141,7 @@ private: //! information about dictionary QString _infoNote; - //! icon displayed during translations and when the dictionary is chosen + //! icon displayed during translations and when a dictionary is chosen QIcon _icon; Settings *_settings; //! indicates if search is stopped diff --git a/src/plugins/google/TranslationGoogle.h b/src/plugins/google/TranslationGoogle.h index 16d1e29..3004cbf 100644 --- a/src/plugins/google/TranslationGoogle.h +++ b/src/plugins/google/TranslationGoogle.h @@ -57,7 +57,7 @@ public: return _bookmark; } - //! returns corresponding dict object + //! \returns corresponding dict object uint dict() const {return _dictHash;} private: diff --git a/src/plugins/google/translations/pl_PL.qm b/src/plugins/google/translations/pl_PL.qm index 332fd8c..252b702 100644 Binary files a/src/plugins/google/translations/pl_PL.qm and b/src/plugins/google/translations/pl_PL.qm differ diff --git a/src/plugins/xdxf/TranslationXdxf.h b/src/plugins/xdxf/TranslationXdxf.h index 4b4a70e..518faa5 100644 --- a/src/plugins/xdxf/TranslationXdxf.h +++ b/src/plugins/xdxf/TranslationXdxf.h @@ -53,7 +53,7 @@ public: return _bookmark; } - //! returns coresponding dict object + //! returns corresponding dict object uint dict() const {return _dictHash;} private: diff --git a/src/plugins/xdxf/XdxfDialog.h b/src/plugins/xdxf/XdxfDialog.h index 6108eff..ec50274 100644 --- a/src/plugins/xdxf/XdxfDialog.h +++ b/src/plugins/xdxf/XdxfDialog.h @@ -35,16 +35,16 @@ //! Implementation of xdxf plugin's dialogs. /*! - This class can create dialogs for adding new dictionary or changins settings - of existing one, based on dialog type passed to contructor. - When adding new dictionary dialog contains button to browse file system and - select dictionary file. When changing settings dialog displays basic + This class can create dialogs for adding a new dictionary or changing settings + of an existing one, based on dialog type passed to contructor. + When adding a new dictionary dialog contains a button to browse file system and + select a dictionary file. When changing settings dialog displays basic information about dictionary i. e. name, languages and license info. - In both types of dialogs there are comboboxes with cache and remove accents - options. On maemo right next to comboboxes are tool button which allow to - see more information about this options, on desktop the same information is - displayed as tool tip. - All content of dialog is in scroll area. + In both types of dialogs there are comboboxes with "cache" and "remove accents" + options. On maemo right next to comboboxes are tool buttons which allow to + see more information about these options, on desktop the same information is + displayed as a tool tip. + All contents of a dialog are in a scroll area. */ class XdxfDialog : public QDialog { @@ -55,35 +55,35 @@ public: file system and select dictionary file. Change means that dialog displays information about dictionary. In both types dialog provides widgets to create or delete cache and remove - or left accents. + or keep accents. */ enum XdxfDialogType {New, Change}; //! Constructor /*! Creates new xdxf dialog - \param plugin if creating dialog of type Change it must be set to - pointer of plugin whose settings will be changed - \param type describes type of creating dialog - \param parent parent widget of creating dialog + \param plugin if created dialog is of type Change it must be set to + point to plugin whose settings will be changed + \param type describes type of created dialog + \param parent parent widget of created dialog */ explicit XdxfDialog(XdxfPlugin* plugin = 0, XdxfDialogType type = New, QWidget* parent = 0); - //! Returns settings of plugin + //! \returns settings of plugin /*! - After acceptance of dialog this method return plugin's settings based on - user choises in dialog. + After acceptance of dialog this method returns plugin's settings based on + user's choices in dialog. */ Settings* getSettings(); Q_SIGNALS: - //! Request to show notification + //! Requests to show notification void notify(Notify::NotifyType, QString); public Q_SLOTS: - //! Reimplemented accept method, to check if all necessery fields in + //! Reimplemented accept method, to check if all necessary fields in //! dialog are correct e. g. dictionary file path //! and saves new settings void accept(); diff --git a/src/plugins/xdxf/XdxfDictDialog.cpp b/src/plugins/xdxf/XdxfDictDialog.cpp index 07b7b31..62e1f3d 100644 --- a/src/plugins/xdxf/XdxfDictDialog.cpp +++ b/src/plugins/xdxf/XdxfDictDialog.cpp @@ -38,10 +38,14 @@ QWidget* XdxfDictDialog::lastDialogParent() { return _lastDialogParent; } +void XdxfDictDialog::setLastDialogParent(QWidget *w) { + _lastDialogParent = w; +} + Settings* XdxfDictDialog::addNewDictionary(QWidget *parent) { XdxfDialog d(0, XdxfDialog::New, parent); - _lastDialogParent = parent; + setLastDialogParent(parent); connect(&d, SIGNAL(notify(Notify::NotifyType,QString)), this, SIGNAL(notify(Notify::NotifyType,QString))); @@ -55,7 +59,7 @@ Settings* XdxfDictDialog::addNewDictionary(QWidget *parent) { void XdxfDictDialog::changeSettings(QWidget * parent) { XdxfDialog d(plugin, XdxfDialog::Change, parent); - _lastDialogParent = parent; + setLastDialogParent(parent); connect(&d, SIGNAL(notify(Notify::NotifyType,QString)), this, SIGNAL(notify(Notify::NotifyType,QString))); diff --git a/src/plugins/xdxf/XdxfDictDialog.h b/src/plugins/xdxf/XdxfDictDialog.h index fe6e2f4..50b8ac3 100644 --- a/src/plugins/xdxf/XdxfDictDialog.h +++ b/src/plugins/xdxf/XdxfDictDialog.h @@ -36,7 +36,7 @@ class XdxfDictDialog : public DictDialog { public: explicit XdxfDictDialog(XdxfPlugin* plugin, QObject *parent = 0); /*! - Shows "add new xdxf dictionary" dialog and returns settings of new dict + Shows "add new xdxf dictionary" dialog and returns settings of a new dict \param parent parent widget on which dialog will be displayed */ Settings* addNewDictionary(QWidget *parent); @@ -49,6 +49,8 @@ public: QWidget* lastDialogParent(); + void setLastDialogParent(QWidget*); + private: XdxfPlugin* plugin; QWidget* _lastDialogParent; diff --git a/src/plugins/xdxf/xdxfplugin.cpp b/src/plugins/xdxf/xdxfplugin.cpp index b49efba..aad8274 100644 --- a/src/plugins/xdxf/xdxfplugin.cpp +++ b/src/plugins/xdxf/xdxfplugin.cpp @@ -320,10 +320,22 @@ DictDialog* XdxfPlugin::dictDialog() { CommonDictInterface* XdxfPlugin::getNew(const Settings *settings) const { XdxfPlugin *plugin = new XdxfPlugin(); + connect(plugin, SIGNAL(notify(Notify::NotifyType,QString)), + this, SIGNAL(notify(Notify::NotifyType,QString))); + + ((XdxfDictDialog*)plugin->dictDialog())->setLastDialogParent(_dictDialog->lastDialogParent()); + + + if(settings && plugin->setSettings(settings)) { + + disconnect(plugin, SIGNAL(notify(Notify::NotifyType,QString)), + this, SIGNAL(notify(Notify::NotifyType,QString))); return plugin; } else { + disconnect(plugin, SIGNAL(notify(Notify::NotifyType,QString)), + this, SIGNAL(notify(Notify::NotifyType,QString))); delete plugin; return 0; } @@ -486,6 +498,8 @@ bool XdxfPlugin::makeCache(QString) { XdxfCachingDialog d(_dictDialog->lastDialogParent()); + qDebug()<<_dictDialog->lastDialogParent(); + connect(&d, SIGNAL(cancelCaching()), this, SLOT(stop())); diff --git a/src/plugins/xdxf/xdxfplugin.h b/src/plugins/xdxf/xdxfplugin.h index 4223c08..804d187 100644 --- a/src/plugins/xdxf/xdxfplugin.h +++ b/src/plugins/xdxf/xdxfplugin.h @@ -54,45 +54,49 @@ public: ~XdxfPlugin(); - //! returns source language code iso 639-2 + //! \returns source language code iso 639-2 QString langFrom() const; - //! returns destination language code iso 639-2 + //! \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) + //! \returns dictionary type (xdxf, google translate, etc) QString type() const; +<<<<<<< HEAD //! returns information about dictionary in xml (name, authors, etc) +======= + //! \returns information about dictionary in html (name, authors, etc) +>>>>>>> master QString infoNote() const; - /*! returns DictDialog object that creates dialogs - for adding new dictionary and changing plugin settings + /*! \returns DictDialog object that creates dialogs + for adding a new dictionary and changing plugin settings */ DictDialog* dictDialog(); - //! returns new, clean copy of plugin with settings set as in Settings* + //! \returns new, clean copy of plugin with settings set as in Settings* CommonDictInterface* getNew(const Settings*) const; - //! returns whether plugin can start searching + //! \returns whether plugin can start searching bool isAvailable() const; - //! returns a description of a word given by a QString + //! \returns a description of a word given by a QString QString search(QString key); - //! returns current plugin settings + //! \returns current plugin settings Settings* settings(); - //! returns words count in a dictionary + //! \returns words count in a dictionary long wordsCount(); //! Sets new settings bool setSettings(const Settings*); - //! returns plugin icon + //! \returns plugin icon QIcon* icon(); /*! plugin should delete any files (eg. cache) that have been created and are ready @@ -112,7 +116,7 @@ public Q_SLOTS: */ QList searchWordList(QString word, int limit=0); - //! stop current operation + //! stops current operation void stop(); //! loads translations for each plugin only once @@ -126,8 +130,8 @@ Q_SIGNALS: private: - /*! returns true or false depending on whether the dictionary is cached - or not, not implemented yet + /*! \returns true or false depending on whether the dictionary is cached + or not */ bool isCached(); /*! searches for a list of words similar to a word in a database file @@ -147,17 +151,17 @@ private: QList searchWordListFile(QString word, int limit=0); /*! searches for a translation of a word which is exactly like a key - in xdxf file */ + in a xdxf file */ QString searchFile(QString key); /*! searches for a translation of a word which is exactly like a key - in database file */ + in a database file */ QString searchCache(QString key); //! scans dictionary file to get information about it bool getDictionaryInfo(); - //! counts the keys in xdxf file + //! counts the keys in a xdxf file int countWords(); /*! transforms xdxf files to database files (caching operation) @@ -175,7 +179,7 @@ private: QString _dictionaryInfo; - //! icon displayed during translations and when the dictionary is chosen + //! icon displayed during translations and when a dictionary is chosen QIcon _icon; QSqlDatabase db; QString db_name;