made start session working

remotes/origin/HEAD
Tobias Weiss 7 years ago
parent 6bd69f1f7e
commit 072bca9c2c

@ -8,7 +8,6 @@ SOURCES += src/localzleafstarter.cpp \
src/main.cpp \
src/mainwindow.cpp \
src/manualprintingsetup.cpp \
src/sessionstarter.cpp \
src/Lib/client.cpp \
src/Lib/clienthelpnotificationserver.cpp \
src/Lib/clientpinger.cpp \
@ -24,7 +23,6 @@ SOURCES += src/localzleafstarter.cpp \
HEADERS += src/localzleafstarter.h \
src/mainwindow.h \
src/manualprintingsetup.h \
src/sessionstarter.h \
src/Lib/client.h \
src/Lib/clienthelpnotificationserver.h \
src/Lib/clientpinger.h \
@ -40,8 +38,7 @@ HEADERS += src/localzleafstarter.h \
FORMS += src/localzleafstarter.ui \
src/mainwindow.ui \
src/manualprintingsetup.ui \
src/sessionstarter.ui
src/manualprintingsetup.ui
QMAKE_CXXFLAGS += -std=c++11

@ -166,6 +166,10 @@ void lc::Client::OpenTerminal( const QString &argCommand, const bool &argOpenAsR
+ " " + "root@" + ip + "'"};
}
if ( !argCommand.isEmpty() ) {
arguments->last().append( " '" + argCommand + "'" );
}
QProcess openTerminalProcess;
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
openTerminalProcess.setProcessEnvironment( env );

@ -88,13 +88,13 @@ public:
void SetLocalZLeafDefaultName( const QString &argName );
void ShowOrsee();
void ShowPreprints();
public slots:
void StartNewSession( QVector< Client* > argAssocCl, QString argParticipNameReplacement,
bool argPrintLocalReceipts, QString argReceiptsHeader,
QString argzTreeDataTargetPath, quint16 argzTreePort,
QString argzTreeVersion );
public slots:
signals:
void ZLEAF_RUNNING( QString argClientIP );

@ -47,7 +47,7 @@ lc::Settings::Settings( const QSettings &argSettings, QObject *argParent ) :
"Receipts creation will not work.",
argSettings, true ) },
lcInstDir{ ReadSettingsItem( "labcontrol_installation_directory",
"Labcontrol will missbehave with high propability.",
"Datapath not set. Labcontrol will missbehave with high propability.",
argSettings, true ) },
localUserName{ GetLocalUserName() },
localzLeafSize{ ReadSettingsItem( "local_zLeaf_size",

@ -818,6 +818,7 @@ void lc::MainWindow::GetNewDataTargetPath() {
// Start session button actions
void lc::MainWindow::on_PBStartSession_clicked() {
if ( ui->CBzTreeVersion->currentIndex() == 0 ) {
QMessageBox::information( this, tr( "No z-Tree version chosen" ),
tr( "A z-Tree version was not chosen, yet. This setting is"
@ -829,10 +830,10 @@ void lc::MainWindow::on_PBStartSession_clicked() {
if( !ui->ChBSessionWithoutAttachedClients->isChecked() ) {
if ( !activatedItems.length() ) {
QMessageBox::information( this, tr( "Canceled, no clients were chosen" ),
tr( "The start of a new session was canceled."
tr( "The start of a new session was canceled.\n"
" Some clients have to be selected first or the"
" creation of sessions without clients must be"
" allowed with the checkbox close to the bottom" ) );
" allowed with the checkbox." ) );
return;
}
}
@ -852,7 +853,7 @@ void lc::MainWindow::on_PBStartSession_clicked() {
}
}
emit RequestNewSession( associatedClients, anonymousReceiptsPlaceholder,
this->lablib->StartNewSession ( associatedClients, anonymousReceiptsPlaceholder,
ui->ChBReceiptsForLocalClients->isChecked(),
ui->CBReceiptsHeader->currentText(),
ui->CBDataTargetPath->currentText(),
@ -868,6 +869,10 @@ void lc::MainWindow::on_PBStartSession_clicked() {
}
}
}
//Set port to +1
int newPort = ui->SBPort->text().toInt() + 1;
ui->SBPort->setValue(newPort);
}
// Anonymous receipients header check box

@ -24,7 +24,6 @@ enum class icons_t : unsigned short int { UNKNOWN, OFF, DOWN, BOOT, ON, ZLEAF, I
#include "Lib/client.h"
#include "Lib/lablib.h"
#include "sessionstarter.h"
#include "ui_mainwindow.h"
#include <cmath>

@ -406,7 +406,7 @@
<x>10</x>
<y>10</y>
<width>691</width>
<height>103</height>
<height>71</height>
</rect>
</property>
<layout class="QVBoxLayout" name="VLcleanupRecoverLastSession">
@ -432,6 +432,23 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBKillzLeaf">
<property name="toolTip">
<string>Stops zLeaf on all selected clients</string>
</property>
<property name="text">
<string>Stop z-Leaf on selected clients</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBRecoverCrashedSession">
<property name="text">
@ -441,16 +458,6 @@
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="PBKillzLeaf">
<property name="toolTip">
<string>Stops zLeaf on all selected clients</string>
</property>
<property name="text">
<string>Stop z-Leaf on selected clients</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_cleanupRecoverLastSession">
<property name="orientation">
@ -464,9 +471,9 @@
<property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<y>88</y>
<width>691</width>
<height>469</height>
<height>461</height>
</rect>
</property>
<layout class="QVBoxLayout" name="VLNewSession">
@ -1049,6 +1056,15 @@
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
</property>
@ -1056,7 +1072,7 @@
<bool>true</bool>
</property>
<property name="cornerButtonEnabled">
<bool>true</bool>
<bool>false</bool>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
@ -1071,7 +1087,7 @@
<number>30</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>true</bool>
@ -1083,7 +1099,7 @@
<number>25</number>
</attribute>
<attribute name="verticalHeaderStretchLastSection">
<bool>true</bool>
<bool>false</bool>
</attribute>
</widget>
</item>

Loading…
Cancel
Save