change and add some comments, remove some warning
[mdictionary] / src / plugins / xdxf / XdxfDialog.h
index 6108eff..aa63a1e 100644 (file)
@@ -20,7 +20,7 @@
 *******************************************************************************/
 
 /*!
-    \file XdxfDialog.cpp
+    \file XdxfDialog.h
     \author Mateusz Półrola <mateusz.polrola@gmail.com>
 */
 
 
 //! 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
 {
     Q_OBJECT
 public:
     /*!
-      Describes type of dialog. New means that dialog contains widgets to browse
+        Describes type of dialog. New means that dialog contains widgets to browse
         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.
+        information about dictionary.
+        In both types dialog provides widgets to create or delete cache and remove
+        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
     /*!
-        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.
+        \returns settings of plugin
     */
     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
-    //! dialog are correct e. g. dictionary file path
-    //! and saves new settings
+    /*!
+        Reimplemented accept method, to check if all necessary fields in
+        dialog are correct e. g. dictionary file path
+        and saves new settings
+    */
     void accept();
 
 private Q_SLOTS:
     //! displays dialog to browse and select file
     void selectFile();
+
+    //! download dictionaries list
+    void downloadFile();
+
+    //! set properti _generateCache
     void setGenerateCache(bool);
+
+    //! set properti _accents
     void setAccents(bool);
 
+    void fileDownloaded(QString);
+
     #ifdef Q_WS_MAEMO_5
         //! on maemo shows information about checkboxes
         void showCacheInfo();
+
+        //! on maemo shows information about checkboxes
         void showAccentsInfo();
     #endif
 
@@ -109,8 +121,9 @@ private:
 
     QLabel* infoLabel;
     QPushButton* browseButton;
+    QPushButton* downloadButton;
     QHBoxLayout* browseLayout;
-
+    QHBoxLayout* infoLayout;
 
     QCheckBox* cacheCheckBox;
     QCheckBox* accentsCheckBox;