summaryrefslogtreecommitdiffstats
path: root/src/gui/mainWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/mainWindow.cpp')
-rw-r--r--src/gui/mainWindow.cpp51
1 files changed, 46 insertions, 5 deletions
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp
index 10c64d6..815f001 100644
--- a/src/gui/mainWindow.cpp
+++ b/src/gui/mainWindow.cpp
@@ -32,6 +32,7 @@ using namespace std;
#include <src/gui/connectionList.h>
#include <src/gui/connectionWindow.h>
#include <src/gui/profileDialog.h>
+#include <src/gui/processesDialog.h>
//#include <src/gui/dialog.h>
#include <src/core/pvsConnectionManager.h>
#include <iostream>
@@ -108,6 +109,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionUnprojection, SIGNAL(triggered()), this, SLOT(unprojecttoolbar()));
connect(ui->actionDozent, SIGNAL(triggered()), this, SLOT(setdozenttoolbar()));
connect(ui->actionShowProcesses, SIGNAL(triggered()), this, SLOT(showProcesses()));
+ connect(ui->actionStartProcess, SIGNAL(triggered()), this, SLOT(startProcess()));
// Ui specific settings
@@ -133,6 +135,8 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionCreate_profile, SIGNAL(triggered()), this, SLOT(createProfile()));
connect(ui->actionShowProcesses, SIGNAL(triggered()), this, SLOT(showProcesses()));
ui->actionShowProcesses->setStatusTip(tr("Show Processes of the selected Client"));
+ connect(ui->actionStartProcess, SIGNAL(triggered()), this, SLOT(startProcess()));
+ ui->actionStartProcess->setStatusTip(tr("Starts Process on the selected Client(s)"));
connect(ui->actionShow_Username, SIGNAL(triggered()), this, SLOT(showusername()));
connect(ui->actionShow_Hostname_IP, SIGNAL(triggered()), this, SLOT(showip()));
@@ -769,13 +773,50 @@ void MainWindow::showProcesses()
{
std::list<QString>* selectedClients =
MainWindow::getConnectionList()->getSelectedClients();
- if (selectedClients->size() == 1)
+ if (selectedClients->size() >= 1)
+ {
+ ProcessDialog procDialog;
+ procDialog.exec();
+
+ }
+ else
+ {
+ QString
+ message =
+ QString(
+ tr(
+ "This operation can only be performed if you have selected at least one Client!"));
+ QMessageBox::information(this, "PVS", message);
+ }
+
+}
+
+
+/* Perform some action if actionStartProcess button was pressed
+ *
+ */
+void MainWindow::startProcess()
+{
+ std::list<QString>* selectedClients =
+ MainWindow::getConnectionList()->getSelectedClients();
+ if (selectedClients->size() >= 1)
{
// do stuff
- PVSClient * pvsClient =
+ /*PVSClient * pvsClient =
PVSConnectionManager::getManager()->getClientFromIp(
- selectedClients->front().toStdString().c_str());
- pvsClient->sendMessage(PVSCOMMAND, "SHOWPROCESSES", "");
+ selectedClients->front().toStdString().c_str());*/
+
+ ProcessesStartDialog procD;
+ QString myString = NULL;
+ int result = procD.exec();
+
+ if (result == 1)
+ {
+ myString = MainWindow::getWindow()->getProcessesDialog();
+ if(!myString.isEmpty())
+ MainWindow::getConnectionWindow()->commandStations("STARTPROCESS",myString);
+ }
+
}
else
{
@@ -783,7 +824,7 @@ void MainWindow::showProcesses()
message =
QString(
tr(
- "This operation can only be performed if you have selected a Client!"));
+ "This operation can only be performed if you have selected at least one Client!"));
QMessageBox::information(this, "PVS", message);
}
}