64 explicit ZProcess(QObject *parent =
nullptr);
146 Q_INVOKABLE
void release();
297 Q_INVOKABLE
void envSetValue(
const QString& name,
const QString& value);
306 Q_INVOKABLE QString
envGetValue(
const QString& name);
void getQDevice(QIODevice **device)
Obtains the QIODevice pointer for this object.
Q_INVOKABLE void envClear()
Clears the process execution environment that will be passed to the child process.
int exitCode() const
Obtains the exit code of the last process that finished.
void readyReadStandardError(QPrivateSignal)
void errorOccurred(QProcess::ProcessError error)
QML/Javascript wrapper for the QProcess class, allows QML programs to spawn and communicate with a ba...
void stateChanged(QProcess::ProcessState state, QPrivateSignal)
int readChannel
Set/get the current read channel.
#define ZBL_DECLARE_LOGGED_OBJECT
void start(int mode=static_cast< int >(ZioDevice::ReadWrite))
Starts the process.
ZBL_DECLARE_LOGGED_OBJECT void initZioDevice()
Construct and connect a ZioDevice object that presents a Javascript interface to this process's QIODe...
Q_INVOKABLE void envSetValue(const QString &name, const QString &value)
Sets an environment variable that will be passed to the child process.
void finished(int exitCode, QProcess::ExitStatus exitStatus)
Q_INVOKABLE void closeReadChannel(int channel)
Closes the specified read channel of the process.
int getReadChannel() const
Obtain the current read channel.
ZioDevice * m_zd
Pointer to QioDevice interface object.
void readyReadStandardOutput(QPrivateSignal)
void closeWriteChannel()
Schedules the write channel of the process to close once all input data has been read by the process...
QVariant tags
A Javascript object containing QFile enumeration values.
Q_INVOKABLE QString envGetValue(const QString &name)
Returns the value of an environment variable that will be passed to the child process.
void setArguments(const QStringList &arguments)
Sets the arguments that will be passed to the process when it starts.
void createTags()
Create the m_tag object that presents a Javascript interface for QProcess enumeration values...
Q_INVOKABLE QStringList envGetList()
Obtains the list of process environment variables that will be passed to the child process...
QString program
Set/get the program for the process.
qint64 getProcessID() const
Obtain the process ID. Note that Linux will reuse process IDs. They are ephemeral, not unique.
Q_INVOKABLE bool envValueExists(const QString &name)
Determine if an environment variable has been set to be passed to the child process.
void setReadChannel(int channel)
Determine which read channel is currently active.
static void registerType()
Registers ZFile as a QML type.
int exitStatus() const
Obtains the exit status of the last process that finished.
qint64 state
Obtain the current process state.
A javascript wrapper for QIODevice.
ZProcess(QObject *parent=nullptr)
void setProcessChannelMode(int mode)
Sets the process channel mode that will be used the next time the process starts. ...
int getError() const
Obtains the current error state.
qint64 error
Obtain the process's current error state.
static QVariant m_tags
A QVariantMap used to pass QFile enumeration values to Javascript programs.
void setProgram(const QString &program)
Sets the path to the program the process will be started with.
Q_INVOKABLE QObject * readAllStandardOutput()
Obtains all available data from the process's stdout channel.
QStringList arguments
Set/get the argument list for the process.
int getProcessChannelMode() const
Returns the channel mode of the QProcess standard output and standard error channels.
Q_INVOKABLE QObject * readAllStandardError()
Obtains all available data from the process's stderr channel.
qint64 processId
Set/get the operating system process ID for the last process run by this object.
QStringList getArguments()
Returns the arguments that will be passed to the process when it starts.
QObject device
A ZioDevice object that represents the File's QioDevice interface.
int processChannelMode
Set/get the process channel mode for the process.
int getState() const
Obtains the current process state.
QProcess * m_p
Smart pointer to the embedded QFile object.
QString getProgram() const
Returns the path to the program the process will be started with.