From 0d97a7378ffe5f6be408201cd1f5595607ed5f87 Mon Sep 17 00:00:00 2001 From: Fabian Schillinger Date: Mon, 1 Nov 2010 16:53:24 +0100 Subject: Process start/stop/view functionality processWidget - shows a list of processes on one client, allows to start ans stop processes processesDialog - shows every processWidget as a tab processesStartDialog - starts process entered in messageEdit added handling of new pvscommands --- src/gui/connectionWindow.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/gui/connectionWindow.cpp') diff --git a/src/gui/connectionWindow.cpp b/src/gui/connectionWindow.cpp index cf51051..df31562 100644 --- a/src/gui/connectionWindow.cpp +++ b/src/gui/connectionWindow.cpp @@ -472,6 +472,35 @@ void ConnectionWindow::messageStation(QString ident, QString message, pvsCon->sendMessage(PVSMESSAGE, ident, message); } +/* + * to send COMMAND instead of PVSMESSaGE + */ +bool ConnectionWindow::commandStations(QString ident, QString message) { + if (std::list* messageList = MainWindow::getConnectionList()->getSelectedClients()) { + if (!messageList->empty()) { + for (std::list::iterator tmpIt = messageList->begin(); tmpIt + != messageList->end(); tmpIt++) { + PVSClient + * tmpConnection = + PVSConnectionManager::getManager()->getClientFromIp( + (*tmpIt).toUtf8().data()); + // we don't want to lock the dozent machine + if (tmpConnection && tmpConnection->getConnectionFrame()->getFrame() && + !tmpConnection->getConnectionFrame()->getFrame()->isDozent()) + { + //messageStation(ident, message, tmpConnection); + tmpConnection->sendMessage(PVSCOMMAND, ident, message); + } else { + // scream in agony + } + } + } + delete messageList; + } + return true; +} + + bool ConnectionWindow::lockStationsWithMessage(QString message) { if (!hasDozent) -- cgit v1.2.3-55-g7522