generator_txt.cpp 1.28 KB
Newer Older
Azat Khuzhin's avatar
Azat Khuzhin committed
1 2 3 4 5 6 7 8 9 10 11 12 13
/***************************************************************************
 *   Copyright (C) 2013 by Azat Khuzhin <a3at.mail@gmail.com>              *
 *                                                                         *
 *   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_txt.h"
#include "converter.h"

14
#include <KAboutData>
15
#include <klocalizedstring.h>
16
#include <KConfigDialog>
Azat Khuzhin's avatar
Azat Khuzhin committed
17

18
OKULAR_EXPORT_PLUGIN(TxtGenerator, "libokularGenerator_txt.json")
19 20

TxtGenerator::TxtGenerator(QObject *parent, const QVariantList &args)
Laurent Montel's avatar
Laurent Montel committed
21
    : Okular::TextDocumentGenerator(new Txt::Converter, QStringLiteral("okular_txt_generator_settings") , parent, args)
Azat Khuzhin's avatar
Azat Khuzhin committed
22
{
23 24 25 26
}

void TxtGenerator::addPages( KConfigDialog* dlg )
{
27
    Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
28

Laurent Montel's avatar
Laurent Montel committed
29
    dlg->addPage( widget, generalSettings(), i18n("Txt"), QStringLiteral("text-plain"), i18n("Txt Backend Configuration") );
30
}
31 32

#include "generator_txt.moc"