summaryrefslogtreecommitdiffstats
path: root/src/gui/connectionWindow.cpp
diff options
context:
space:
mode:
authorFabian Schillinger2010-11-01 16:53:24 +0100
committerFabian Schillinger2010-11-01 16:53:24 +0100
commit0d97a7378ffe5f6be408201cd1f5595607ed5f87 (patch)
tree78ccd691a67c2f63f8fa4d1032d4cabfae0e80fa /src/gui/connectionWindow.cpp
parent[PVSGUI] parsing cmdargs fixed (diff)
downloadpvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.gz
pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.xz
pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.zip
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
Diffstat (limited to 'src/gui/connectionWindow.cpp')
-rw-r--r--src/gui/connectionWindow.cpp29
1 files changed, 29 insertions, 0 deletions
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<QString>* messageList = MainWindow::getConnectionList()->getSelectedClients()) {
+ if (!messageList->empty()) {
+ for (std::list<QString>::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)