_dictionaryInfo = base._dictionaryInfo;
lengths = base.lengths;
offsets = base.offsets;
+ starDictPlugin = base.starDictPlugin;
}
}
QString TranslationStarDict::toXml() const {
+ qDebug() << "asdf" << _dictionaryInfo;
QString result("");
if(!starDictPlugin)
return result;
-
- result=result + "<dict> <info path=\"/usr/share/mdictionary/xdxf.png\" ";
- if(isBookmark())
- result+= " bookmark=\"true\" > \n";
- else
- result+= " bookmark=\"false\" > \n";
- result+= _dictionaryInfo + "</info>" + starDictPlugin->search(_key) + "</dict>";
- return result.replace("&","&");
+ qDebug() << "asdf";
+ for(int i = 0; i < offsets.size(); i++) {
+ result=result + "<dict> <info path=\"/usr/share/mdictionary/xdxf.png\" ";
+ if(isBookmark())
+ result+= " bookmark=\"true\" > \n";
+ else
+ result+= " bookmark=\"false\" > \n";
+ qDebug() << "!!asdf";
+ result+= _dictionaryInfo + "</info>" +
+ starDictPlugin->search(_key, offsets.at(i), lengths.at(i))
+ + "</dict>";
+ qDebug() << "!!!!asdf";
+ }
+ return result.replace("&","&");
}
void TranslationStarDict::setKey(QString _key) {