Public Member Functions | |
KLFUserScriptFilterProcess (const QString &scriptFileName, const KLFBackend::klfSettings *settings=NULL) | |
void | addUserScriptConfig (const QVariantMap &usconfig) |
![]() | |
KLFFilterProcess (const QString &pTitle=QString(), const KLFBackend::klfSettings *settings=NULL, const QString &rundir=QString()) | |
KLFFilterProcess (const QString &pTitle, const KLFBackend::klfSettings *settings, const QString &rundir, bool inheritProcessEnvironment) | |
QString | progTitle () const |
void | setProgTitle (const QString &title) |
QString | programCwd () const |
void | setProgramCwd (const QString &cwd) |
QStringList | execEnviron () const |
void | setExecEnviron (const QStringList &env) |
void | addExecEnviron (const QStringList &env) |
QStringList | argv () const |
void | setArgv (const QStringList &argv) |
void | addArgv (const QStringList &argv) |
void | addArgv (const QString &argv) |
bool | outputStdout () const |
void | setOutputStdout (bool on) |
bool | outputStderr () const |
void | setOutputStderr (bool on) |
void | collectStdoutTo (QByteArray *stdoutstore) |
void | collectStderrTo (QByteArray *stderrstore) |
bool | processAppEvents () |
void | setProcessAppEvents (bool processEvents) |
virtual int | exitStatus () const |
virtual int | exitCode () const |
virtual int | resultStatus () const |
virtual QString | resultErrorString () const |
bool | run (const QString &outFileName, QByteArray *outdata) |
bool | run (const QByteArray &indata, const QString &outFileName, QByteArray *outdata) |
bool | run (const QMap< QString, QByteArray * > outdata) |
bool | run (const QByteArray &indata=QByteArray()) |
bool | run (const QByteArray &indata, const QMap< QString, QByteArray * > outdatalist) |
Static Public Member Functions | |
static QString | getUserScriptLogHtml (bool include_head=true) |
Return the user script log, formatted in human-readable HTML. More... | |
Protected Member Functions | |
virtual bool | do_run (const QByteArray &indata, const QMap< QString, QByteArray * > outdatalist) |
![]() | |
virtual QMap< QString, QString > | interpreters () const |
virtual bool | do_run (const QByteArray &indata, const QMap< QString, QByteArray * > outdatalist) |
Actually run the process. More... | |
QByteArray | collectedStdout () const |
The collected stdout data of the process that just ran. More... | |
QByteArray | collectedStderr () const |
The collected stderr data of the process that just ran. More... | |
Definition at line 199 of file klfuserscript.h.
KLFUserScriptFilterProcess::KLFUserScriptFilterProcess | ( | const QString & | scriptFileName, |
const KLFBackend::klfSettings * | settings = NULL |
||
) |
This will already prepare the KLFFilterProcess to run the user script.
Use addArgv() to add parameters to the command-line. the script itself is already added as first parameter automatically.
Definition at line 855 of file klfuserscript.cpp.
References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, KLF_INIT_PRIVATE, and klfDbg.
KLFUserScriptFilterProcess::~KLFUserScriptFilterProcess | ( | ) |
Definition at line 872 of file klfuserscript.cpp.
void KLFUserScriptFilterProcess::addUserScriptConfig | ( | const QVariantMap & | usconfig | ) |
Definition at line 878 of file klfuserscript.cpp.
|
protectedvirtual |
This method is overriden to do some book-keeping, e.g. update the global user script log. You may call any of the other run() methods of KLFFilterProcess, they will all redirect to this call.
Reimplemented from KLFFilterProcess.
Definition at line 885 of file klfuserscript.cpp.
References QString::arg(), KLFFilterProcess::collectedStderr(), KLFFilterProcess::collectedStdout(), QDateTime::currentDateTime(), KLFFilterProcess::do_run(), QList::erase(), QString::fromLatin1(), QString::fromLocal8Bit(), KLFFilterProcess::resultErrorString(), QByteArray::size(), QString::size(), QString::toHtmlEscaped(), QDateTime::toString(), and QObject::tr().
|
static |
Return the user script log, formatted in human-readable HTML.
Unless include_head=false, a full HTML document is included with a default style set.
Definition at line 928 of file klfuserscript.cpp.
References QList::cend().