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/processesDialog.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/gui/processesDialog.cpp (limited to 'src/gui/processesDialog.cpp') diff --git a/src/gui/processesDialog.cpp b/src/gui/processesDialog.cpp new file mode 100644 index 0000000..d2ef7dc --- /dev/null +++ b/src/gui/processesDialog.cpp @@ -0,0 +1,62 @@ +/* +# Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg +# +# This program is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING +# +# If you have any feedback please consult http://openslx.org/feedback and +# send your suggestions, praise, or complaints to feedback@openslx.org +# +# General information about OpenSLX can be found at http://openslx.org/ +# ----------------------------------------------------------------------------- +# processesDialog.cpp + Dialog where a tab with running processes for every client is shown +# ----------------------------------------------------------------------------- +*/ + +#include "processesDialog.h" +#include "ui_processesDialog.h" +#include +//#include + +ProcessDialog::ProcessDialog(QDialog *parent) : + QDialog(parent), + procui(new Ui::ProcessesDialog) +{ + procui->setupUi(this); + + tWidget = new QTabWidget; + procui->grLayout->addWidget(tWidget); + + connect( tWidget, SIGNAL( currentChanged(int)), this, SLOT( currChanged())); + + std::list listAll = + PVSConnectionManager::getManager()->getConnections(); + for (std::list::iterator it = listAll.begin(); it + != listAll.end(); it++) + { + if (*it == NULL || (*it)->getConnectionFrame() == NULL) continue; + if ((*it)->getConnectionFrame()->getFrame() && + /*!(*it)->getConnectionFrame()->getFrame()->isDozent() &&*/ + (*it)->getVNCConnection()) + {tWidget->addTab(new ProcessWidget(0, *it), (*it)->getUserName()); + tWidget->addTab(new ProcessWidget(0, *it), (*it)->getUserName()); + tWidget->addTab(new ProcessWidget(0, *it), (*it)->getUserName());} + else if (!(*it)->getConnectionFrame()->getFrame()) + ConsoleLog writeError(QString("The Frame connection from client: "). + append((*it)->getConnectionFrame()->getTaskbarTitle()). + append(QString(" is corrupted. Reconnect the client it again."))); + } +} + +// if other Tab is activated we say our tab to refresh the processList +void ProcessDialog::currChanged() +{ + ProcessWidget *temp = static_cast(tWidget->currentWidget()); + temp->refrProcessList(); +} + +ProcessDialog::~ProcessDialog() +{ + delete procui; +} -- cgit v1.2.3-55-g7522