Partialreadout (#47)

* eiger server, rxr: partial readout, also gui messages: up last command, down clear command

* added binaries and resolved conflict

* bugfix eiger server: interrupt subframe is bit 2 and not bit number 3

* brackets in defs
This commit is contained in:
Dhanya Thattil
2019-08-07 09:08:58 +02:00
committed by GitHub
parent e20b5e6952
commit 98ddf154b2
28 changed files with 389 additions and 99 deletions

View File

@ -6,6 +6,7 @@
#include <QTextStream>
#include <QDir>
#include <QProcess>
#include <QKeyEvent>
#include <iostream>
#include <string>
@ -26,6 +27,7 @@ void qTabMessages::SetupWidgetWindow() {
process = new QProcess;
process->setWorkingDirectory(QDir::cleanPath(QDir::currentPath()));
PrintNextLine();
lastCommand.clear();
Initialization();
}
@ -36,8 +38,37 @@ void qTabMessages::Initialization() {
connect(dispCommand, SIGNAL(returnPressed()), this, SLOT(ExecuteCommand()));
}
void qTabMessages::keyPressEvent(QKeyEvent* event) {
//cout<<"inside KeyPressEvent()\n";
if (event->key() == Qt::Key_Up) {
GetLastCommand();
}
else if (event->key() == Qt::Key_Down) {
ClearCommand();
}
/* else if((event->key() == Qt::Key_Return) ||(event->key() == Qt::Key_Enter)) {
ExecuteCommand();
}*/ else {
event->ignore();
}
}
void qTabMessages::PrintNextLine() {
dispLog->append(QString("<font color = \"DarkGrey\">") + QDir::current().dirName() + QString("$ ") + QString("</font>"));
}
void qTabMessages::GetLastCommand() {
dispCommand->setText(lastCommand.join(" "));
}
void qTabMessages::ClearCommand() {
dispCommand->setText("");
}
void qTabMessages::ExecuteCommand() {
QStringList param = dispCommand->text().split(" ");
lastCommand.clear();
lastCommand += param;
dispCommand->clear();
// appending command to log without newline
dispLog->moveCursor (QTextCursor::End);
@ -56,10 +87,6 @@ void qTabMessages::ExecuteCommand() {
}
}
void qTabMessages::PrintNextLine() {
dispLog->append(QString("<font color = \"DarkGrey\">") + QDir::current().dirName() + QString("$ ") + QString("</font>"));
}
void qTabMessages::AppendOutput() {
QByteArray result = process->readAll();
result.replace("\n", "<br>");