2013-11-04 19:29:33 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* 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
|
|
|
|
|
2013-11-04 20:49:32 +00:00
|
|
|
#include <core/document.h>
|
|
|
|
#include <core/textdocumentgenerator.h>
|
2013-11-04 19:29:33 +00:00
|
|
|
|
|
|
|
#include "mobidocument.h"
|
2013-11-04 20:38:52 +00:00
|
|
|
#include <qmobipocket/mobipocket.h>
|
2013-11-04 19:29:33 +00:00
|
|
|
|
|
|
|
namespace Mobi
|
2020-07-10 22:15:05 +00:00
|
|
|
{
|
2013-11-04 19:29:33 +00:00
|
|
|
class Converter : public Okular::TextDocumentConverter
|
2020-07-10 22:15:05 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-11-04 19:29:33 +00:00
|
|
|
Converter();
|
2019-12-18 11:51:13 +00:00
|
|
|
~Converter() override;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2017-11-03 14:20:01 +00:00
|
|
|
QTextDocument *convert(const QString &fileName) override;
|
2013-11-04 19:29:33 +00:00
|
|
|
|
|
|
|
private:
|
2019-10-05 18:18:28 +00:00
|
|
|
void handleMetadata(const QMap<Mobipocket::Document::MetaKey, QString> &metadata);
|
2013-11-04 19:29:33 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|