Clean and order documentation in source files. Source ready to beta 2 release
[mdictionary] / src / plugins / stardict / StarDialog.h
index 85a08cc..3153491 100644 (file)
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-
 /*!
-    \file XdxfDialog.cpp
+    \file StarDialog.h
+    \brief Implementation of stardict plugin's dialogs.
+
     \author Mateusz Półrola <mateusz.polrola@gmail.com>
 */
 
 #include "StarDictPlugin.h"
 
 
-//! Implementation of xdxf plugin's dialogs.
 /*!
     This class can create dialogs for adding a new dictionary or changing settings
-     of an existing one, based on dialog type passed to contructor.
+    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 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 StarDialog : public QDialog
@@ -51,17 +47,17 @@ class StarDialog : 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 keep accents.
+        information about dictionary.
+        In both types dialog provides widgets to create or delete cache and remove
+        or keep accents.
     */
     enum StarDialogType {New, Change};
 
     //! Constructor
     /*!
-        Creates new xdxf dialog
+        Creates new StarDict 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
@@ -71,10 +67,10 @@ public:
                         StarDialogType type = New,
                         QWidget* parent = 0);
 
-    //! \returns settings of plugin
     /*!
         After acceptance of dialog this method returns plugin's settings based on
-         user's choices in dialog.
+        user's choices in dialog.
+        \returns settings of plugin
     */
     Settings* getSettings();
 
@@ -83,60 +79,39 @@ Q_SIGNALS:
     void notify(Notify::NotifyType, QString);
 
 public Q_SLOTS:
-    //! Reimplemented accept method, to check if all necessary 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();
-    void setAccents(bool);
-
-    #ifdef Q_WS_MAEMO_5
-        //! on maemo shows information about checkboxes
-        void showAccentsInfo();
-    #endif
-
 
 private:
+    //! create a user interface
     void initializeUI();
 
     //! saves new settings after acceptance of dialog
     void saveSettings();
 
+    //! check that files is compressed
+    bool checkFiles();
+
     QLabel* infoLabel;
     QPushButton* browseButton;
     QHBoxLayout* browseLayout;
 
-
-    QCheckBox* cacheCheckBox;
-    QCheckBox* accentsCheckBox;
-    QHBoxLayout* cacheLayout;
-    QHBoxLayout* accentsLayout;
-
-    QString cacheToolTip;
-    QString accentsToolTip;
-
-    #ifdef Q_WS_MAEMO_5
-        QToolButton* cacheInfoToolButton;
-        QToolButton* accentsInfoToolButton;
-    #endif
-
-
     QPushButton* confirmButton;
-
     QString _dictionaryFilePath;
-
     QScrollArea* scrollArea;
-
     QWidget* widget;
     QHBoxLayout* layout;
-
     QVBoxLayout* mainVerticalLayout;
-    bool _generateCache;
-    bool _accents;
-    bool _lastAccents;
+    bool _isCompressed;
+    QString _dictName;
 
     Settings* _settings;