diff options
Diffstat (limited to 'src/gui/processesDialog.cpp')
| -rw-r--r-- | src/gui/processesDialog.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
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 <src/gui/processWidget.h> -//#include <src/gui/mainWindow.h> -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<PVSClient*> listAll = @@ -35,15 +35,19 @@ ProcessDialog::ProcessDialog(QDialog *parent) : 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()) + //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; + } } } |
