2006-09-13 11:14:10 +00:00
/***************************************************************************
* Copyright ( C ) 2006 by Tobias Koenig < tokoe @ kde . org > *
* *
* 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 . *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2006-09-20 11:48:04 +00:00
# include "generator_ooo.h"
2006-09-13 11:14:10 +00:00
2007-04-19 18:30:20 +00:00
# include "converter.h"
2014-09-18 20:17:10 +00:00
# include <KAboutData>
2014-10-08 11:37:04 +00:00
# include <KLocalizedString>
2013-05-18 11:57:46 +00:00
# include <kconfigdialog.h>
2018-04-16 20:35:40 +00:00
# ifdef WITH_KWALLET
# include <kwallet.h>
# endif
2007-11-24 18:08:30 +00:00
2015-11-28 19:24:41 +00:00
OKULAR_EXPORT_PLUGIN ( KOOOGenerator , " libokularGenerator_ooo.json " )
2007-12-02 20:57:24 +00:00
KOOOGenerator : : KOOOGenerator ( QObject * parent , const QVariantList & args )
2015-10-29 12:37:11 +00:00
: Okular : : TextDocumentGenerator ( new OOO : : Converter , QStringLiteral ( " okular_ooo_generator_settings " ) , parent , args )
2007-12-02 20:57:24 +00:00
{
2006-09-13 11:14:10 +00:00
}
2013-05-18 11:57:46 +00:00
void KOOOGenerator : : addPages ( KConfigDialog * dlg )
{
2013-06-06 22:11:35 +00:00
Okular : : TextDocumentSettingsWidget * widget = new Okular : : TextDocumentSettingsWidget ( ) ;
2013-05-18 11:57:46 +00:00
2015-10-29 12:37:11 +00:00
dlg - > addPage ( widget , generalSettings ( ) , i18n ( " OpenDocument Text " ) , QStringLiteral ( " application-vnd.oasis.opendocument.text " ) , i18n ( " OpenDocument Text Backend Configuration " ) ) ;
2013-05-18 11:57:46 +00:00
}
2014-05-10 13:31:59 +00:00
void KOOOGenerator : : walletDataForFile ( const QString & fileName , QString * walletName , QString * walletFolder , QString * walletKey ) const
{
2016-07-11 19:59:14 +00:00
* walletKey = fileName + QStringLiteral ( " /opendocument " ) ;
2018-04-16 20:35:40 +00:00
# ifdef WITH_KWALLET
2014-05-10 13:31:59 +00:00
* walletName = KWallet : : Wallet : : LocalWallet ( ) ;
* walletFolder = KWallet : : Wallet : : PasswordFolder ( ) ;
2018-04-16 20:35:40 +00:00
# endif
2014-05-10 13:31:59 +00:00
}
2014-10-02 11:43:03 +00:00
# include "generator_ooo.moc"