diff options
| author | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
|---|---|---|
| committer | Fabian Schillinger | 2010-11-01 16:53:24 +0100 |
| commit | 0d97a7378ffe5f6be408201cd1f5595607ed5f87 (patch) | |
| tree | 78ccd691a67c2f63f8fa4d1032d4cabfae0e80fa /src/gui/processesStartDialog.cpp | |
| parent | [PVSGUI] parsing cmdargs fixed (diff) | |
| download | pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.gz pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.tar.xz pvs-0d97a7378ffe5f6be408201cd1f5595607ed5f87.zip | |
Process start/stop/view functionality
processWidget - shows a list of processes on one client, allows to start ans stop processes
processesDialog - shows every processWidget as a tab
processesStartDialog - starts process entered in messageEdit
added handling of new pvscommands
Diffstat (limited to 'src/gui/processesStartDialog.cpp')
| -rw-r--r-- | src/gui/processesStartDialog.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/gui/processesStartDialog.cpp b/src/gui/processesStartDialog.cpp new file mode 100644 index 0000000..b4c8c79 --- /dev/null +++ b/src/gui/processesStartDialog.cpp @@ -0,0 +1,75 @@ +/* +# 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 +# +# 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/ +# ----------------------------------------------------------------------------- +# processesStartDialog.cpp + Dialog to get process to send to clients +# ----------------------------------------------------------------------------- +*/ + +#include "processesStartDialog.h" +#include "ui_processesStartDialog.h" +#include <src/gui/mainWindow.h> + +ProcessesStartDialog::ProcessesStartDialog(QWidget *parent) : + QDialog(parent) +{ + textLabel = new QLabel; + textLabel->setText("Process to start:"); + + messageEdit = new QLineEdit; + + layout = new QGridLayout; + + sendButton = new QPushButton(tr("Start")); + cancelButton = new QPushButton(tr("Cancel")); + + connect( sendButton, SIGNAL( clicked()), this, SLOT( send())); + connect( cancelButton, SIGNAL( clicked()), this, SLOT( NotSend())); + + layout->addWidget(textLabel,0,0); + layout->addWidget(messageEdit,1,0); + layout->addWidget(cancelButton,2,0); + layout->addWidget(sendButton,2,0); + + setLayout(layout); + setWindowTitle(tr("PVS start Process")); +} + +ProcessesStartDialog::~ProcessesStartDialog() +{ + //delete procstartui; +} + +void ProcessesStartDialog::send() +{ + QString procd = messageEdit->text(); + MainWindow::getWindow()->setProcessesDialog(procd); + messageEdit->clear(); + emit accept(); +} + +void ProcessesStartDialog::NotSend() +{ + messageEdit->clear(); + emit reject(); +} + +/*void ProcessesStartDialog::changeEvent(QEvent *e) +{ + //QDialog::changeEvent(e); + //switch (e->type()) { + //case QEvent::LanguageChange: + // procstartui->retranslateUi(this); + // break; + //default: + // break; + //} +}*/ |
