summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohann Latocha2011-06-04 12:36:31 +0200
committerJohann Latocha2011-06-04 12:36:31 +0200
commit4b243af3de3ff2534a0d87225f52074490bdf8fd (patch)
tree673eaa89cfc8e19f49e35ae8299913212b71d7a1
parent[PVS] VNCpasswd bug fixed (diff)
downloadpvs-4b243af3de3ff2534a0d87225f52074490bdf8fd.tar.gz
pvs-4b243af3de3ff2534a0d87225f52074490bdf8fd.tar.xz
pvs-4b243af3de3ff2534a0d87225f52074490bdf8fd.zip
Enhancement #831
-rw-r--r--src/gui/connectionFrame.cpp5
-rw-r--r--src/gui/connectionFrame.h1
-rw-r--r--src/gui/connectionList.cpp14
-rw-r--r--src/gui/projectionDialog.cpp8
4 files changed, 20 insertions, 8 deletions
diff --git a/src/gui/connectionFrame.cpp b/src/gui/connectionFrame.cpp
index 32e20f7..f927706 100644
--- a/src/gui/connectionFrame.cpp
+++ b/src/gui/connectionFrame.cpp
@@ -490,6 +490,11 @@ void ConnectionFrame::setDozent(bool isDozent)
_dozentContaimner->setDisabled(true);
}
+bool ConnectionFrame::isDozent()
+{
+ return _dozentContaimner->isEnabled();
+}
+
void ConnectionFrame::on_click()
{
//std::cout << "HALLO! WAS?" << std::endl;
diff --git a/src/gui/connectionFrame.h b/src/gui/connectionFrame.h
index fe6dc95..3b6d49a 100644
--- a/src/gui/connectionFrame.h
+++ b/src/gui/connectionFrame.h
@@ -49,6 +49,7 @@ public:
void setInitSize(int w, int h);
void Resize(int w, int h);
void initFrame();
+ bool isDozent();
int getPrevWidth(){return prev_width;};
void setPrevWidth(int w){prev_width = w;}
diff --git a/src/gui/connectionList.cpp b/src/gui/connectionList.cpp
index f0fb7d6..991ad26 100644
--- a/src/gui/connectionList.cpp
+++ b/src/gui/connectionList.cpp
@@ -571,16 +571,14 @@ QList<QString> ConnectionList::getTargetToDisplay(QString source)
projectList.clear();
for (int i=0; i<model->rowCount(QModelIndex()); i++)
- {
- QString item = model->index(i, 1, QModelIndex()).data(Qt::DisplayRole).toString();
- if (item.compare(source) != 0 && !targetList.contains(item) && !sourceList.contains(item))
- {
+ {
+ QString item = model->index(i, 1, QModelIndex()).data(Qt::DisplayRole).toString();
+ if (item.compare(source) != 0 && !targetList.contains(item) && !sourceList.contains(item))
+ {
displayList.append(item);
- }
- }
-
+ }
+ }
return displayList;
-
}
void ConnectionList::addTargetToProjectList(QString name)
diff --git a/src/gui/projectionDialog.cpp b/src/gui/projectionDialog.cpp
index c091f54..5339df0 100644
--- a/src/gui/projectionDialog.cpp
+++ b/src/gui/projectionDialog.cpp
@@ -51,9 +51,17 @@ void ProjectionDialog::setupContent(QList<QString> content)
{
if (!content.isEmpty())
{
+ // get a list of all dozent machines
+ QStringList dozentList;
+ QList<ConnectionFrame*> clients = MainWindow::getConnectionWindow()->getAllFrameOnWindow();
+ foreach (ConnectionFrame *client, clients)
+ if (client->isDozent())
+ dozentList.append(client->getTaskbarTitle());
+
QString item;
foreach(item, content)
{
+ if (dozentList.contains(item)) item.append(" (Tutor PC)");
QCheckBox *checkbox = new QCheckBox(item,this);
pui->verticalLayout_2->addWidget(checkbox);
checkList.push_back(checkbox);