Removed unused 'Session' related variables from 'Lablib'

remotes/origin/HEAD
markuspg 8 years ago
parent 6c0c5d012b
commit ac9037ffa9

@ -269,16 +269,6 @@ void lc::Lablib::ReadSettings() {
} }
} }
void lc::Lablib::SetAnonymousReceiptsPlaceholder( const QString &argPlaceHolder ) {
anonymousReceiptsPlaceholder = argPlaceHolder;
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] anonymous_receipts_placeholder set to: '%1'" ).arg( anonymousReceiptsPlaceholder ) );
}
void lc::Lablib::SetChosenLaTeXHeader( const QString &argLatexHeader ) {
chosenLaTeXHeader = argLatexHeader;
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_latex_header set to: '%1'" ).arg( chosenLaTeXHeader ) );
}
void lc::Lablib::SetChosenZTreeDataTargetPath( const QString &argZTreeDataTargetPath ) { void lc::Lablib::SetChosenZTreeDataTargetPath( const QString &argZTreeDataTargetPath ) {
chosenZTreeDataTargetPath = argZTreeDataTargetPath; chosenZTreeDataTargetPath = argZTreeDataTargetPath;
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_zTree_data_target_path set to: '%1'" ).arg( chosenZTreeDataTargetPath ) ); debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_zTree_data_target_path set to: '%1'" ).arg( chosenZTreeDataTargetPath ) );
@ -289,11 +279,6 @@ void lc::Lablib::SetChosenZTreePort( const int &argPort ) {
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_zTree_port set to: '%1'" ).arg( QString::number( chosenZTreePort ) ) ); debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_zTree_port set to: '%1'" ).arg( QString::number( chosenZTreePort ) ) );
} }
void lc::Lablib::SetChosenZTreeVersion( const QString &argZTreeVersion ) {
chosenZTreeVersion = QString{ "zTree_" + argZTreeVersion };
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] chosen_zTree_version set to: '%1'" ).arg( chosenZTreeVersion ) );
}
void lc::Lablib::SetPrintReceiptsForLocalClients( const bool &argPrintReceiptsForLocalClients ) { void lc::Lablib::SetPrintReceiptsForLocalClients( const bool &argPrintReceiptsForLocalClients ) {
PrintReceiptsForLocalClients = argPrintReceiptsForLocalClients; PrintReceiptsForLocalClients = argPrintReceiptsForLocalClients;
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] Set print_receipts_for_local_clients to : '%1'" ).arg( QString::number( PrintReceiptsForLocalClients ) ) ); debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] Set print_receipts_for_local_clients to : '%1'" ).arg( QString::number( PrintReceiptsForLocalClients ) ) );

@ -71,11 +71,6 @@ public:
* @return The users with administrative rights * @return The users with administrative rights
*/ */
QStringList *GetAdminUsers() const { return adminUsers; } QStringList *GetAdminUsers() const { return adminUsers; }
/*! Returns the placeholder for anonymous receipts
*
* @return The placeholder for anonymous receipts
*/
QString GetAnonymousReceiptsPlaceholder() const { return anonymousReceiptsPlaceholder; }
/*! Returns the currently set port number of zTree /*! Returns the currently set port number of zTree
* *
* @return The currently set port number for zTree * @return The currently set port number for zTree
@ -131,11 +126,8 @@ public:
* @return A pointer to a QStringList containing all available webcams * @return A pointer to a QStringList containing all available webcams
*/ */
QStringList *GetWebcams () const { return webcams; } QStringList *GetWebcams () const { return webcams; }
void SetAnonymousReceiptsPlaceholder( const QString &argPlaceHolder );
void SetChosenLaTeXHeader( const QString &argLatexHeader );
void SetChosenZTreeDataTargetPath( const QString &argZTreeDataTargetPath ); void SetChosenZTreeDataTargetPath( const QString &argZTreeDataTargetPath );
void SetChosenZTreePort( const int &argPort ); void SetChosenZTreePort( const int &argPort );
void SetChosenZTreeVersion( const QString &argZTreeVersion );
//! Sets the default name of local zLeaf instances //! Sets the default name of local zLeaf instances
/** /**
* @param argName The default name local zLeaf instances shall have * @param argName The default name local zLeaf instances shall have
@ -166,11 +158,8 @@ private:
void ReadSettings(); void ReadSettings();
QStringList *adminUsers = nullptr; //! Stores all users with administrative rights QStringList *adminUsers = nullptr; //! Stores all users with administrative rights
QString anonymousReceiptsPlaceholder; //! The placeholder which shall substitute the client names on anonymous receipts (if != "")
QString chosenLaTeXHeader;
QString chosenZTreeDataTargetPath; QString chosenZTreeDataTargetPath;
int chosenZTreePort = 7000; //! Stores the currently chosen port for new zTree instances int chosenZTreePort = 7000; //! Stores the currently chosen port for new zTree instances
QString chosenZTreeVersion;
ClientHelpNotificationServer *clientHelpNotificationServer = nullptr; //! A server to retrieve help requests from the clients ClientHelpNotificationServer *clientHelpNotificationServer = nullptr; //! A server to retrieve help requests from the clients
unsigned short int clientHelpNotificationServerPort = 0; //! The port the help requests shall be received on unsigned short int clientHelpNotificationServerPort = 0; //! The port the help requests shall be received on
QMap< QString, Client* > * clientIPsToClientsMap = nullptr; //! A map container storing ip-client pairs QMap< QString, Client* > * clientIPsToClientsMap = nullptr; //! A map container storing ip-client pairs

@ -58,18 +58,14 @@ void lc::SessionStarter::on_CBDataTargetPath_activated(const QString &arg1) {
lablib->SetChosenZTreeDataTargetPath( arg1 ); lablib->SetChosenZTreeDataTargetPath( arg1 );
} }
void lc::SessionStarter::on_CBReceiptsHeader_activated(const QString &arg1) { void lc::SessionStarter::on_CBReceiptsHeader_activated( const QString &argHeader ) {
Q_UNUSED( argHeader );
ui->CBReceiptsHeader->setStyleSheet( "" ); ui->CBReceiptsHeader->setStyleSheet( "" );
lablib->SetChosenLaTeXHeader( arg1 );
} }
void lc::SessionStarter::on_CBReplaceParticipantName_currentTextChanged(const QString &arg1) { void lc::SessionStarter::on_CBzTreeVersion_activated( const QString &argVersion ) {
lablib->SetAnonymousReceiptsPlaceholder( arg1 ); Q_UNUSED( argVersion );
}
void lc::SessionStarter::on_CBzTreeVersion_activated(const QString &arg1) {
ui->CBzTreeVersion->setStyleSheet( "" ); ui->CBzTreeVersion->setStyleSheet( "" );
lablib->SetChosenZTreeVersion( arg1 );
} }
void lc::SessionStarter::on_ChBPrintanonymousreceipts_clicked( bool checked ) { void lc::SessionStarter::on_ChBPrintanonymousreceipts_clicked( bool checked ) {
@ -78,14 +74,10 @@ void lc::SessionStarter::on_ChBPrintanonymousreceipts_clicked( bool checked ) {
ui->LReplaceParticipantName->setEnabled( true ); ui->LReplaceParticipantName->setEnabled( true );
ui->CBReplaceParticipantName->setEnabled( true ); ui->CBReplaceParticipantName->setEnabled( true );
ui->CBReplaceParticipantName->setStyleSheet( "background: cyan" ); ui->CBReplaceParticipantName->setStyleSheet( "background: cyan" );
// Pass the currently chosen placeholder
lablib->SetAnonymousReceiptsPlaceholder( ui->CBReplaceParticipantName->currentText() );
} else { } else {
ui->LReplaceParticipantName->setEnabled( false ); ui->LReplaceParticipantName->setEnabled( false );
ui->CBReplaceParticipantName->setEnabled( false ); ui->CBReplaceParticipantName->setEnabled( false );
ui->CBReplaceParticipantName->setStyleSheet( "" ); ui->CBReplaceParticipantName->setStyleSheet( "" );
// Pass an empty QString as signal, that receipts shall not be anonymous
lablib->SetAnonymousReceiptsPlaceholder( "" );
} }
ui->ChBPrintanonymousreceipts->setStyleSheet( "" ); ui->ChBPrintanonymousreceipts->setStyleSheet( "" );
} }
@ -151,7 +143,6 @@ void lc::SessionStarter::SetupWidgets() {
this, &SessionStarter::GetNewDataTargetPath ); this, &SessionStarter::GetNewDataTargetPath );
// Since filling a QComboBox does not emit the 'activated' signal, initially set some variables manually // Since filling a QComboBox does not emit the 'activated' signal, initially set some variables manually
lablib->SetChosenLaTeXHeader( ui->CBReceiptsHeader->currentText() );
lablib->SetChosenZTreeDataTargetPath( ui->CBDataTargetPath->currentText() ); lablib->SetChosenZTreeDataTargetPath( ui->CBDataTargetPath->currentText() );
// Set the initial status of CBReceiptsforLocalClients according to the settings in lcLablib // Set the initial status of CBReceiptsforLocalClients according to the settings in lcLablib

@ -59,9 +59,8 @@ private slots:
//! Opens a 'QFileDialog' and tries to choose a new zTree data target path //! Opens a 'QFileDialog' and tries to choose a new zTree data target path
void GetNewDataTargetPath(); void GetNewDataTargetPath();
void on_CBDataTargetPath_activated(const QString &arg1); void on_CBDataTargetPath_activated(const QString &arg1);
void on_CBReceiptsHeader_activated(const QString &arg1); void on_CBReceiptsHeader_activated( const QString &argHeader );
void on_CBReplaceParticipantName_currentTextChanged(const QString &arg1); void on_CBzTreeVersion_activated( const QString &argVersion );
void on_CBzTreeVersion_activated(const QString &arg1);
void on_ChBPrintanonymousreceipts_clicked( bool checked ); void on_ChBPrintanonymousreceipts_clicked( bool checked );
void on_ChBReceiptsforLocalClients_clicked(bool checked); void on_ChBReceiptsforLocalClients_clicked(bool checked);
void on_PBStartzTree_clicked(); void on_PBStartzTree_clicked();

Loading…
Cancel
Save