Clean and order documentation in source files. Source ready to beta 2 release
[mdictionary] / src / mdictionary / gui / TranslationWidget.h
index 4e3352b..cb4f13b 100644 (file)
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-//! \file TranslationWidget.h
-//! \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+/*! \file TranslationWidget.h
+    \brief Displays translation of a word found in dictionaries
+
+    \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+*/
 
 #ifndef TRANSLATIONWIDGET_H
 #define TRANSLATIONWIDGET_H
 #include "../backbone/backbone.h"
 #include <QtXml>
 #include <QXmlQuery>
-#include "TranslationTextEdit.h"
+#include "TranslationView.h"
 #include <QPropertyAnimation>
 #include "../../include/GUIInterface.h"
 
-//! Displays translation of word found in dictionaries
 /*!
-    Displays many translations of word, formatted as html.
+    Displays many translations of word, formatted as xml.
 */
 class TranslationWidget : public QScrollArea {
     Q_OBJECT
@@ -45,15 +47,16 @@ public:
 
 Q_SIGNALS:
     void search(QString);
+    void notify(Notify::NotifyType, QString);
 
 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:
@@ -64,15 +67,18 @@ protected:
 
 private Q_SLOTS:
     void searchSelected();
+    void copySelected();
     #ifdef Q_WS_MAEMO_5
         void showButtons();
     #endif
 
 private:
     QString XslConversion(QString translation);
+    QString checkTranslation(QString trans);
+    QString createTranslation(QStringList translations);
     QToolButton* zoomInToolButton;
     QToolButton* zoomOutToolButton;
-    TranslationTextEdit *webkit;
+    TranslationView *webkit;
     QString xslt;
 
     #ifdef Q_WS_MAEMO_5