remotes/origin/HEAD
Tobias Weiss 7 years ago
parent a9b237f182
commit 9f03443034

@ -105,7 +105,7 @@ void lc::Client::Boot() {
GotStatusChanged( state_t::BOOTING ); GotStatusChanged( state_t::BOOTING );
} }
void lc::Client::DeactiveScreensaver() { /*void lc::Client::DeactiveScreensaver() {
QStringList arguments; QStringList arguments;
arguments << "-i" << settings->pkeyPathUser arguments << "-i" << settings->pkeyPathUser
<< QString{ settings->userNameOnClients + "@" + ip } << QString{ settings->userNameOnClients + "@" + ip }
@ -119,7 +119,7 @@ void lc::Client::DeactiveScreensaver() {
// Output message via the debug messages tab // Output message via the debug messages tab
qDebug() << settings->sshCmd << arguments.join( " " ); qDebug() << settings->sshCmd << arguments.join( " " );
} }*/
void lc::Client::GotStatusChanged( state_t argState ) { void lc::Client::GotStatusChanged( state_t argState ) {
if ( ( protectedCycles > 0 ) && ( state == state_t::BOOTING ) && ( argState != state_t::RESPONDING ) ) { if ( ( protectedCycles > 0 ) && ( state == state_t::BOOTING ) && ( argState != state_t::RESPONDING ) ) {

@ -81,7 +81,7 @@ void lc::MainWindow::DisableDisfunctionalWidgets() {
ui->CBClientNames->setEnabled( false ); ui->CBClientNames->setEnabled( false );
ui->CBWebcamChooser->setEnabled( false ); ui->CBWebcamChooser->setEnabled( false );
ui->GBClientActions->setEnabled( false ); ui->GBClientActions->setEnabled( false );
ui->GBzTree->setEnabled( false ); //ui->GBzTree->setEnabled( false );
ui->LEFilePath->setEnabled( false ); ui->LEFilePath->setEnabled( false );
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->LWebcamChooser->setEnabled( false ); ui->LWebcamChooser->setEnabled( false );
@ -117,7 +117,7 @@ void lc::MainWindow::DisableDisfunctionalWidgets() {
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->PBBeamFile->setEnabled( false ); ui->PBBeamFile->setEnabled( false );
ui->PBChooseFile->setEnabled( false ); ui->PBChooseFile->setEnabled( false );
ui->PBDeactivateScreensaver->setEnabled( false ); //ui->PBDeactivateScreensaver->setEnabled( false );
ui->PBKillzLeaf->setEnabled( false ); ui->PBKillzLeaf->setEnabled( false );
ui->PBRunzLeaf->setEnabled( false ); ui->PBRunzLeaf->setEnabled( false );
ui->PBShutdown->setEnabled( false ); ui->PBShutdown->setEnabled( false );
@ -171,7 +171,7 @@ void lc::MainWindow::DisableDisfunctionalWidgets() {
ui->CBClientNames->setEnabled( false ); ui->CBClientNames->setEnabled( false );
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->PBRunzLeaf->setEnabled( false ); ui->PBRunzLeaf->setEnabled( false );
ui->PBStartSession->setEnabled( false ); //ui->PBStartSession->setEnabled( false );
ui->PBStartLocalzLeaf->setEnabled( false ); ui->PBStartLocalzLeaf->setEnabled( false );
ui->PBStartzLeaf->setEnabled( false ); ui->PBStartzLeaf->setEnabled( false );
} }
@ -184,7 +184,7 @@ void lc::MainWindow::DisableDisfunctionalWidgets() {
// Disable 'PBViewDesktop' if 'vnc_viewer' was not set // Disable 'PBViewDesktop' if 'vnc_viewer' was not set
if ( settings->vncViewer.isEmpty() ) { if ( settings->vncViewer.isEmpty() ) {
ui->PBViewDesktop->setEnabled( false ); //ui->PBViewDesktop->setEnabled( false );
} }
// Disable 'PBBoot' if 'wakeonlan_command' was not set // Disable 'PBBoot' if 'wakeonlan_command' was not set
@ -203,21 +203,21 @@ void lc::MainWindow::DisableDisfunctionalWidgets() {
ui->CBClientNames->setEnabled( false ); ui->CBClientNames->setEnabled( false );
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->PBRunzLeaf->setEnabled( false ); ui->PBRunzLeaf->setEnabled( false );
ui->PBStartSession->setEnabled( false ); //ui->PBStartSession->setEnabled( false );
ui->PBStartLocalzLeaf->setEnabled( false ); ui->PBStartLocalzLeaf->setEnabled( false );
ui->PBStartzLeaf->setEnabled( false ); ui->PBStartzLeaf->setEnabled( false );
} }
// Disable the disable screensaver function if the 'xset_command' was not set // Disable the disable screensaver function if the 'xset_command' was not set
if ( settings->xsetCmd.isEmpty() ) { //if ( settings->xsetCmd.isEmpty() ) {
ui->PBDeactivateScreensaver->setEnabled( false ); // ui->PBDeactivateScreensaver->setEnabled( false );
} //}
if ( settings->zTreeInstDir.isEmpty() ) { if ( settings->zTreeInstDir.isEmpty() ) {
ui->CBClientNames->setEnabled( false ); ui->CBClientNames->setEnabled( false );
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->PBRunzLeaf->setEnabled( false ); ui->PBRunzLeaf->setEnabled( false );
ui->PBStartSession->setEnabled( false ); //ui->PBStartSession->setEnabled( false );
ui->PBStartLocalzLeaf->setEnabled( false ); ui->PBStartLocalzLeaf->setEnabled( false );
ui->PBStartzLeaf->setEnabled( false ); ui->PBStartzLeaf->setEnabled( false );
} }
@ -297,12 +297,12 @@ void lc::MainWindow::on_PBChooseFile_clicked() {
delete file_dialog; delete file_dialog;
} }
void lc::MainWindow::on_PBDeactivateScreensaver_clicked() { /*void lc::MainWindow::on_PBDeactivateScreensaver_clicked() {
for ( auto s : settings->GetClients() ) { for ( auto s : settings->GetClients() ) {
if ( s->GetClientState() >= state_t::RESPONDING ) if ( s->GetClientState() >= state_t::RESPONDING )
s->DeactiveScreensaver(); s->DeactiveScreensaver();
} }
} }*/
void lc::MainWindow::on_PBExecute_clicked() { void lc::MainWindow::on_PBExecute_clicked() {
// This will be set to false, if the command shall be executed only on the chosen clients (that's if not all clients are up) // This will be set to false, if the command shall be executed only on the chosen clients (that's if not all clients are up)
@ -615,7 +615,7 @@ void lc::MainWindow::SetupWidgets() {
const QStringList &zTreeEntries = settings->installedZTreeVersions; const QStringList &zTreeEntries = settings->installedZTreeVersions;
if ( zTreeEntries.isEmpty() ) { if ( zTreeEntries.isEmpty() ) {
ui->CBClientNames->setEnabled( false ); ui->CBClientNames->setEnabled( false );
ui->GBzTree->setEnabled( false ); //ui->GBzTree->setEnabled( false );
ui->LFakeName->setEnabled( false ); ui->LFakeName->setEnabled( false );
ui->PBRunzLeaf->setEnabled( false ); ui->PBRunzLeaf->setEnabled( false );
ui->PBStartLocalzLeaf->setEnabled( false ); ui->PBStartLocalzLeaf->setEnabled( false );

@ -61,7 +61,6 @@ private slots:
void on_PBBeamFile_clicked(); void on_PBBeamFile_clicked();
void on_PBBoot_clicked(); void on_PBBoot_clicked();
void on_PBChooseFile_clicked(); void on_PBChooseFile_clicked();
void on_PBDeactivateScreensaver_clicked();
void on_PBExecute_clicked(); void on_PBExecute_clicked();
void on_PBKillLocalzLeaf_clicked(); void on_PBKillLocalzLeaf_clicked();
void on_PBKillzLeaf_clicked(); void on_PBKillzLeaf_clicked();

@ -40,62 +40,57 @@
<layout class="QHBoxLayout" name="HLExperimenterTab" stretch="1,1"> <layout class="QHBoxLayout" name="HLExperimenterTab" stretch="1,1">
<item> <item>
<layout class="QVBoxLayout" name="VLzTreeClientActions"> <layout class="QVBoxLayout" name="VLzTreeClientActions">
<item alignment="Qt::AlignTop"> <item>
<widget class="QGroupBox" name="GBzTree"> <widget class="QGroupBox" name="GBLocalActions">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string>z-Tree</string> <string>Experiment preparation / server actions</string>
</property>
<property name="flat">
<bool>false</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="0,0,0,0,0,0,0"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item> <item>
<widget class="QPushButton" name="PBStartSession"> <widget class="QPushButton" name="PBShowORSEE">
<property name="toolTip">
<string>Start a new session. A new window will be opened to enter all required parameters.</string>
</property>
<property name="text"> <property name="text">
<string>Start session</string> <string>Show ORSEE</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBShowSessions"> <widget class="Line" name="line">
<property name="enabled"> <property name="orientation">
<bool>true</bool> <enum>Qt::Horizontal</enum>
</property> </property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBShowPreprints">
<property name="text"> <property name="text">
<string>Show sessions</string> <string>Show preprints</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBKillzTree"> <widget class="QPushButton" name="PBPrintPaymentFileManually">
<property name="toolTip"> <property name="toolTip">
<string>Kill all local z-Tree instances</string> <string>Choose a payment file manually, which will then be printed.</string>
</property> </property>
<property name="text"> <property name="text">
<string>Terminate z-Tree</string> <string>Print payment file manually</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_4"> <widget class="Line" name="line_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label"> <widget class="QPushButton" name="PBKillzTree">
<property name="toolTip">
<string>Stop all local z-Tree instances</string>
</property>
<property name="text"> <property name="text">
<string>Session recovery:</string> <string>Stop z-Tree</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -107,74 +102,104 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBPrintPaymentFileManually"> <widget class="Line" name="line_4">
<property name="toolTip"> <property name="orientation">
<string>Choose a payment file manually, which will then be printed.</string> <enum>Qt::Horizontal</enum>
</property>
<property name="text">
<string>Print payment file manually</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="GBClientActions">
<property name="title">
<string>Client actions</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QPushButton" name="PBBoot"> <layout class="QHBoxLayout" name="HLLocalzLeaf">
<property name="toolTip"> <item>
<string>Boots the selected clients.</string> <widget class="QPushButton" name="PBStartLocalzLeaf">
</property> <property name="text">
<property name="text"> <string>Start local z-Leaf</string>
<string>Boot</string> </property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBKillLocalzLeaf">
<property name="text">
<string>Stop local z-Leaf</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBShutdown"> <widget class="QLabel" name="LFakeName">
<property name="toolTip"> <property name="enabled">
<string>Turns off the selected clients.</string> <bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>Shutdown</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Run zLeaf with another name than the client's:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBStartzLeaf"> <widget class="QComboBox" name="CBClientNames">
<property name="toolTip"> <property name="editable">
<string>Starts zLeaf on the selected clients with the port given in the 'zTree' groupbox.</string> <bool>true</bool>
</property>
<property name="text">
<string>Start z-Leaf</string>
</property> </property>
<item>
<property name="text">
<string>Choose the name the z-Leaf shall have</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBKillzLeaf"> <widget class="QPushButton" name="PBRunzLeaf">
<property name="toolTip">
<string>Kills zLeaf on all selected clients.</string>
</property>
<property name="text"> <property name="text">
<string>Terminate z-Leaf</string> <string>Run z-Leaf with chosen name</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBViewDesktop"> <widget class="Line" name="line_5">
<property name="toolTip"> <property name="orientation">
<string>Shows the desktop of the selected clients.</string> <enum>Qt::Horizontal</enum>
</property> </property>
</widget>
</item>
<item>
<widget class="QLabel" name="LWebcamChooser">
<property name="text"> <property name="text">
<string>View desktop</string> <string>Show webcams:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QComboBox" name="CBWebcamChooser">
<item>
<property name="text">
<string>Choose webcam</string>
</property>
</item>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -186,174 +211,173 @@
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QGroupBox" name="GBFurtherLocalActions"> <widget class="QGroupBox" name="GBClientActions">
<property name="title"> <property name="title">
<string>Further local actions</string> <string>Client actions</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_5">
<item> <item>
<widget class="QPushButton" name="PBShowORSEE"> <widget class="QPushButton" name="PBBoot">
<property name="text"> <property name="toolTip">
<string>Show ORSEE</string> <string>Boots the selected clients.</string>
</property> </property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBShowPreprints">
<property name="text"> <property name="text">
<string>Show preprints</string> <string>Boot</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="HLLocalzLeaf"> <widget class="QPushButton" name="PBShutdown">
<item> <property name="toolTip">
<widget class="QPushButton" name="PBStartLocalzLeaf"> <string>Turns off the selected clients.</string>
<property name="text"> </property>
<string>Start local z-Leaf</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PBKillLocalzLeaf">
<property name="text">
<string>Kill local z-Leaf</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="GBSpecialActions">
<property name="title">
<string>Special actions</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="LWebcamChooser">
<property name="text"> <property name="text">
<string>Show webcam:</string> <string>Shutdown</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="CBWebcamChooser"> <widget class="Line" name="line_6">
<item> <property name="orientation">
<property name="text"> <enum>Qt::Horizontal</enum>
<string>Choose webcam</string> </property>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line"> <widget class="QPushButton" name="PBStartzLeaf">
<property name="orientation"> <property name="toolTip">
<enum>Qt::Horizontal</enum> <string>Starts zLeaf on the selected clients with the port given in the 'zTree' groupbox.</string>
</property>
<property name="text">
<string>Start z-Leaf on selected clients</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBDeactivateScreensaver"> <widget class="QPushButton" name="PBKillzLeaf">
<property name="toolTip"> <property name="toolTip">
<string>Deactivates the screensavers on the selected clients.</string> <string>Stops zLeaf on all selected clients</string>
</property> </property>
<property name="text"> <property name="text">
<string>Deactivate screensaver</string> <string>Stop z-Leaf on selected clients</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="Line" name="line_7">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="LFakeName"> <widget class="QPushButton" name="PBViewDesktopViewOnly">
<property name="enabled"> <property name="toolTip">
<bool>true</bool> <string>Shows the desktop of the selected clients.</string>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property> </property>
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Run zLeaf with another name than the client's:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>View desktop of selected clients (viel only)</string>
</property> </property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="CBClientNames">
<property name="editable">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Choose the name the z-Leaf shall have</string>
</property>
</item>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="PBRunzLeaf"> <widget class="QPushButton" name="PBViewDesktopFullControl">
<property name="text"> <property name="text">
<string>Run z-Leaf with chosen name</string> <string>View desktop of selected clients (full control)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_3"> <widget class="Line" name="line_8">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="LUploadFolder"> <layout class="QHBoxLayout" name="HLFileChooser">
<property name="text">
<string>Upoad folder:</string>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="VLFileBeamer">
<item> <item>
<layout class="QHBoxLayout" name="HLFileChooser"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QPushButton" name="PBChooseFile"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
<string>Choose folder</string> <string>Upload folder to all selected clients:</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="LEFilePath"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="readOnly"> <item>
<bool>true</bool> <widget class="QPushButton" name="PBChooseFile">
<property name="text">
<string>Choose folder</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="LEFilePath">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="PBBeamFile">
<property name="text">
<string>Start to upload folder</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
</layout>
</item>
<item>
<widget class="Line" name="line_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="LStartBrowser">
<property name="text">
<string>Start browser on all selected clients:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="LURL">
<property name="text">
<string>URL:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QPushButton" name="PBBeamFile"> <widget class="QPushButton" name="pushButton">
<property name="text"> <property name="text">
<string>Beam folder to ~/media4zTree on all clients</string> <string>Start browser</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Stop browser</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -366,6 +390,30 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="TSessionStart">
<property name="enabled">
<bool>true</bool>
</property>
<attribute name="title">
<string>Start session</string>
</attribute>
<widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
<x>9</x>
<y>9</y>
<width>761</width>
<height>411</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2"/>
</widget>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Settings</string>
</attribute>
</widget>
<widget class="QWidget" name="TAdminActions"> <widget class="QWidget" name="TAdminActions">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -507,6 +555,9 @@
</item> </item>
<item> <item>
<widget class="QTableView" name="TVClients"> <widget class="QTableView" name="TVClients">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>

Loading…
Cancel
Save