20 #include <QKeySequence> 28 m_currentProcess(nullptr),
29 m_currentProcessState(QProcess::NotRunning),
31 m_currentProcessError(QProcess::UnknownError),
33 m_currentProcessExitCode(0),
34 m_currentProcessExitStatus(QProcess::NormalExit),
35 m_currentProcessPid(0)
70 #if QT_VERSION < 0x051000 87 m_key =
static_cast<Qt::Key
>(0);
129 m_key =
static_cast<Qt::Key
>(tmpInt);
152 QString altGrStr =
m_keyModifiers & Qt::GroupSwitchModifier ?
"Gr " :
"";
154 return altGrStr + QKeySequence(maskedModifiers,
m_key).toString();
158 return QKeySequence(
m_key).toString();
162 void Command::run(
const QString& apiAddress,
int apiPort,
int deviceSetIndex)
166 qWarning(
"Command::run: process already running");
174 args = args.arg(apiAddress);
179 args.replace(
"%2",
"%1");
180 args = args.arg(apiPort);
185 args.replace(
"%3",
"%1");
186 args = args.arg(deviceSetIndex);
196 #if QT_VERSION < 0x051000 251 if (newState == QProcess::Running) {
269 #if QT_VERSION < 0x051000 291 #if QT_VERSION < 0x051000
QProcess::ExitStatus m_currentProcessExitStatus
QProcess::ProcessState getLastProcessState() const
void processFinished(int exitCode, QProcess::ExitStatus exitStatus)
void processError(QProcess::ProcessError error)
QProcess * m_currentProcess
qint64 m_currentProcessPid
QString getKeyLabel() const
QString m_currentProcessCommandLine
bool readString(quint32 id, QString *result, const QString &def=QString::null) const
bool readBool(quint32 id, bool *result, bool def=false) const
void run(const QString &apiAddress, int apiPort, int deviceSetIndex)
uint64_t m_currentProcessFinishTimeStampms
bool readS32(quint32 id, qint32 *result, qint32 def=0) const
void processStateChanged(QProcess::ProcessState newState)
void writeS32(quint32 id, qint32 value)
quint32 getVersion() const
const QString & getLastProcessLog() const
QProcess::ProcessState m_currentProcessState
Qt::KeyboardModifiers m_keyModifiers
QProcess::ProcessError m_currentProcessError
uint64_t m_currentProcessStartTimeStampms
static uint64_t nowms()
returns the current epoch in milliseconds
void writeBool(quint32 id, bool value)
void writeString(quint32 id, const QString &value)
QByteArray serialize() const
const QByteArray & final()
bool getLastProcessError(QProcess::ProcessError &error) const
bool getLastProcessExit(int &exitCode, QProcess::ExitStatus &exitStatus) const
int m_currentProcessExitCode
bool deserialize(const QByteArray &data)