7#include "QHyodaX11Xterm.h"
12QHyodaX11Xterm::QHyodaX11Xterm(QWidget *widget, QString tabName):
QHyodaX11(widget,tabName)
14 qDebug() <<
"[NEW] QHyodaX11Xterm";
21QHyodaX11Xterm::~QHyodaX11Xterm(
void){
41void QHyodaX11Xterm::clientIsEmbedded(){
42 qDebug()<<
"[QHyodaX11Xterm::clientIsEmbedded]";
48void QHyodaX11Xterm::clientClosed(){
49 qDebug() <<
"[QHyodaX11Xterm::embedClosed] Container clientClosed!";
60bool QHyodaX11Xterm::close()
62 qDebug() <<
"[QHyodaX11Xterm::close]";
67void QHyodaX11Xterm::started(){
68 qDebug() <<
"[QHyodaX11Xterm::started]";
75void QHyodaX11Xterm::launch(QWidget *widget){
77 splitter->addWidget(
this);
79 X11Process.append(
new QProcess(widget));
80 X11Process.last()->setProcessChannelMode(QProcess::MergedChannels);
85 QString executable(
"/usr/bin/xterm");
86 QStringList arguments=QStringList() <<
"-fg" <<
"cyan"
89 <<
"-sb" <<
"-sl" <<
"8192"
96 <<
"-into" << QString::number(this->winId());
97 X11Process.last()->start(executable, arguments);
98 if (!X11Process.last()->waitForStarted()) qFatal(
"QHyodaX11Xterm::refresh NOT started!");
102void QHyodaX11Xterm::stateChanged(QProcess::ProcessState newState){
103 qDebug() <<
"[QHyodaX11Xterm::stateChanged]"<<newState;
107void QHyodaX11Xterm::finished(
int exitCode, QProcess::ExitStatus exitStatus){
108 qDebug() <<
"[QHyodaX11Xterm] xterm has finished with exitCode="<<exitCode<<
", and exitStatus="<<exitStatus;
110 if (X11Process.last()!=NULL){
111 X11Process.last()->closeWriteChannel();
112 if (X11Process.last()->waitForFinished()) qFatal(
"xterm NOT closed!");
135void QHyodaX11Xterm::readyReadStandardOutput(
void){
136 qDebug()<<X11Process.last()->readAllStandardOutput();