Clean and order documentation in source files. Source ready to beta 2 release
[mdictionary] / src / plugins / xdxf / TranslationXdxf.cpp
index c214a7b..e6974c6 100644 (file)
     Copyright 2010 Comarch S.A.
 
 *******************************************************************************/
-/*! \file TranslationXdxf.cpp
+/*!
+    \file TranslationXdxf.cpp
+    \brief Implementation of xdxf plugin's translation.
+
     \author Jakub Jaszczynski <j.j.jaszczynski@gmail.com>
 */
 
-
 #include "TranslationXdxf.h"
 #include <QDebug>
 
@@ -30,6 +32,7 @@ TranslationXdxf::TranslationXdxf():_key(""),_dictionaryInfo("") {
     xdxfPlugin=0;
 }
 
+
 TranslationXdxf::TranslationXdxf(QString _key, QString _dictionaryInfo,
          XdxfPlugin *xdxfPlugin): _key(_key),_dictionaryInfo(_dictionaryInfo) {
     this->xdxfPlugin=xdxfPlugin;
@@ -38,36 +41,32 @@ TranslationXdxf::TranslationXdxf(QString _key, QString _dictionaryInfo,
     _bookmark=0;
 }
 
-TranslationXdxf::~TranslationXdxf() {
-   // qDebug()<<"\n\n delete translation:: Xdxf\n\n";
-}
 
 QString TranslationXdxf::key() const {
     return _key;
 }
 
-QString TranslationXdxf::dictionaryInfo() const {
-    return _dictionaryInfo;
-}
 
-QString TranslationXdxf::toHtml() const { 
+QString TranslationXdxf::toXml() const { 
     QString result("");
     if(!xdxfPlugin)
         return result;
-    result=result + "<dict>" + "<info";
+
+    result=result + "<dict> <info path=\"/usr/share/mdictionary/xdxf.png\" ";
     if(isBookmark())
-        result+= " bookmark=\"true\" ";
+        result+= " bookmark=\"true\" > \n";
     else
-        result+= " bookmark=\"false\" ";
+        result+= " bookmark=\"false\" > \n";
     result+= _dictionaryInfo + "</info>" + xdxfPlugin->search(_key) + "</dict>";
     return result.replace("&","&amp;");
 }
 
+
 void TranslationXdxf::setKey(QString _key) {
     this->_key=_key;
 }
 
+
 void TranslationXdxf::setDictionaryInfo(QString _dictionaryInfo) {
     this->_dictionaryInfo=_dictionaryInfo;
 }
-