mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-12 20:51:17 +00:00
remove the mobipocket generator
it has been moved to the separate mobipocket repository
This commit is contained in:
parent
fb78a4c1b8
commit
a6e1ee3f8f
|
@ -73,4 +73,3 @@ if(EPUB_FOUND)
|
|||
add_subdirectory(epub)
|
||||
endif(EPUB_FOUND)
|
||||
|
||||
add_subdirectory(mobipocket)
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
include_directories(
|
||||
${PROJECT_SOURCE_DIR}/../libs/mobipocket
|
||||
)
|
||||
|
||||
########### next target ###############
|
||||
|
||||
set(okularGenerator_mobi_PART_SRCS
|
||||
${PROJECT_SOURCE_DIR}/../libs/mobipocket/mobipocket.cpp
|
||||
${PROJECT_SOURCE_DIR}/../libs/mobipocket/decompressor.cpp
|
||||
mobidocument.cpp
|
||||
generator_mobi.cpp
|
||||
converter.cpp
|
||||
)
|
||||
|
||||
kde4_add_plugin(okularGenerator_mobi ${okularGenerator_mobi_PART_SRCS})
|
||||
|
||||
target_link_libraries(okularGenerator_mobi okularcore ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY})
|
||||
|
||||
install(TARGETS okularGenerator_mobi DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
|
||||
########### install files ###############
|
||||
|
||||
install( FILES libokularGenerator_mobi.desktop okularMobi.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
|
||||
install( PROGRAMS okularApplication_mobi.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
$XGETTEXT *.cpp -o $podir/okular_mobi.pot
|
|
@ -1,107 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "converter.h"
|
||||
|
||||
#include <QtGui/QAbstractTextDocumentLayout>
|
||||
#include <QtGui/QTextDocument>
|
||||
#include <QtGui/QTextBlock>
|
||||
#include <QtGui/QTextFrame>
|
||||
#include <QtGui/QTextDocumentFragment>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QFile>
|
||||
#include "mobipocket.h"
|
||||
|
||||
#include <klocale.h>
|
||||
#include <okular/core/action.h>
|
||||
|
||||
using namespace Mobi;
|
||||
|
||||
Converter::Converter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Converter::~Converter()
|
||||
{
|
||||
}
|
||||
|
||||
void Converter::handleMetadata(const QMap<Mobipocket::Document::MetaKey,QString> metadata)
|
||||
{
|
||||
QMapIterator<Mobipocket::Document::MetaKey,QString> it(metadata);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
switch (it.key()) {
|
||||
case Mobipocket::Document::Title: addMetaData(Okular::DocumentInfo::Title, it.value()); break;
|
||||
case Mobipocket::Document::Author: addMetaData(Okular::DocumentInfo::Author, it.value()); break;
|
||||
case Mobipocket::Document::Description: addMetaData(Okular::DocumentInfo::Description, it.value()); break;
|
||||
case Mobipocket::Document::Subject: addMetaData(Okular::DocumentInfo::Subject, it.value()); break;
|
||||
case Mobipocket::Document::Copyright: addMetaData(Okular::DocumentInfo::Copyright, it.value()); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QTextDocument* Converter::convert( const QString &fileName )
|
||||
{
|
||||
MobiDocument* newDocument=new MobiDocument(fileName);
|
||||
if (!newDocument->mobi()->isValid()) {
|
||||
emit error(i18n("Error while opening the Mobipocket document."), -1);
|
||||
delete newDocument;
|
||||
return NULL;
|
||||
}
|
||||
if (newDocument->mobi()->hasDRM()) {
|
||||
emit error(i18n("This book is protected by DRM and can be displayed only on designated device"), -1);
|
||||
delete newDocument;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
handleMetadata(newDocument->mobi()->metadata());
|
||||
newDocument->setPageSize(QSizeF(600, 800));
|
||||
|
||||
QTextFrameFormat frameFormat;
|
||||
frameFormat.setMargin( 20 );
|
||||
QTextFrame *rootFrame = newDocument->rootFrame();
|
||||
rootFrame->setFrameFormat( frameFormat );
|
||||
QMap<QString,QPair<int,int> > links;
|
||||
QMap<QString,QTextBlock> targets;
|
||||
|
||||
// go over whole document and add all <a> tags to links or targets map
|
||||
for (QTextBlock it = newDocument->begin(); it != newDocument->end(); it = it.next())
|
||||
for (QTextBlock::iterator fit=it.begin(); !fit.atEnd(); ++fit) {
|
||||
QTextFragment frag=fit.fragment();
|
||||
QTextCharFormat format=frag.charFormat();
|
||||
if (!format.isAnchor()) continue;
|
||||
//link
|
||||
if (!format.anchorHref().isEmpty()) links[format.anchorHref()]=
|
||||
QPair<int,int>(frag.position(), frag.position()+frag.length());
|
||||
if (!format.anchorNames().isEmpty()) {
|
||||
// link targets
|
||||
Q_FOREACH(const QString& name, format.anchorNames())
|
||||
targets['#'+name]=it;
|
||||
}
|
||||
}
|
||||
|
||||
// create link actions
|
||||
QMapIterator<QString,QPair<int,int> > it(links);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
QUrl u(it.key());
|
||||
// external or internal link
|
||||
if (!u.isRelative()) emit addAction(new Okular::BrowseAction(it.key()), it.value().first, it.value().second);
|
||||
else {
|
||||
// is there valid target?
|
||||
if (!targets.contains( it.key() ) || !targets[it.key()].isValid()) continue;
|
||||
emit addAction(new Okular::GotoAction(QString(), calculateViewport( newDocument, targets[it.key()] )),
|
||||
it.value().first, it.value().second);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return newDocument;
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef MOBI_CONVERTER_H
|
||||
#define MOBI_CONVERTER_H
|
||||
|
||||
#include <okular/core/textdocumentgenerator.h>
|
||||
#include <okular/core/document.h>
|
||||
|
||||
#include "mobidocument.h"
|
||||
#include "mobipocket.h"
|
||||
|
||||
|
||||
namespace Mobi {
|
||||
class Converter : public Okular::TextDocumentConverter
|
||||
{
|
||||
public:
|
||||
Converter();
|
||||
~Converter();
|
||||
|
||||
virtual QTextDocument *convert( const QString &fileName );
|
||||
private:
|
||||
void handleMetadata(const QMap<Mobipocket::Document::MetaKey, QString> metadata);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Ely Levy <elylevy@cs.huji.ac.il> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#include "generator_mobi.h"
|
||||
|
||||
#include "converter.h"
|
||||
|
||||
#include <kaboutdata.h>
|
||||
|
||||
static KAboutData createAboutData()
|
||||
{
|
||||
KAboutData aboutData(
|
||||
"okular_mobi",
|
||||
"okular_mobi",
|
||||
ki18n("Mobipocket Backend"),
|
||||
"0.1",
|
||||
ki18n("A mobipocket backend"),
|
||||
KAboutData::License_GPL,
|
||||
ki18n("© 2008-2009 Jakub Stachowski")
|
||||
);
|
||||
aboutData.addAuthor(ki18n("Jakub Stachowski"), KLocalizedString(),
|
||||
"qbast@go2.pl");
|
||||
|
||||
return aboutData;
|
||||
}
|
||||
|
||||
OKULAR_EXPORT_PLUGIN( MobiGenerator, createAboutData() )
|
||||
|
||||
MobiGenerator::MobiGenerator( QObject *parent, const QVariantList &args )
|
||||
: Okular::TextDocumentGenerator( new Mobi::Converter, parent, args )
|
||||
{
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Ely Levy <elylevy@cs.huji.ac.il> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef OKULAR_GENERATOR_MOBI_H
|
||||
#define OKULAR_GENERATOR_MOBI_H
|
||||
#include <okular/core/textdocumentgenerator.h>
|
||||
|
||||
class MobiGenerator : public Okular::TextDocumentGenerator
|
||||
{
|
||||
public:
|
||||
MobiGenerator( QObject *parent, const QVariantList &args );
|
||||
~MobiGenerator() {}
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,112 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
Name=Mobipocket document
|
||||
Name[ar]=مستند Mobipocket
|
||||
Name[ast]=Documentu Mobipocket
|
||||
Name[bg]=Документ Mobipocket
|
||||
Name[bs]=Mobipocket dokument
|
||||
Name[ca]=Document Mobipocket
|
||||
Name[ca@valencia]=Document Mobipocket
|
||||
Name[cs]=Mobipocket dokument
|
||||
Name[da]=Mobipocket-dokument
|
||||
Name[de]=Mobipocket-Dokument
|
||||
Name[el]=Έγγραφο Mobipocket
|
||||
Name[en_GB]=Mobipocket document
|
||||
Name[es]=Documento Mobipocket
|
||||
Name[et]=Mobipocketi dokument
|
||||
Name[eu]=Mobipocket dokumentua
|
||||
Name[fi]=Mobipocket-asiakirja
|
||||
Name[fr]=Document Mobipocket
|
||||
Name[ga]=Cáipéis Mobipocket
|
||||
Name[gl]=Documento Mobipocket
|
||||
Name[hr]=Dokument oblika Mobipocket
|
||||
Name[hu]=Mobipocket-dokumentum
|
||||
Name[is]=Mobipocket skjal
|
||||
Name[it]=Documento Mobipocket
|
||||
Name[ja]=Mobipocket 文書
|
||||
Name[kk]=Mobipocket құжаты
|
||||
Name[km]=ឯកសារ Mobipocket
|
||||
Name[ko]=Mobipocket 문서
|
||||
Name[lt]=Mobipocket dokumentas
|
||||
Name[lv]=Mobipocket dokuments
|
||||
Name[nb]=Mobipocket-dokument
|
||||
Name[nds]=Mobipocket-Dokment
|
||||
Name[nl]=Mobipocket-document
|
||||
Name[nn]=Mobipocket-dokument
|
||||
Name[pa]=ਮੋਬੀਪਾਕਟ ਡੌਕੂਮੈਂਟ
|
||||
Name[pl]=Dokument Mobipocket
|
||||
Name[pt]=Documento do Mobipocket
|
||||
Name[pt_BR]=Documento Mobipocket
|
||||
Name[ru]=Документ Mobipocket
|
||||
Name[sk]=Mobipocket dokument
|
||||
Name[sl]=Dokument Mobipocket
|
||||
Name[sq]=Dokument Mobipocket
|
||||
Name[sr]=Мобипокет
|
||||
Name[sr@ijekavian]=Мобипокет
|
||||
Name[sr@ijekavianlatin]=Mobipocket
|
||||
Name[sr@latin]=Mobipocket
|
||||
Name[sv]=Mobipocket-dokument
|
||||
Name[th]=เอกสาร Mobipocket
|
||||
Name[tr]=Mobipocket belgesi
|
||||
Name[uk]=Документ Mobipocket
|
||||
Name[x-test]=xxMobipocket documentxx
|
||||
Name[zh_CN]=Mobipocket 文档
|
||||
Name[zh_TW]=Mobipocket 文件
|
||||
Comment=Mobipocket backend for Okular
|
||||
Comment[ar]=خلفية Mobipocket لأوكلار
|
||||
Comment[ast]=Motor Mobipocket pa Okular
|
||||
Comment[bg]=Ядро на Okular за Mobipocket
|
||||
Comment[bs]=Pozadina Mobipocketa za Okular
|
||||
Comment[ca]=Dorsal de Mobipocket per a l'Okular
|
||||
Comment[ca@valencia]=Dorsal de Mobipocket per a l'Okular
|
||||
Comment[cs]= Implementace Mobipocket pro Okular
|
||||
Comment[da]=Mobipocket-motor til Okular
|
||||
Comment[de]=Ein Anzeigemodul für Mobipocket-Dateien in Okular
|
||||
Comment[el]=Σύστημα υποστήριξης Mobipocket για το Okular
|
||||
Comment[en_GB]=Mobipocket backend for Okular
|
||||
Comment[es]=Motor Mobipocket para Okular
|
||||
Comment[et]=Okulari Mobipocketi taustaprogramm
|
||||
Comment[eu]=Okular-en Mobipocket motorra
|
||||
Comment[fi]=Mobipocket-taustaosa Okular-lukijalle
|
||||
Comment[fr]=Interface d'Okular pour le format Mobipocket
|
||||
Comment[ga]=Inneall Mobipocket le haghaidh Okular
|
||||
Comment[gl]=Infraestrutura de Mobipocket para Okular
|
||||
Comment[hr]=Podrška za Mobipocket za Okular
|
||||
Comment[hu]=Mobipocket-bővítmény az Okularhoz
|
||||
Comment[is]=Mobipocket stuðningur fyrir Okular
|
||||
Comment[it]=Backend Mobipocket per Okular
|
||||
Comment[ja]=Okular の Mobipocket 用バックエンド
|
||||
Comment[kk]=Okular-дың Mobipocket тетігі
|
||||
Comment[km]=កម្មវិធីខាងក្រោយសម្រាប់ Mobipocket សម្រាប់ Okular
|
||||
Comment[ko]=Okular의 Mobipocket 백엔드
|
||||
Comment[lt]=Mobipocket programinė sąsaja, skirta Okular
|
||||
Comment[lv]=Mobipocket Okular aizmugure
|
||||
Comment[nb]=Mobipocket-motor for okular
|
||||
Comment[nds]=Mobipocket-Hülppropgramm för Okular
|
||||
Comment[nl]=Mobipocket-backend voor Okular
|
||||
Comment[nn]=Mobipocket-motor for Okular
|
||||
Comment[pa]=ਓਕੁਲਾਰ ਲਈ ਮੋਬੀਪਾਕਟ ਬੈਕਐਂਡ
|
||||
Comment[pl]=Obsługa formatu Mobipocket dla Okulara
|
||||
Comment[pt]=Infra-estrutura do Mobipocket para o Okular
|
||||
Comment[pt_BR]=Infraestrutura Mobipocket para o Okular
|
||||
Comment[ru]=Модуль поддержки формата Mobipocket для Okular
|
||||
Comment[sk]=Backend Mobipocket pre Okular
|
||||
Comment[sl]=Hrbtenica za Mobipocket Okular
|
||||
Comment[sq]=Mbështetje Mobipocket për Okular
|
||||
Comment[sr]=Позадина Мобипокета за Окулар
|
||||
Comment[sr@ijekavian]=Позадина Мобипокета за Окулар
|
||||
Comment[sr@ijekavianlatin]=Pozadina Mobipocketa za Okular
|
||||
Comment[sr@latin]=Pozadina Mobipocketa za Okular
|
||||
Comment[sv]=Mobipocket-gränssnitt för Okular
|
||||
Comment[th]=แบ็กเอนด์แฟ้มแบบ Mobipocket สำหรับโอกูลาร์
|
||||
Comment[tr]=Okular için Mobipocket arka ucu
|
||||
Comment[uk]=Сервер Mobipocket для Okular
|
||||
Comment[x-test]=xxMobipocket backend for Okularxx
|
||||
Comment[zh_CN]=Okular 的 Mobipocket 格式后端
|
||||
Comment[zh_TW]=Okular 的 Mobipocket 後端介面
|
||||
X-KDE-ServiceTypes=okular/Generator
|
||||
MimeType=application/x-mobipocket-ebook;
|
||||
X-KDE-Library=okularGenerator_mobi
|
||||
X-KDE-Priority=1
|
||||
X-KDE-okularAPIVersion=1
|
||||
X-KDE-okularHasInternalSettings=false
|
|
@ -1,107 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#include "mobidocument.h"
|
||||
#include "mobipocket.h"
|
||||
#include "qfilestream.h"
|
||||
#include <QtGui/QColor>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QRegExp>
|
||||
#include <kdebug.h>
|
||||
|
||||
using namespace Mobi;
|
||||
|
||||
MobiDocument::MobiDocument(const QString &fileName) : QTextDocument()
|
||||
{
|
||||
file = new Mobipocket::QFileStream(fileName);
|
||||
doc = new Mobipocket::Document(file);
|
||||
if (doc->isValid()) {
|
||||
QString text=doc->text();
|
||||
QString header=text.left(1024);
|
||||
if (header.contains("<html>") || header.contains("<HTML>")) setHtml(fixMobiMarkup(text));
|
||||
else setPlainText(text);
|
||||
}
|
||||
}
|
||||
|
||||
MobiDocument::~MobiDocument()
|
||||
{
|
||||
delete doc;
|
||||
delete file;
|
||||
}
|
||||
|
||||
QVariant MobiDocument::loadResource(int type, const QUrl &name)
|
||||
{
|
||||
if (type!=QTextDocument::ImageResource || name.scheme()!=QString("pdbrec")) return QVariant();
|
||||
bool ok;
|
||||
quint16 recnum=name.path().mid(1).toUShort(&ok);
|
||||
if (!ok || recnum>=doc->imageCount()) return QVariant();
|
||||
|
||||
QVariant resource;
|
||||
resource.setValue(doc->getImage(recnum-1));
|
||||
addResource(type, name, resource);
|
||||
|
||||
return resource;
|
||||
}
|
||||
|
||||
// starting from 'pos', find position in the string that is not inside a tag
|
||||
int outsideTag(const QString& data, int pos)
|
||||
{
|
||||
for (int i=pos-1;i>=0;i--) {
|
||||
if (data[i]=='>') return pos;
|
||||
if (data[i]=='<') return i;
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
QString MobiDocument::fixMobiMarkup(const QString& data)
|
||||
{
|
||||
QString ret=data;
|
||||
QMap<int,QString> anchorPositions;
|
||||
static QRegExp anchors("<a(?: href=\"[^\"]*\"){0,1}[\\s]+filepos=['\"]{0,1}([\\d]+)[\"']{0,1}", Qt::CaseInsensitive);
|
||||
int pos=0;
|
||||
|
||||
// find all link destinations
|
||||
while ( (pos=anchors.indexIn( data, pos ))!=-1) {
|
||||
int filepos=anchors.cap( 1 ).toUInt( );
|
||||
if (filepos) anchorPositions[filepos]=anchors.cap(1);
|
||||
pos+=anchors.matchedLength();
|
||||
}
|
||||
|
||||
// put HTML anchors in all link destinations
|
||||
int offset=0;
|
||||
QMapIterator<int,QString> it(anchorPositions);
|
||||
while (it.hasNext()) {
|
||||
it.next();
|
||||
// link pointing outside the document, ignore
|
||||
if ( (it.key()+offset) >= ret.size()) continue;
|
||||
int fixedpos=outsideTag(ret, it.key()+offset);
|
||||
ret.insert(fixedpos,QString("<a name=\"")+it.value()+QString("\"> </a>"));
|
||||
// inserting anchor shifts all offsets after the anchor
|
||||
offset+=21+it.value().size();
|
||||
}
|
||||
|
||||
// replace links referencing filepos with normal internal links
|
||||
ret.replace(anchors,"<a href=\"#\\1\"");
|
||||
// Mobipocket uses strange variang of IMG tags: <img recindex="3232"> where recindex is number of
|
||||
// record containing image
|
||||
static QRegExp imgs("<img.*recindex=\"([\\d]*)\".*>", Qt::CaseInsensitive);
|
||||
|
||||
imgs.setMinimal(true);
|
||||
ret.replace(imgs,"<img src=\"pdbrec:/\\1\">");
|
||||
ret.replace("<mbp:pagebreak/>","<p style=\"page-break-after:always\"></p>");
|
||||
|
||||
static QRegExp rgb(" color=\"rgb\\((\\d+),(\\d+),(\\d+)\\)\"", Qt::CaseSensitive);
|
||||
pos = 0;
|
||||
while ((pos = rgb.indexIn(ret, pos)) != -1) {
|
||||
const QString qtColor = QColor(rgb.cap(1).toInt(), rgb.cap(2).toInt(), rgb.cap(3).toInt()).name();
|
||||
const QString newColorString = QString(" color=\"%1\"").arg(qtColor);
|
||||
ret.replace(pos, rgb.matchedLength(), newColorString);
|
||||
pos += newColorString.length() - rgb.matchedLength();
|
||||
}
|
||||
return ret;
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by Jakub Stachowski <qbast@go2.pl> *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef MOBI_DOCUMENT_H
|
||||
#define MOBI_DOCUMENT_H
|
||||
|
||||
#include <QTextDocument>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
|
||||
class QFile;
|
||||
namespace Mobipocket {
|
||||
class Document;
|
||||
class QFileStream;
|
||||
}
|
||||
|
||||
namespace Mobi {
|
||||
|
||||
class MobiDocument : public QTextDocument {
|
||||
|
||||
public:
|
||||
MobiDocument(const QString &fileName);
|
||||
~MobiDocument();
|
||||
|
||||
Mobipocket::Document* mobi() const { return doc; }
|
||||
|
||||
protected:
|
||||
virtual QVariant loadResource(int type, const QUrl &name);
|
||||
|
||||
private:
|
||||
QString fixMobiMarkup(const QString& data);
|
||||
Mobipocket::Document *doc;
|
||||
Mobipocket::QFileStream* file;
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
|
@ -1,128 +0,0 @@
|
|||
[Desktop Entry]
|
||||
MimeType=application/x-mobipocket-ebook;
|
||||
Terminal=false
|
||||
Name=Okular
|
||||
Name[ar]=اوكلار
|
||||
Name[ast]=Okular
|
||||
Name[bg]=Okular
|
||||
Name[bs]=Okular
|
||||
Name[ca]=Okular
|
||||
Name[ca@valencia]=Okular
|
||||
Name[cs]=Okular
|
||||
Name[da]=Okular
|
||||
Name[de]=Okular
|
||||
Name[el]=Okular
|
||||
Name[en_GB]=Okular
|
||||
Name[eo]=Okular
|
||||
Name[es]=Okular
|
||||
Name[et]=Okular
|
||||
Name[eu]=Okular
|
||||
Name[fi]=Okular
|
||||
Name[fr]=Okular
|
||||
Name[ga]=Okular
|
||||
Name[gl]=Okular
|
||||
Name[hne]=ओकुलर
|
||||
Name[hr]=Okular
|
||||
Name[hu]=Okular
|
||||
Name[is]=Okular
|
||||
Name[it]=Okular
|
||||
Name[ja]=Okular
|
||||
Name[kk]=Okular
|
||||
Name[km]=Okular
|
||||
Name[ko]=Okular
|
||||
Name[ku]=Okular
|
||||
Name[lt]=Okular
|
||||
Name[lv]=Okular
|
||||
Name[nb]=Okular
|
||||
Name[nds]=Okular
|
||||
Name[nl]=Okular
|
||||
Name[nn]=Okular
|
||||
Name[pa]=ਓਕੁਲਾਰ
|
||||
Name[pl]=Okular
|
||||
Name[pt]=Okular
|
||||
Name[pt_BR]=Okular
|
||||
Name[ro]=Okular
|
||||
Name[ru]=Okular
|
||||
Name[si]=Okular
|
||||
Name[sk]=Okular
|
||||
Name[sl]=Okular
|
||||
Name[sq]=Okular
|
||||
Name[sr]=Окулар
|
||||
Name[sr@ijekavian]=Окулар
|
||||
Name[sr@ijekavianlatin]=Okular
|
||||
Name[sr@latin]=Okular
|
||||
Name[sv]=Okular
|
||||
Name[th]=โอกูลาร์
|
||||
Name[tr]=Okular
|
||||
Name[uk]=Okular
|
||||
Name[x-test]=xxOkularxx
|
||||
Name[zh_CN]=Okular
|
||||
Name[zh_TW]=文件檢視_Okular
|
||||
GenericName=Document Viewer
|
||||
GenericName[ar]=عارض المستندات
|
||||
GenericName[ast]=Visor de documentos
|
||||
GenericName[bg]=Преглед на доументи
|
||||
GenericName[bs]=Prikazivač dokumenata
|
||||
GenericName[ca]=Visualitzador de documents
|
||||
GenericName[ca@valencia]=Visualitzador de documents
|
||||
GenericName[cs]=Prohlížeč dokumentů
|
||||
GenericName[da]=Dokumentfremviser
|
||||
GenericName[de]=Dokumentenbetrachter
|
||||
GenericName[el]=Προβολέας εγγράφων
|
||||
GenericName[en_GB]=Document Viewer
|
||||
GenericName[eo]=Dokumenta rigardilo
|
||||
GenericName[es]=Visor de documentos
|
||||
GenericName[et]=Dokumendinäitaja
|
||||
GenericName[eu]=Dokumentu ikustailea
|
||||
GenericName[fa]=مشاهدهگر سند
|
||||
GenericName[fi]=Asiakirjan näyttöohjelma
|
||||
GenericName[fr]=Visionneuse de document
|
||||
GenericName[ga]=Amharcán Cáipéisí
|
||||
GenericName[gl]=Visor de documentos
|
||||
GenericName[hi]=दस्तावेज़ प्रदर्शक
|
||||
GenericName[hne]=कागद प्रदर्सक
|
||||
GenericName[hr]=Preglednik dokumenata
|
||||
GenericName[hu]=Dokumentumnézegető
|
||||
GenericName[is]=Skjalaskoðari
|
||||
GenericName[it]=Visore di documenti
|
||||
GenericName[ja]=文書ビューア
|
||||
GenericName[kk]=Құжатты қарау құралы
|
||||
GenericName[km]=កម្មវិធីមើលឯកសារ
|
||||
GenericName[ko]=문서 뷰어
|
||||
GenericName[ku]=Nîşanderê Belgeyan
|
||||
GenericName[lt]=Dokumentų žiūryklė
|
||||
GenericName[lv]=Dokumentu skatītājs
|
||||
GenericName[nb]=Dokumentviser
|
||||
GenericName[nds]=Dokmentkieker
|
||||
GenericName[ne]=कागजात दर्शक
|
||||
GenericName[nl]=Documentenviewer
|
||||
GenericName[nn]=Dokumentvisar
|
||||
GenericName[oc]=Visualizaire de documents
|
||||
GenericName[pa]=ਡੌਕੂਮੈਂਟ ਦਰਸ਼ਕ
|
||||
GenericName[pl]=Przeglądarka dokumentów
|
||||
GenericName[pt]=Visualizador de Documentos
|
||||
GenericName[pt_BR]=Visualizador de documentos
|
||||
GenericName[ro]=Vizualizor de documente
|
||||
GenericName[ru]=Просмотр документов
|
||||
GenericName[sk]=Prehliadač dokumentov
|
||||
GenericName[sl]=Pregledovalnik dokumentov
|
||||
GenericName[sq]=Shikues dokumentesh
|
||||
GenericName[sr]=Приказивач докумената
|
||||
GenericName[sr@ijekavian]=Приказивач докумената
|
||||
GenericName[sr@ijekavianlatin]=Prikazivač dokumenata
|
||||
GenericName[sr@latin]=Prikazivač dokumenata
|
||||
GenericName[sv]=Dokumentvisare
|
||||
GenericName[th]=เครื่องมือแสดงเอกสาร
|
||||
GenericName[tr]=Belge Gösterici
|
||||
GenericName[ug]=پۈتۈك كۆرگۈچ
|
||||
GenericName[uk]=Переглядач документів
|
||||
GenericName[x-test]=xxDocument Viewerxx
|
||||
GenericName[zh_CN]=文档查看器
|
||||
GenericName[zh_TW]=文件檢視器
|
||||
Exec=okular %U %i -caption "%c"
|
||||
Icon=okular
|
||||
Type=Application
|
||||
InitialPreference=1
|
||||
Categories=Qt;KDE;Graphics;Viewer;
|
||||
NoDisplay=true
|
||||
X-KDE-Keywords=mobipocket
|
|
@ -1,63 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Icon=okular
|
||||
Name=Okular
|
||||
Name[ar]=اوكلار
|
||||
Name[ast]=Okular
|
||||
Name[bg]=Okular
|
||||
Name[bs]=Okular
|
||||
Name[ca]=Okular
|
||||
Name[ca@valencia]=Okular
|
||||
Name[cs]=Okular
|
||||
Name[da]=Okular
|
||||
Name[de]=Okular
|
||||
Name[el]=Okular
|
||||
Name[en_GB]=Okular
|
||||
Name[eo]=Okular
|
||||
Name[es]=Okular
|
||||
Name[et]=Okular
|
||||
Name[eu]=Okular
|
||||
Name[fi]=Okular
|
||||
Name[fr]=Okular
|
||||
Name[ga]=Okular
|
||||
Name[gl]=Okular
|
||||
Name[hne]=ओकुलर
|
||||
Name[hr]=Okular
|
||||
Name[hu]=Okular
|
||||
Name[is]=Okular
|
||||
Name[it]=Okular
|
||||
Name[ja]=Okular
|
||||
Name[kk]=Okular
|
||||
Name[km]=Okular
|
||||
Name[ko]=Okular
|
||||
Name[ku]=Okular
|
||||
Name[lt]=Okular
|
||||
Name[lv]=Okular
|
||||
Name[nb]=Okular
|
||||
Name[nds]=Okular
|
||||
Name[nl]=Okular
|
||||
Name[nn]=Okular
|
||||
Name[pa]=ਓਕੁਲਾਰ
|
||||
Name[pl]=Okular
|
||||
Name[pt]=Okular
|
||||
Name[pt_BR]=Okular
|
||||
Name[ro]=Okular
|
||||
Name[ru]=Okular
|
||||
Name[si]=Okular
|
||||
Name[sk]=Okular
|
||||
Name[sl]=Okular
|
||||
Name[sq]=Okular
|
||||
Name[sr]=Окулар
|
||||
Name[sr@ijekavian]=Окулар
|
||||
Name[sr@ijekavianlatin]=Okular
|
||||
Name[sr@latin]=Okular
|
||||
Name[sv]=Okular
|
||||
Name[th]=โอกูลาร์
|
||||
Name[tr]=Okular
|
||||
Name[uk]=Okular
|
||||
Name[x-test]=xxOkularxx
|
||||
Name[zh_CN]=Okular
|
||||
Name[zh_TW]=文件檢視_Okular
|
||||
X-KDE-ServiceTypes=KParts/ReadOnlyPart
|
||||
X-KDE-Library=okularpart
|
||||
Type=Service
|
||||
MimeType=application/x-mobipocket-ebook;
|
Loading…
Reference in a new issue