diff options
| author | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
|---|---|---|
| committer | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
| commit | 0d97a7378ffe5f6be408201cd1f5595607ed5f87 (patch) | |
| tree | 78ccd691a67c2f63f8fa4d1032d4cabfae0e80fa /src/gui/processesDialog.cpp | |
| parent | [PVSGUI] parsing cmdargs fixed (diff) | |
| download | pvs-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/processesDialog.cpp')
| -rw-r--r-- | src/gui/processesDialog.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
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 <src/gui/processWidget.h> +//#include <src/gui/mainWindow.h> + +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<PVSClient*> listAll = + PVSConnectionManager::getManager()->getConnections(); + for (std::list<PVSClient*>::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<ProcessWidget*>(tWidget->currentWidget()); + temp->refrProcessList(); +} + +ProcessDialog::~ProcessDialog() +{ + delete procui; +} |
