mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
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:
@ -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>");
|
||||
|
Reference in New Issue
Block a user