Commit 2f9246ae authored by Alex Richardson's avatar Alex Richardson

Port to new JSON plugin loading system

This means Okular can now work without ksycoca and KDELibs4Support.

REVIEW: 126193
parent 71950016
......@@ -205,10 +205,12 @@ PRIVATE
KF5::Archive
KF5::JS
KF5::JSApi
KF5::KDELibs4Support
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
KF5::ThreadWeaver
KF5::Wallet
KF5::Bookmarks
Phonon::phonon4qt5
${MATH_LIB}
${ZLIB_LIBRARIES}
......
This diff is collapsed.
......@@ -28,7 +28,7 @@
class QPrintDialog;
class KBookmark;
class KConfigDialog;
class KComponentData;
class KPluginMetaData;
class KXMLGUIClient;
class DocumentItem;
class QAbstractItemModel;
......@@ -719,9 +719,9 @@ class OKULARCORE_EXPORT Document : public QObject
QStringList supportedMimeTypes() const;
/**
* Returns the component data associated with the generator. May be null.
* Returns the metadata associated with the generator. May be invalid.
*/
const KComponentData* componentData() const;
KPluginMetaData generatorInfo() const;
/**
* Saving capabilities. Their availability varies according to the
......
......@@ -22,9 +22,7 @@
#include <QtCore/QMutex>
#include <QtCore/QPointer>
#include <QUrl>
#include <kcomponentdata.h>
#include <kservicetypetrader.h>
#include <KPluginMetaData>
// local includes
#include "fontinfo.h"
......@@ -35,6 +33,7 @@ class QEventLoop;
class QFile;
class QTimer;
class QTemporaryFile;
class KPluginMetaData;
struct AllocatedPixmap;
struct ArchiveData;
......@@ -50,14 +49,13 @@ class View;
struct GeneratorInfo
{
GeneratorInfo( const KComponentData &_data )
: generator( 0 ), data( _data ),
config( 0 ), save( 0 ),
explicit GeneratorInfo( Okular::Generator *g, const KPluginMetaData &data)
: generator( g ), metadata( data ), config( nullptr ), save( nullptr ),
configChecked( false ), saveChecked( false )
{}
Okular::Generator * generator;
KComponentData data;
KPluginMetaData metadata;
Okular::ConfigInterface * config;
Okular::SaveInterface * save;
bool configChecked : 1;
......@@ -123,15 +121,15 @@ class DocumentPrivate
void saveViewsInfo( View *view, QDomElement &e ) const;
QString giveAbsolutePath( const QString & fileName ) const;
bool openRelativeFile( const QString & fileName );
Generator * loadGeneratorLibrary( const KService::Ptr &service );
Generator * loadGeneratorLibrary( const KPluginMetaData& service );
void loadAllGeneratorLibraries();
void loadServiceList( const KService::List& offers );
void loadServiceList( const QVector<KPluginMetaData>& offers );
void unloadGenerator( const GeneratorInfo& info );
void cacheExportFormats();
void setRotationInternal( int r, bool notify );
ConfigInterface* generatorConfig( GeneratorInfo& info );
SaveInterface* generatorSave( GeneratorInfo& info );
Document::OpenResult openDocumentInternal( const KService::Ptr& offer, bool isstdin, const QString& docFile, const QByteArray& filedata, const QString& password );
Document::OpenResult openDocumentInternal( const KPluginMetaData& offer, bool isstdin, const QString& docFile, const QByteArray& filedata, const QString& password );
bool savePageDocumentInfo( QTemporaryFile *infoFile, int what ) const;
DocumentViewport nextDocumentViewport() const;
void notifyAnnotationChanges( int page );
......@@ -280,6 +278,11 @@ class DocumentPrivate
QDomNode m_prevPropsOfAnnotBeingModified;
synctex_scanner_t m_synctex_scanner;
// generator selection
static QVector<KPluginMetaData> availableGenerators();
static QVector<KPluginMetaData> configurableGenerators();
static KPluginMetaData generatorForMimeType(const QMimeType& type, QWidget* widget);
};
class DocumentInfoPrivate
......
......@@ -29,9 +29,9 @@
#include <QMimeType>
#include <kpluginfactory.h>
#define OKULAR_EXPORT_PLUGIN( classname, aboutdata ) \
K_PLUGIN_FACTORY( classname ## Factory, registerPlugin< classname >(); ) \
K_EXPORT_PLUGIN( classname ## Factory( aboutdata ) )
#define OKULAR_EXPORT_PLUGIN(classname, json ) \
static_assert(json[0] != '\0', "arg2 must be a string literal"); \
K_PLUGIN_FACTORY_WITH_JSON(classname ## Factory, json, registerPlugin<classname >();)
class QByteArray;
class QMutex;
......
set(LIBSPECTRE_MINIMUM_VERSION "0.2")
function(okular_add_generator _target)
kcoreaddons_add_plugin(${_target}
JSON "lib${_target}.json"
INSTALL_NAMESPACE "okular/generators"
SOURCES ${ARGN}
)
endfunction()
find_package(Poppler "0.12.1")
set_package_properties("Poppler-Qt5" PROPERTIES
......@@ -7,6 +14,7 @@ set_package_properties("Poppler-Qt5" PROPERTIES
TYPE RECOMMENDED
PURPOSE "Support for PDF files in okular.")
set(LIBSPECTRE_MINIMUM_VERSION "0.2")
find_package(LibSpectre "${LIBSPECTRE_MINIMUM_VERSION}")
set_package_properties("libspectre" PROPERTIES
DESCRIPTION "A PostScript rendering library"
......@@ -89,7 +97,7 @@ endif(LIBSPECTRE_FOUND)
if(KF5KExiv2_FOUND)
add_subdirectory( kimgio )
endif(KF5KExiv2_FOUND)
endif()
if(CHM_FOUND)
add_subdirectory( chm )
......
......@@ -19,15 +19,10 @@ set(okularGenerator_chmlib_SRCS
generator_chm.cpp
)
add_library(okularGenerator_chmlib MODULE ${okularGenerator_chmlib_SRCS})
okular_add_generator(okularGenerator_chmlib ${okularGenerator_chmlib_SRCS})
target_link_libraries(okularGenerator_chmlib okularcore ${CHM_LIBRARY} KF5::KHtml)
install(TARGETS okularGenerator_chmlib DESTINATION ${KDE_INSTALL_PLUGINDIR})
########### install files ###############
install( FILES libokularGenerator_chmlib.desktop okularChm.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install( PROGRAMS okularApplication_chm.desktop org.kde.mobile.okular_chm.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
......@@ -29,22 +29,7 @@
#include <core/textpage.h>
#include <core/utils.h>
static KAboutData createAboutData()
{
KAboutData aboutData(
QStringLiteral("okular_chm"),
i18n( "CHM Backend" ),
QStringLiteral("0.1.4"),
i18n( "A Microsoft Windows help file renderer" ),
KAboutLicense::GPL,
i18n( "© 2005-2007 Piotr Szymański\n© 2008 Albert Astals Cid" )
);
aboutData.addAuthor( i18n( "Piotr Szymański" ), QString(), QStringLiteral("niedakh@gmail.com") );
aboutData.addAuthor( i18n( "Albert Astals Cid" ), QString(), QStringLiteral("aacid@kde.org") );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( CHMGenerator, createAboutData() )
OKULAR_EXPORT_PLUGIN(CHMGenerator, "libokularGenerator_chmlib.json")
static QString absolutePath( const QString &baseUrl, const QString &path )
{
......
[Desktop Entry]
Type=Service
Name=chmlib
Name[ar]=chmlib
Name[ast]=chmlib
Name[bg]=chmlib
Name[bs]=chmlib
Name[ca]=chmlib
Name[ca@valencia]=chmlib
Name[cs]=chmlib
Name[da]=chmlib
Name[de]=chmlib
Name[el]=chmlib
Name[en_GB]=chmlib
Name[eo]=chmlib
Name[es]=chmlib
Name[et]=chmlib
Name[eu]=chmlib
Name[fi]=chmlib
Name[fr]=chmlib
Name[ga]=chmlib
Name[gl]=chmlib
Name[hi]=सीएचएमलिब
Name[hne]=सीएचएमलिब
Name[hr]=chmlib
Name[hu]=chmlib
Name[ia]=chmlib
Name[is]=chmlib
Name[it]=chmlib
Name[ja]=chmlib
Name[kk]=chmlib
Name[km]=chmlib
Name[ko]=chmlib
Name[ku]=chmlib
Name[lt]=chmlib
Name[lv]=chmlib
Name[mr]=chmlib
Name[nb]=chmlib
Name[nds]=chmlib
Name[ne]=chmlib
Name[nl]=chmlib
Name[nn]=chmlib
Name[pa]=chmlib
Name[pl]=chmlib
Name[pt]=chmlib
Name[pt_BR]=chmlib
Name[ro]=chmlib
Name[ru]=chmlib
Name[sk]=chmlib
Name[sl]=chmlib
Name[sq]=chmlib
Name[sr]=винхелп
Name[sr@ijekavian]=винхелп
Name[sr@ijekavianlatin]=WinHelp
Name[sr@latin]=WinHelp
Name[sv]=chmlib
Name[th]=ไลบรารี chmlib
Name[tr]=chmlib
Name[ug]=chmlib
Name[uk]=chmlib
Name[vi]=chmlib
Name[x-test]=xxchmlibxx
Name[zh_CN]=chmlib
Name[zh_TW]=chmlib
Comment=Windows HTMLHelp backend for Okular
Comment[ar]=المنتهى الخلفي Windows HTMLHelp لأوكلار
Comment[ast]=Motor de ficheros d'ayuda en HTML de Windows pa Okular
Comment[bg]=Ядро на Okular за помощни файлове на Windows
Comment[bs]=Pozadina WinHelp prozora za Okular
Comment[ca]=Dorsal del HTMLHelp de Windows per a l'Okular
Comment[ca@valencia]=Dorsal del HTMLHelp de Windows per a l'Okular
Comment[cs]=Implementace HTML nápovědy Windows pro Okular
Comment[da]=Windows HTML Help-motor til Okular
Comment[de]=Anzeigemodul für Windows-Hilfe-Dateien in Okular
Comment[el]=Σύστημα υποστήριξης βοήθειας Windows σε HTML για το Okular
Comment[en_GB]=Windows HTMLHelp backend for Okular
Comment[es]=Motor de archivos de ayuda en HTML de Windows para Okular
Comment[et]=Okulari Windowsi HTMLHelp-failide taustaprogramm
Comment[eu]=Okular-en Windows HTMLHelp motorra
Comment[fi]=Windows HTMLHelp -taustaosa Okularille
Comment[fr]=Moteur « HTMLHelp » de fichiers Windows pour Okular
Comment[ga]=Inneall HTMLHelp Windows le haghaidh Okular
Comment[gl]=Infraestrutura de ficheiros Windows HTMLHelp para Okular
Comment[hne]=ओकुलर बर विंडोज एचटीएमएलहेल्प बैकएन्ड
Comment[hr]=Podrška za Windows HTMLHelp za Okular
Comment[hu]=Windows HTML-súgókezelő az Okularhoz
Comment[ia]=Retroadministration de Windows HTMLHelp pro Okular
Comment[is]=Windows HTMLHelp stuðningur fyrir Okular
Comment[it]=Backend guida di Windows in HTML per Okular
Comment[ja]=Okular の Windows HTML ヘルプ用バックエンド
Comment[kk]=Okular-дың Windows HTMLHelp тетігі
Comment[km]=ផ្នែក​ខាង​ក្រោយ​ HTMLHelp របស់​វីនដូ​សម្រាប់ Okular
Comment[ko]=Okular의 Windows HTMLHelp 백엔드
Comment[ku]=Binesazî ya Windows HTMLHelp ji bo Okular
Comment[lt]=Windows HTML pagalbos failų programinė sąsaja, skirta Okular
Comment[lv]=Windows HTMLHelp Okular aizmugure
Comment[mr]=ओक्युलर करिता विंडोज HTMLHelp बॅकएन्ड
Comment[nb]=Windows HTMLHelp-motor for Okular
Comment[nds]=En Okular-Hülpprogramm för HTML-Hülpdateien vun Windows
Comment[nl]=Windows HTMLHelp-backend voor Okular
Comment[nn]=Windows HTMLHelp-motor for Okular
Comment[pa]=ਓਕੁਲਾਰ ਲਈ ਵਿੰਡੋਜ਼ HTMLHelp ਬੈਕਐਂਡ
Comment[pl]=Obsługa Windows HTMLHelp dla Okulara
Comment[pt]=Infra-estrutura de HTMLHelp do Windows para o Okular
Comment[pt_BR]=Infraestrutura do Windows HTMLHelp para o Okular
Comment[ro]=Platformă HTMLHelp din Windows pentru Okular
Comment[ru]=Модуль поддержки формата Windows HTMLHelp для Okular
Comment[sk]=Backend Windows HTMLHelp pre Okular
Comment[sl]=Zaledje za pomoč za Windows v obliki HTML za Okular
Comment[sq]=Një mbështetës për Windows HTMLHelp për Okular
Comment[sr]=Позадина винхелпа за Окулар
Comment[sr@ijekavian]=Позадина винхелпа за Окулар
Comment[sr@ijekavianlatin]=Pozadina WinHelpa za Okular
Comment[sr@latin]=Pozadina WinHelpa za Okular
Comment[sv]=Windows HTMLHelp-gränssnitt för Okular
Comment[th]=แบ็กเอนด์แฟ้มช่วยเหลือแบบ HTML ของวินโดวส์ สำหรับ Okular
Comment[tr]=Okular için Windows HTMLHelp arka ucu
Comment[uk]=Додаток Windows HTMLHelp для okular
Comment[x-test]=xxWindows HTMLHelp backend for Okularxx
Comment[zh_CN]=Okular 的 Windows HTMLHelp 格式后端
Comment[zh_TW]=Okular 的 Windows HTMLHelp 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-chm;
X-KDE-Library=okularGenerator_chmlib
X-KDE-Priority=2
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
{
"KPlugin": {
"Authors": [
{
"Email": "niedakh@gmail.com",
"Name": "Piotr Szymański"
},
{
"Email": "aacid@kde.org",
"Name": "Albert Astals Cid"
}
],
"Description": "A Microsoft Windows help file renderer",
"License": "GPL",
"MimeTypes": [
"application/x-chm"
],
"Name": "CHM Backend",
"Id": "okular_chm",
"ServiceTypes": [
"okular/Generator"
],
"Version": "0.1.4"
},
"X-KDE-Priority": 2,
"X-KDE-okularAPIVersion": 1,
"X-KDE-okularHasInternalSettings": false
}
[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[ia]=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[mr]=ओक्युलर
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[ug]=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-chm;
......@@ -14,19 +14,14 @@ set( okularGenerator_comicbook_PART_SRCS
)
add_library(okularGenerator_comicbook MODULE ${okularGenerator_comicbook_PART_SRCS})
target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore KF5::I18n KF5::Archive KF5::KDELibs4Support)
okular_add_generator(okularGenerator_comicbook ${okularGenerator_comicbook_PART_SRCS})
target_link_libraries(okularGenerator_comicbook okularcore KF5::KIOCore KF5::I18n KF5::Archive KF5::KDELibs4Support)
if (UNIX)
find_package(KF5 REQUIRED Pty)
target_link_libraries(okularGenerator_comicbook KF5::Pty)
endif (UNIX)
install(TARGETS okularGenerator_comicbook DESTINATION ${KDE_INSTALL_PLUGINDIR})
########### install files ###############
install( FILES libokularGenerator_comicbook.desktop okularComicbook.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install( PROGRAMS okularApplication_comicbook.desktop org.kde.mobile.okular_comicbook.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
......@@ -21,22 +21,7 @@
#include "debug_comicbook.h"
static KAboutData createAboutData()
{
KAboutData aboutData(
QStringLiteral("okular_comicbook"),
i18n( "ComicBook Backend" ),
QStringLiteral("0.4"),
i18n( "A renderer for various comic book formats" ),
KAboutLicense::GPL,
i18n( "© 2007-2008 Tobias Koenig" )
);
aboutData.addAuthor( QStringLiteral("Tobias Koenig" ), QString(), QStringLiteral("tokoe@kde.org") );
return aboutData;
}
OKULAR_EXPORT_PLUGIN( ComicBookGenerator, createAboutData() )
OKULAR_EXPORT_PLUGIN(ComicBookGenerator, "libokularGenerator_comicbook.json")
ComicBookGenerator::ComicBookGenerator( QObject *parent, const QVariantList &args )
: Generator( parent, args )
......
[Desktop Entry]
Type=Service
Name=Comic Book
Name[ar]=كوميك بوك
Name[ast]=Comic Book
Name[bg]=Комикс
Name[bs]=Strip
Name[ca]=Comic Book
Name[ca@valencia]=Comic Book
Name[cs]=Kniha komiksů
Name[da]=Comic Book
Name[de]=Comic-Book
Name[el]=Βιβλίο κόμικ
Name[en_GB]=Comic Book
Name[eo]=ComicBook
Name[es]=Comic Book
Name[et]=Koomiks
Name[eu]=Komikia
Name[fi]=Comic Book
Name[fr]= Comic Book
Name[ga]=Comic Book
Name[gl]=Libro de banda deseñada
Name[hi]=कॉमिक पुस्तिका
Name[hne]=कामिक पुस्तिका
Name[hr]=Strip
Name[hu]=Képregénynézegető
Name[ia]=Comic Book
Name[is]=Comic Book
Name[it]=Comic Book
Name[ja]=Comic Book
Name[kk]=Комикс кітабі
Name[km]=សៀវភៅ​កំប្លែង
Name[ko]=만화책
Name[ku]=Pirtûkên Qerfî
Name[lt]=Comic Book
Name[lv]=Comic Book
Name[mr]=कॉमिक पुस्तक
Name[nb]=Tegneserie
Name[nds]=Comicbook
Name[ne]=कस्मिक किताब
Name[nl]=Comic Book
Name[nn]=Teikneserie
Name[pa]=ਕਾਮਿਕਸ ਕਿਤਾਬ
Name[pl]=Komiks
Name[pt]=Banda Desenhada
Name[pt_BR]=Comic Book
Name[ro]=Benzi desenate
Name[ru]=Comic Book
Name[sk]=Kniha komiksov
Name[sl]=Strip
Name[sq]=Libër Komik
Name[sr]=комикбук
Name[sr@ijekavian]=комикбук
Name[sr@ijekavianlatin]=ComicBook
Name[sr@latin]=ComicBook
Name[sv]=Seriebok
Name[th]=หนังสือการ์ตูน
Name[tr]=Comic Book
Name[ug]=ھەجۋىي كىتاب
Name[uk]=Комікс
Name[vi]=Truyện Tranh
Name[x-test]=xxComic Bookxx
Name[zh_CN]=Comic Book
Name[zh_TW]=Comic Book
Comment=Comic book backend for Okular
Comment[ar]=المنتهى الخلفي Comic book لأوكلار
Comment[ast]=Motor de llibros de Comic pa Okular
Comment[bg]=Ядро на Okular за комикси
Comment[bs]=Pozadina stripa za Okular
Comment[ca]=Dorsal de Comic book per a l'Okular
Comment[ca@valencia]=Dorsal de Comic book per a l'Okular
Comment[cs]=Implementace Knihy komiksů pro Okular
Comment[da]=Comic book-motor til Okular
Comment[de]=Anzeigemodul für Comic-Book in Okular
Comment[el]=Σύστημα υποστήριξης βιβλίων κόμικ για το Okular
Comment[en_GB]=Comic book backend for Okular
Comment[es]=Motor de libros de Comic para Okular
Comment[et]=Okulari koomiksite taustaprogramm
Comment[eu]=Okular-en komiki motorra
Comment[fi]=Comic book -taustaosa Okularille
Comment[fr]=Moteur « Comic book » pour Okular
Comment[ga]=Inneall Comic Book le haghaidh Okular
Comment[gl]=Infraestruturas de banda deseñada para Okular
Comment[hne]=ओकुलर बर कामिक बुक बैकएन्ड
Comment[hr]=Podrška za stripove za Okular
Comment[hu]=Képregényolvasó bővítmény az Okularhoz
Comment[ia]=Retro-administration per Comic Book pro Okular
Comment[is]=ComicBook stuðningur fyrir Okular
Comment[it]=Backend Comic book per Okular
Comment[ja]=Okular の Comic Book 用バックエンド
Comment[kk]=Okular-дың комикс тетігі
Comment[km]=ផ្នែក​ខាង​ក្រោយ​សៀវភៅ​កំប្លែង​សម្រាប់ Okular
Comment[ko]=Okular의 만화책 백엔드
Comment[ku]=Binesazî ya pirtûkên qerfî ji bo Okular
Comment[lt]=Comic book programinė sąsaja, skirta Okular
Comment[lv]=Comic book Okular aizmugure
Comment[mr]=ओक्युलर करिता कॉमिक पुस्तक बॅकएन्ड
Comment[nb]=Tegneseriemotor for Okular
Comment[nds]=Comicbook-Hülpprogramm för Okular
Comment[nl]=Comic-book-backend voor Okular
Comment[nn]=Teikneseriemotor for Okular
Comment[pa]=ਓਕੁਲਾਰ ਲਈ ਕਾਮਿਕਸ ਕਿਤਾਬ ਬੈਕਐਂਡ
Comment[pl]=Silnik komiksu dla Okulara
Comment[pt]=Infra-estrutura de banda desenhada para o Okular
Comment[pt_BR]=Infraestrutura Comic book para o Okular
Comment[ro]=Platformă de benzi desenate pentru Okular
Comment[ru]=Модуль поддержки формата Comic Book для Okular
Comment[sk]=Backend knihy komiksov pre Okular
Comment[sl]=Zaledje za stripe za Okular
Comment[sq]=Mbështetje për librat komikë për Okular
Comment[sr]=Позадина комикбука за Окулар
Comment[sr@ijekavian]=Позадина комикбука за Окулар
Comment[sr@ijekavianlatin]=Pozadina ComicBooka za Okular
Comment[sr@latin]=Pozadina ComicBooka za Okular
Comment[sv]=Seriebokgränssnitt för Okular
Comment[th]=แบ็กเอนด์หนังสือการ์ตูนสำหรับโอกูลาร์
Comment[tr]=Okular için Comic book arka ucu
Comment[uk]=Додаток коміксів для Okular
Comment[x-test]=xxComic book backend for Okularxx
Comment[zh_CN]=Okular 的 Comic book 格式后端
Comment[zh_TW]=Okular 的 Comic book 後端
X-KDE-ServiceTypes=okular/Generator
MimeType=application/x-cbz;application/x-cbr;application/x-cbt;inode/directory;
X-KDE-Library=okularGenerator_comicbook
X-KDE-Priority=1
X-KDE-okularAPIVersion=1
X-KDE-okularHasInternalSettings=false
{
"KPlugin": {
"Authors": [
{
"Email": "tokoe@kde.org",
"Name": "Tobias Koenig"
}
],
"Description": "A renderer for various comic book formats",
"Id": "okular_comicbook",
"License": "GPL",
"MimeTypes": [
"application/x-cbz",
"application/x-cbr",
"application/x-cbt",
"inode/directory"
],
"Name": "ComicBook Backend",
"ServiceTypes": [
"okular/Generator"
],
"Version": "0.4"
},
"X-KDE-Priority": 1,
"X-KDE-okularAPIVersion": 1,
"X-KDE-okularHasInternalSettings": false
}
[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[ia]=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[mr]=ओक्युलर
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[ug]=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-cbz;application/x-cbr;application/x-cbt;
......@@ -13,16 +13,12 @@ set(okularGenerator_djvu_SRCS
)
add_library(okularGenerator_djvu MODULE ${okularGenerator_djvu_SRCS})
okular_add_generator(okularGenerator_djvu ${okularGenerator_djvu_SRCS})
target_link_libraries(okularGenerator_djvu okularcore ${DJVULIBRE_LIBRARY} KF5::KDELibs4Support)
install(TARGETS okularGenerator_djvu DESTINATION ${KDE_INSTALL_PLUGINDIR})
########### install files ###############
install( FILES libokularGenerator_djvu.desktop okularDjvu.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
install( PROGRAMS okularApplication_djvu.desktop org.kde.mobile.okular_djvu.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
......@@ -68,20 +68,7 @@ static void recurseCreateTOC( QDomDocument &maindoc, const QDomNode &parent, QDo
}
}
static KAboutData createAboutData()
{
KAboutData aboutData(