/* # 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()); 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; }