19 #include "ui_commandoutputdialog.h" 44 ui->startTime->setText((
"..."));
49 QString dateStr = dt.toString(
"yyyy-MM-dd HH:mm:ss.zzz");
50 ui->startTime->setText(dateStr);
54 ui->endTime->setText((
"..."));
59 QString dateStr = dt.toString(
"yyyy-MM-dd HH:mm:ss.zzz");
60 ui->endTime->setText(dateStr);
64 QProcess::ProcessError processError;
68 ui->errorText->setText(
"...");
69 ui->exitCode->setText(
"-");
70 ui->exitText->setText(
"...");
71 ui->runningState->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
75 ui->errorText->setText(
"...");
76 ui->runningState->setStyleSheet(
"QToolButton { background-color : orange; }");
82 ui->runningState->setStyleSheet(
"QToolButton { background-color : red; }");
87 ui->runningState->setStyleSheet(
"QToolButton { background-color : green; }");
88 ui->errorText->setText(
"No error");
92 QProcess::ExitStatus processExitStatus;
96 ui->exitCode->setText(QString(
"%1").
arg(processExitCode));
101 ui->exitCode->setText(
"-");
102 ui->exitText->setText(
"...");
113 case QProcess::FailedToStart:
114 ui->errorText->setText(
"Failed to start");
116 case QProcess::Crashed:
117 ui->errorText->setText(
"Crashed");
119 case QProcess::Timedout:
120 ui->errorText->setText(
"Timed out");
122 case QProcess::WriteError:
123 ui->errorText->setText(
"Write error");
125 case QProcess::ReadError:
126 ui->errorText->setText(
"Read error");
128 case QProcess::UnknownError:
130 ui->errorText->setText(
"Unknown error");
139 case QProcess::NormalExit:
140 ui->exitText->setText(
"Normal exit");
142 case QProcess::CrashExit:
143 ui->exitText->setText(
"Program crashed");
146 ui->exitText->setText(
"Unknown state");
156 ui->processRefresh->setChecked(
false);
165 ui->processKill->setChecked(
false);
void on_processKill_toggled(bool checked)
void setErrorText(const QProcess::ProcessError &processError)
QProcess::ProcessState getLastProcessState() const
uint64_t getLastProcessFinishTimestampms() const
const QString & getLastProcessCommandLine() const
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
qint64 getLastProcessPid() const
uint64_t getLastProcessStartTimestampms() const
const QString & getLastProcessLog() const
void on_processRefresh_toggled(bool checked)
void setExitText(const QProcess::ExitStatus &processExit)
Ui::CommandOutputDialog * ui
CommandOutputDialog(Command &command, QWidget *parent=0)
bool getLastProcessError(QProcess::ProcessError &error) const
bool getLastProcessExit(int &exitCode, QProcess::ExitStatus &exitStatus) const