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 a 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
Q_SIGNALS:
void search(QString);
+ void notify(Notify::NotifyType, QString);
public Q_SLOTS:
//! Show widget.
//! 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:
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