[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KLFUserScriptFilterProcess Class Reference
Inheritance diagram for KLFUserScriptFilterProcess:
Inheritance graph
[legend]
Collaboration diagram for KLFUserScriptFilterProcess:
Collaboration graph
[legend]

Public Member Functions

 KLFUserScriptFilterProcess (const QString &scriptFileName, const KLFBackend::klfSettings *settings=NULL)
 
void addUserScriptConfig (const QVariantMap &usconfig)
 
- Public Member Functions inherited from KLFFilterProcess
 KLFFilterProcess (const QString &pTitle=QString(), const KLFBackend::klfSettings *settings=NULL, const QString &rundir=QString())
 
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)
 
- Protected Member Functions inherited from KLFFilterProcess
virtual QMap< QString, QStringinterpreters () const
 
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...
 

Detailed Description

Definition at line 199 of file klfuserscript.h.

Constructor & Destructor Documentation

◆ KLFUserScriptFilterProcess()

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 854 of file klfuserscript.cpp.

References KLF_DEBUG_BLOCK, KLF_DELETE_PRIVATE, KLF_FUNC_NAME, KLF_INIT_PRIVATE, and klfDbg.

Member Function Documentation

◆ do_run()

bool KLFUserScriptFilterProcess::do_run ( const QByteArray indata,
const QMap< QString, QByteArray *>  outdatalist 
)
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 884 of file klfuserscript.cpp.

References QString::arg(), KLFFilterProcess::collectedStderr(), KLFFilterProcess::collectedStdout(), QDateTime::currentDateTime(), KLFFilterProcess::do_run(), QList::erase(), QString::fromLatin1(), QString::fromLocal8Bit(), KLFFilterProcess::resultErrorString(), QString::size(), QByteArray::size(), QString::toHtmlEscaped(), QDateTime::toString(), and QObject::tr().

◆ getUserScriptLogHtml()

QString KLFUserScriptFilterProcess::getUserScriptLogHtml ( bool  include_head = true)
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 927 of file klfuserscript.cpp.

References QList::cend().


The documentation for this class was generated from the following files:

Generated by doxygen 1.8.13