Implement toggling countdown state.
This commit is contained in:
parent
1b01658732
commit
1246e6d1db
|
@ -64,7 +64,7 @@ void ConsoleReader::run()
|
|||
(*sockets) [number]->setCountDown(countdown);
|
||||
break;
|
||||
case 'C':
|
||||
(*sockets) [number]->setCountDown(countdown);
|
||||
(*sockets) [number]->toggleCountDown();
|
||||
break;
|
||||
case 'd':
|
||||
(*sockets) [number]->tableData();
|
||||
|
|
|
@ -161,6 +161,12 @@ void Socket::setCountDown(uint16_t countdown)
|
|||
writeSocketData(socketName, remotePassword, timeZone, countdown);
|
||||
}
|
||||
|
||||
void Socket::toggleCountDown()
|
||||
{
|
||||
countdownEnabled=!countdownEnabled;
|
||||
writeSocketData(socketName, remotePassword, timeZone, countdown);
|
||||
}
|
||||
|
||||
void Socket::writeSocketData(QByteArray socketName, QByteArray remotePassword, QByteArray timeZone, uint16_t countdown)
|
||||
{
|
||||
QByteArray countDown;
|
||||
|
|
Loading…
Reference in New Issue