2009-10-08 23:48:04 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2009 by Pino Toscano <pino@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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#ifndef OKULAR_SHELLUTILS_H
|
|
|
|
#define OKULAR_SHELLUTILS_H
|
|
|
|
|
2014-08-13 20:57:48 +00:00
|
|
|
#include <QString>
|
2009-10-08 23:48:04 +00:00
|
|
|
|
2014-08-13 20:57:48 +00:00
|
|
|
class QUrl;
|
2009-10-08 23:48:04 +00:00
|
|
|
|
2014-08-14 11:35:43 +00:00
|
|
|
class QCommandLineParser;
|
2014-08-08 20:35:53 +00:00
|
|
|
|
2009-10-08 23:48:04 +00:00
|
|
|
namespace ShellUtils
|
|
|
|
{
|
|
|
|
|
2017-01-15 23:33:25 +00:00
|
|
|
typedef bool (*FileExistFunc)( const QString& fileName );
|
|
|
|
|
|
|
|
FileExistFunc qfileExistFunc();
|
|
|
|
QUrl urlFromArg(const QString& _arg, FileExistFunc exist_func, const QString& pageArg = QString() );
|
2014-08-14 11:35:43 +00:00
|
|
|
QString serializeOptions(const QCommandLineParser &args);
|
2014-08-08 20:35:53 +00:00
|
|
|
QString serializeOptions(bool startInPresentation, bool showPrintDialog, bool unique, bool noRaise, const QString &page);
|
|
|
|
bool unserializeOptions(const QString &serializedOptions, bool *presentation, bool *print, bool *unique, bool *noraise, QString *page);
|
|
|
|
bool unique(const QString &serializedOptions);
|
|
|
|
bool noRaise(const QString &serializedOptions);
|
|
|
|
bool startInPresentation(const QString &serializedOptions);
|
|
|
|
bool showPrintDialog(const QString &serializedOptions);
|
|
|
|
QString page(const QString &serializedOptions);
|
2009-10-08 23:48:04 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|