From 98d31dde1d8c220bd3602d4751c24508a54e3fab Mon Sep 17 00:00:00 2001 From: Fabian Schillinger Date: Fri, 5 Nov 2010 02:03:45 +0100 Subject: Process start/stop/view functionality Cleanup write to logfiles if start/stop/view of processes failed added some prompts stop more then one process at the same time --- src/gui/processesDialog.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/gui/processesDialog.cpp') diff --git a/src/gui/processesDialog.cpp b/src/gui/processesDialog.cpp index cda76ea..49535d5 100644 --- a/src/gui/processesDialog.cpp +++ b/src/gui/processesDialog.cpp @@ -1,5 +1,5 @@ /* -# Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg +# Copyright (c) 2010 - OpenSLX Project, Computer Center University of Freiburg # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING @@ -17,9 +17,8 @@ #include "processesDialog.h" #include "ui_processesDialog.h" #include -//#include -ProcessDialog::ProcessDialog(QDialog *parent) : +ProcessDialog::ProcessDialog(QDialog *parent, int displayedClientNameEnum) : QDialog(parent), procui(new Ui::ProcessesDialog) { @@ -28,6 +27,7 @@ ProcessDialog::ProcessDialog(QDialog *parent) : tWidget = new QTabWidget; procui->grLayout->addWidget(tWidget); + //if we click on another tab we refresh the list of this client connect( tWidget, SIGNAL( currentChanged(int)), this, SLOT( currChanged())); std::list listAll = @@ -35,15 +35,19 @@ ProcessDialog::ProcessDialog(QDialog *parent) : 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()) + //display ip/login name/user name the same way we do in our clientlist + switch (displayedClientNameEnum) + { + case 1: + tWidget->addTab(new ProcessWidget(0, *it), (*it)->getIp()); + break; + case 2: + tWidget->addTab(new ProcessWidget(0, *it), (*it)->getLoginName()); + break; + default: 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."))); + break; + } } } -- cgit v1.2.3-55-g7522