Removed never properly implemented client webcam functionality

remotes/origin/HEAD
markuspg 10 years ago
parent 3959f20237
commit 1219c8f2d8

@ -4,14 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [2.0.0] - 2016-09-21
### Added
- Imported code from the lp:labcontrol repository on launchpad.net
## [Unreleased]
### Added
### Changed
### Fixed
### Removed
- Never properly implemented client webcam functionality
## [2.0.0] - 2016-09-21
### Added
- Imported code from the lp:labcontrol repository on launchpad.net
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v2.0.0...HEAD
[Unreleased]: https://github.com/markuspg/Labcontrol/compare/v2.0.0...HEAD

@ -13,8 +13,6 @@ client_macs=00:00:00:00:00:00|00:00:00:00:00:00|00:00:00:00:00:00|00:00:00:00:00
client_names=client01|client02|client03|client04|client05|client06|client07|client08|client09|client10|client11|client12|client13|client14|client15|client16|client17|client18|backupclient01|backupclient02|backupclient03|backupclient04|backupclient05|backupclient06
# This is just a hash to control the correct length of the other client attributes
client_quantity=24
# This should be set to 1, if a webcam is connected to a client
client_webcams=0|1|0|1|0|1|0|1|0|1|0|1|0|1|0|1|0|1|0|1|0|1|0|1
# The following two coordinates specify where the client will be shown in the coordinate grid at the bottom of the Labcontrol screen
client_xpos=1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24
client_ypos=1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1

@ -21,9 +21,8 @@
lc::Client::Client( QPlainTextEdit *argDebugMessagesTextEdit, QString *argIP, QString *argMAC,
QString *argName, unsigned short int argXPosition,
unsigned short int argYPosition, bool argHasWebcam,
unsigned short int argYPosition,
const QVector< QString* > * const argSettingsItems ):
hasWebcam{ argHasWebcam },
ip{ *argIP },
mac{ *argMAC },
name{ *argName },
@ -53,9 +52,9 @@ lc::Client::Client( QPlainTextEdit *argDebugMessagesTextEdit, QString *argIP, QS
pingTimer->start( 3000 );
}
debugMessagesTextEdit->appendPlainText( tr ( "[DEBUG] Created client %1\n\tMac: %2\tIP: %3\n\tPosition: %4x%5\t\tWebcam = %6" )
debugMessagesTextEdit->appendPlainText( tr ( "[DEBUG] Created client %1\n\tMac: %2\tIP: %3\n\tPosition: %4x%5" )
.arg( name ).arg( mac ).arg( ip ).arg( QString::number( xPosition ) )
.arg( QString::number( yPosition ) ).arg( QString::number( hasWebcam ) ) );
.arg( QString::number( yPosition ) ) );
}
lc::Client::~Client() {

@ -45,7 +45,6 @@ public slots:
void SetStateToZLEAF_RUNNING( QString argClientIP );
public:
const bool hasWebcam = false;
const QString ip;
const QString mac;
const QString name;
@ -60,10 +59,9 @@ public:
@param argName The hostname of the represented client
@param argXPosition The client's x coordinate in the lab
@param argYPosition The client's y coordinate in the lab
@param argHasWebcam If the represented client has a webcam installed
@param argSettingsItems A QVector storing many needed data QStrings
*/
Client( QPlainTextEdit *argDebugMessagesTextEditPtr, QString *argIP, QString *argMAC, QString *argName, unsigned short int argXPosition, unsigned short int argYPosition, bool argHasWebcam, const QVector< QString* > * const argSettingsItems );
Client( QPlainTextEdit *argDebugMessagesTextEditPtr, QString *argIP, QString *argMAC, QString *argName, unsigned short int argXPosition, unsigned short int argYPosition, const QVector< QString* > * const argSettingsItems );
//! Client's destructor
~Client();
//! Beams the chosen file to the client's 'media4ztree' directory

@ -306,14 +306,6 @@ void lc::Lablib::ReadSettings() {
return;
}
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] Client names: %1" ).arg( clientNames.join( " / " ) ) );
QStringList clientWebcams = labSettings.value( "client_webcams" ).toString().split( '|', QString::SkipEmptyParts, Qt::CaseSensitive );
if ( clientWebcams.length() != clientQuantity ) {
QMessageBox messageBox{ QMessageBox::Critical, tr( "Wrong client webcam property quantity" ),
tr( "The quantity of client webcam properties does not match the client quantity. Client creation will fail. No clients will be available for interaction." ), QMessageBox::Ok };
messageBox.exec();
return;
}
debugMessagesTextEdit->appendPlainText( tr( "[DEBUG] Client webcams: %1").arg( clientWebcams.join( " / " ) ) );
QStringList clientXPositions = labSettings.value( "client_xpos" ).toString().split( '|', QString::SkipEmptyParts, Qt::CaseSensitive );
if ( clientXPositions.length() != clientQuantity ) {
QMessageBox messageBox{ QMessageBox::Critical, tr( "Wrong client x positions quantity" ),
@ -334,7 +326,7 @@ void lc::Lablib::ReadSettings() {
clients = new QVector< Client* >;
for ( int i = 0; i < clientQuantity; i++ ) {
clients->append( new Client{ debugMessagesTextEdit, &clientIPs[ i ], &clientMACs[ i ], &clientNames[ i ], clientXPositions[ i ].toUShort(),
clientYPositions[ i ].toUShort(), clientWebcams[ i ].toInt(), settingsItems } );
clientYPositions[ i ].toUShort(), settingsItems } );
// Add an corresponding entry to the 'client_ips_to_clients_map' std::map<QString, Client*>
( *clientIPsToClientsMap )[ clients->last()->ip ] = clients->last();

@ -676,13 +676,6 @@ void lc::MainWindow::SetupWidgets() {
ui->CBWebcamChooser->addItem( s, QVariant( 0 ) );
}
// Append available client webcams to the 'CBWebcamChooser'
if ( !( clients == nullptr ) ) {
for ( auto *s : *clients ) {
if ( s->hasWebcam )
ui->CBWebcamChooser->addItem( s->name, QVariant( 1 ) );
}
}
// Deactivate the webcam choosing interface, if no webcams are available (none mounted at clients and none mounted in the laboratory)
if ( ui->CBWebcamChooser->count() == 1 ) {
ui->LWebcamChooser->setEnabled( false );

Loading…
Cancel
Save