diff options
| author | Sebastien Braun | 2010-11-10 01:47:26 +0100 |
|---|---|---|
| committer | Sebastien Braun | 2010-11-10 01:47:26 +0100 |
| commit | b2c87269579df6cdd10e4419e0817d6d829a302e (patch) | |
| tree | 70d93ceb460dc34b851fe928eedd71a8fffe1f6a /src/gui | |
| parent | Add Makefile to generate PDF from DIA figures and call pdflatex and (diff) | |
| parent | Merge branch 'master' of openslx.org:pvs (diff) | |
| download | pvs-b2c87269579df6cdd10e4419e0817d6d829a302e.tar.gz pvs-b2c87269579df6cdd10e4419e0817d6d829a302e.tar.xz pvs-b2c87269579df6cdd10e4419e0817d6d829a302e.zip | |
Merge branch 'master' of ssh://git.openslx.org/pvs
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/mainWindow.cpp | 74 | ||||
| -rw-r--r-- | src/gui/mainWindow.h | 11 | ||||
| -rw-r--r-- | src/gui/processWidget.cpp | 72 | ||||
| -rw-r--r-- | src/gui/processWidget.h | 5 | ||||
| -rw-r--r-- | src/gui/processesDialog.cpp | 39 | ||||
| -rw-r--r-- | src/gui/processesDialog.h | 4 | ||||
| -rw-r--r-- | src/gui/processesStartDialog.cpp | 142 | ||||
| -rw-r--r-- | src/gui/processesStartDialog.h | 21 | ||||
| -rw-r--r-- | src/gui/ui/mainwindow.ui | 5 | ||||
| -rw-r--r-- | src/gui/ui/mainwindowtouch.ui | 9 | ||||
| -rw-r--r-- | src/gui/ui/processWidget.ui | 12 | ||||
| -rw-r--r-- | src/gui/ui/processesDialog.ui | 2 | ||||
| -rw-r--r-- | src/gui/ui/processesStartDialog.ui | 193 |
13 files changed, 430 insertions, 159 deletions
diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp index 1376851..beb80f4 100644 --- a/src/gui/mainWindow.cpp +++ b/src/gui/mainWindow.cpp @@ -68,6 +68,8 @@ MainWindow::MainWindow(QWidget *parent) : _aboutDialog = new AboutDialog(this); + displayedClientNameEnum = 0; + PVSConnectionManager::getManager(); //set the maximum width for list content @@ -112,8 +114,6 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->actionProjection, SIGNAL(triggered()), this, SLOT(projecttoolbar())); 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 @@ -791,57 +791,47 @@ void MainWindow::unCloseUp(ConnectionFrame* connFrame) conWin->setCloseupFrame(NULL); } -/* Perform some action if actionShowProcesses button was pressed - * - */ +// Perform some action if actionShowProcesses button was pressed void MainWindow::showProcesses() { - std::list<QString>* selectedClients = - MainWindow::getConnectionList()->getSelectedClients(); - if (selectedClients->size() >= 1) + if (PVSConnectionManager::getManager()->getConnections().size() > 0) { - ProcessDialog procDialog; - procDialog.exec(); - + ProcessDialog procShowDialog(0,displayedClientNameEnum); + procShowDialog.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 - * - */ +// 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 = - PVSConnectionManager::getManager()->getClientFromIp( - selectedClients->front().toStdString().c_str());*/ - - ProcessesStartDialog procD; - QString myString = NULL; - int result = procD.exec(); - - if (result == 1) + ProcessesStartDialog procStartDialog; + procToStart = ""; + int result = procStartDialog.exec(); + if (result == 1) //if result == 1 we clicked send on our button then + //procToStart is set to the text that was given in our messageEdit { - myString = MainWindow::getWindow()->getProcessesDialog(); - if(!myString.isEmpty()) - MainWindow::getConnectionWindow()->commandStations("STARTPROCESS",myString); + std::list<QString>::iterator itSelected; + for (itSelected = selectedClients->begin(); itSelected != selectedClients->end(); + itSelected++) + { + std::list<PVSClient*> listAll = + PVSConnectionManager::getManager()->getConnections(); + for (std::list<PVSClient*>::iterator itAll = listAll.begin(); + itAll != listAll.end(); itAll++) + { + if ((*itSelected) == (*itAll)->getIp()) + { + (*itAll)->sendMessage(PVSCOMMAND, "STARTPROCESS", procToStart); + break; + } + } + } } - } else { @@ -901,6 +891,7 @@ void MainWindow::createProfile() void MainWindow::showusername() { + displayedClientNameEnum = 2; MainWindow::getConnectionList()->setColumnHidden(2, false); MainWindow::getConnectionList()->setColumnHidden(0, true); MainWindow::getConnectionList()->setColumnHidden(1, true); @@ -908,6 +899,7 @@ void MainWindow::showusername() void MainWindow::showname() { + displayedClientNameEnum = 0; MainWindow::getConnectionList()->setColumnHidden(0, false); MainWindow::getConnectionList()->setColumnHidden(1, true); MainWindow::getConnectionList()->setColumnHidden(2, true); @@ -915,6 +907,7 @@ void MainWindow::showname() void MainWindow::showip() { + displayedClientNameEnum = 1; MainWindow::getConnectionList()->setColumnHidden(1, false); MainWindow::getConnectionList()->setColumnHidden(2, true); MainWindow::getConnectionList()->setColumnHidden(0, true); @@ -1314,6 +1307,11 @@ void MainWindow::configureNetwork() } } +int MainWindow::getDisplayedClientNameEnum() +{ + return displayedClientNameEnum; +} + MainWindow* MainWindow::myself = NULL; ConnectionList* MainWindow::conList = NULL; ConnectionWindow* MainWindow::conWin = NULL; diff --git a/src/gui/mainWindow.h b/src/gui/mainWindow.h index 58787ed..272d057 100644 --- a/src/gui/mainWindow.h +++ b/src/gui/mainWindow.h @@ -96,8 +96,8 @@ public: void setMsgDialog(QString msgd){msgDialog = msgd;}; QString getMsgDialog(){return msgDialog;}; - void setProcessesDialog(QString procd){procDialog = procd;}; - QString getProcessesDialog(){return procDialog;}; + void setProcessesDialog(QString procd){procToStart = procd;}; + QString getProcessesDialog(){return procToStart;}; bool isLockAllStatus() { @@ -106,8 +106,6 @@ public: void appendLogMsg(); - - protected: void closeEvent(QCloseEvent *e); void changeEvent(QEvent *e); @@ -128,6 +126,8 @@ private: QString _sessionName; QString _profilName; + int displayedClientNameEnum; //to tell if username, loginname or ip is shown in clientList + QStringList _chatListClients; @@ -139,7 +139,7 @@ private: AboutDialog *_aboutDialog; QString msgDialog; - QString procDialog; + QString procToStart; bool bgimage; bool locked, locked1; bool force_square; @@ -188,6 +188,7 @@ public slots: void startChatDialog(); void showProcesses(); void startProcess(); + int getDisplayedClientNameEnum(); private slots: void onToggleLog(bool showtime); diff --git a/src/gui/processWidget.cpp b/src/gui/processWidget.cpp index 9b59b2a..38dd2ae 100644 --- a/src/gui/processWidget.cpp +++ b/src/gui/processWidget.cpp @@ -28,10 +28,11 @@ ProcessWidget::ProcessWidget(QWidget *parent, PVSClient *cl): client = cl; connect( prowui->startButton, SIGNAL( clicked()), this, SLOT( startProcess())); - connect( prowui->refreshButton, SIGNAL( clicked()), this, SLOT( refrProcessList())); + connect( prowui->refreshButton, SIGNAL( clicked()), this, SLOT( resendProcessList())); connect( prowui->stopButton, SIGNAL( clicked()), this, SLOT( stopProcess())); connect( client, SIGNAL( processVectorReady(bool)), this, SLOT( refrProcessList())); + //tell client we want to see his processes sendCommand("SHOWPROCESSES", ""); } @@ -39,7 +40,7 @@ void ProcessWidget::startProcess() { QMessageBox::StandardButton start = QMessageBox::question(0, tr("PVS Start Process"), tr("Do you want to start the process: ") + prowui->processLineEdit->text() + - tr(" on User '") + client->getDesktopName() + tr("' ?"), + tr(" on this Client?"), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok); if (start == QMessageBox::Ok) @@ -50,15 +51,33 @@ void ProcessWidget::startProcess() prowui->processLineEdit->clear(); } -void ProcessWidget::refrProcessList() +void ProcessWidget::resendProcessList() { + sendCommand("SHOWPROCESSES", ""); +} + +void ProcessWidget::refrProcessList(bool timerEvent) +{ + if (timerEvent) + { + if (prowui->processTable->selectedItems().length() > 0) + return; + else + { + resendProcessList(); + return; + } + } + + //remove every item of our list for(int i=prowui->processTable->rowCount(); i == 0; i--) { prowui->processTable->removeRow(i); } prowui->processTable->setRowCount(0); - QVector<QString> processes = client->getProcessesVector(); + //read every entry of the vector - split it - and put it to the list + QVector<QString> processes = client->getProcessesVector(); for (int i=0; i<processes.size(); i++) { prowui->processTable->setRowCount(i+1); @@ -68,22 +87,47 @@ void ProcessWidget::refrProcessList() prowui->processTable->setItem(i,j,new QTableWidgetItem(processesList.at(j),0)); } } - prowui->processTable->selectRow(0); } void ProcessWidget::stopProcess() { if (prowui->processTable->rowCount() > 0) { - QMessageBox::StandardButton start = QMessageBox::question(0, - tr("PVS Start Process"), tr("Do you want to stop the process: ") + prowui->processTable->item(prowui->processTable->currentRow(),1)->text() + - tr(" on User '") + client->getDesktopName() + tr("' ?"), - QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok); - if (start == QMessageBox::Ok) - { - sendCommand("KILLPROCESS", prowui->processTable->item(prowui->processTable->currentRow(),0)->text()); - sendCommand("SHOWPROCESSES", ""); - } + //get a list of all selected items + QList<QTableWidgetItem *> selectedItems = prowui->processTable->selectedItems(); + QList<int> rows; + for (int i=0;i<selectedItems.length();i++) + { + //only add rows one time + if (rows.indexOf(selectedItems.at(i)->row()) < 0) + rows.append(selectedItems.at(i)->row()); + } + //append names of processes + QString processesMessage = ""; + for (int i=0;i<rows.size();i++) + { + if (i==0) + processesMessage.append(QString(tr(" "))); + else + processesMessage.append(QString(tr(","))); + processesMessage.append(prowui->processTable->item(rows.at(i),1)->text()); + processesMessage.append(QString(tr(" "))); + } + + QMessageBox::StandardButton start = QMessageBox::question(0, + tr("PVS Start Process"), tr("Do you want to stop the process(es):") + processesMessage + + tr("on this Client?"), + QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok); + if (start == QMessageBox::Ok) + { + //send KILLPROCESS for every row + for (int i=0;i<rows.size();i++) + { + sendCommand("KILLPROCESS", prowui->processTable->item(rows.at(i),0)->text()); + } + } + //tell client to update his list + sendCommand("SHOWPROCESSES", ""); } } diff --git a/src/gui/processWidget.h b/src/gui/processWidget.h index 7e7eb72..4d696eb 100644 --- a/src/gui/processWidget.h +++ b/src/gui/processWidget.h @@ -17,9 +17,9 @@ class ProcessWidget: public QWidget public: ProcessWidget(QWidget *parent, PVSClient *client); ~ ProcessWidget(); - QAbstractItemModel *model; + public slots: - void refrProcessList(); + void refrProcessList(bool timerEvent = false); private: Ui::ProcessWidget *prowui; @@ -29,6 +29,7 @@ private: private slots: void startProcess(); void stopProcess(); + void resendProcessList(); void sendCommand(QString ident, QString message); }; diff --git a/src/gui/processesDialog.cpp b/src/gui/processesDialog.cpp index cda76ea..7c0405c 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,23 +35,38 @@ 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; + } } + + QTimer *refreshTimer = new QTimer(this); + connect(refreshTimer, SIGNAL(timeout()), this, SLOT(currRefr())); + refreshTimer->start(5000); + } // if other Tab is activated we say our tab to refresh the processList void ProcessDialog::currChanged() { ProcessWidget *temp = static_cast<ProcessWidget*>(tWidget->currentWidget()); - temp->refrProcessList(); + temp->refrProcessList(false); +} + +void ProcessDialog::currRefr() +{ + ProcessWidget *temp = static_cast<ProcessWidget*>(tWidget->currentWidget()); + temp->refrProcessList(true); } ProcessDialog::~ProcessDialog() diff --git a/src/gui/processesDialog.h b/src/gui/processesDialog.h index 9d98136..2c821fb 100644 --- a/src/gui/processesDialog.h +++ b/src/gui/processesDialog.h @@ -6,6 +6,7 @@ #include <src/gui/processWidget.h> #include <src/gui/mainWindow.h> #include <list> +#include <QTimer> namespace Ui { @@ -21,7 +22,7 @@ class MainWindow; class ProcessDialog : public QDialog { Q_OBJECT public: - ProcessDialog(QDialog *parent = 0); + ProcessDialog(QDialog *parent = 0, int displayedClientNameEnum = 0); ~ProcessDialog(); @@ -32,6 +33,7 @@ private: private slots: void currChanged(); + void currRefr(); }; #endif // PROCESSESDIALOG_H diff --git a/src/gui/processesStartDialog.cpp b/src/gui/processesStartDialog.cpp index b4c8c79..e0a6286 100644 --- a/src/gui/processesStartDialog.cpp +++ b/src/gui/processesStartDialog.cpp @@ -19,57 +19,127 @@ #include <src/gui/mainWindow.h> ProcessesStartDialog::ProcessesStartDialog(QWidget *parent) : - QDialog(parent) + QDialog(parent), + procStartUi(new Ui::ProcessesStartDialog) { - textLabel = new QLabel; - textLabel->setText("Process to start:"); + procStartUi->setupUi(this); + connect( procStartUi->sendButton, SIGNAL( clicked()), this, SLOT( send())); + connect( procStartUi->cancelButton, SIGNAL( clicked()), this, SLOT( notSend())); + connect( procStartUi->saveButton, SIGNAL( clicked()), this, SLOT ( save())); - messageEdit = new QLineEdit; + //if we click or double click one of our items we put it in our message + connect( procStartUi->processesList, SIGNAL( cellDoubleClicked(int,int)), this, SLOT ( itemClicked(int,int))); + connect( procStartUi->processesList, SIGNAL( cellClicked(int,int)), this, SLOT ( itemClicked(int,int))); - 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")); + listProcesses(); } ProcessesStartDialog::~ProcessesStartDialog() { - //delete procstartui; + // } void ProcessesStartDialog::send() { - QString procd = messageEdit->text(); - MainWindow::getWindow()->setProcessesDialog(procd); - messageEdit->clear(); - emit accept(); + QString procd = procStartUi->message->text(); + save(); //save (if we made changes to our list) + if (procd.length()>0) + { + QMessageBox::StandardButton start = QMessageBox::question(0, + tr("PVS Start Process"), tr("Do you want to start the process: ") + procd + + tr(" on the selected Clients?"), + QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok); + + if (start == QMessageBox::Ok) + { + //write name of process to setProcessesDialog + MainWindow::getWindow()->setProcessesDialog(procd); + procStartUi->message->clear(); + emit accept(); + } + } } -void ProcessesStartDialog::NotSend() +void ProcessesStartDialog::notSend() { - messageEdit->clear(); + procStartUi->message->clear(); emit reject(); } -/*void ProcessesStartDialog::changeEvent(QEvent *e) +void ProcessesStartDialog::listProcesses() { - //QDialog::changeEvent(e); - //switch (e->type()) { - //case QEvent::LanguageChange: - // procstartui->retranslateUi(this); - // break; - //default: - // break; - //} -}*/ + /*settings.beginWriteArray("RemoteProcessesList"); + settings.setArrayIndex(0); + settings.setValue("command", "oowriter"); + settings.setValue("description", "Open Office Writer"); + settings.setArrayIndex(1); + settings.setValue("command", "oocalc"); + settings.setValue("description", "Open Office Calc"); + settings.endArray();*/ + + //read from settings + int size = settings.beginReadArray("RemoteProcessesList"); + for (int i = 0; i < size; ++i) + { + settings.setArrayIndex(i); + procStartUi->processesList->setRowCount(i+1); + procStartUi->processesList->setItem(i, 0, new QTableWidgetItem(settings.value("command").toString(),0)); + procStartUi->processesList->setItem(i, 1, new QTableWidgetItem(settings.value("description").toString(),0)); + } + settings.endArray(); + + //add empty items to our List + QString empty = " "; + procStartUi->processesList->setRowCount(procStartUi->processesList->rowCount()+1); + procStartUi->processesList->setItem(procStartUi->processesList->rowCount()-1, 0, new QTableWidgetItem(empty,0)); + procStartUi->processesList->setItem(procStartUi->processesList->rowCount()-1, 1, new QTableWidgetItem(empty,0)); +} + +void ProcessesStartDialog::save() +{ + //if we delete items from our list we increment our decrement - to decrement our arrayindex + int decrement = 0; + + // if both our last elements are empty dont read them + // we need this if we have added new elements + if ((procStartUi->processesList->item(procStartUi->processesList->rowCount()-1, 0) != 0) && + (procStartUi->processesList->item(procStartUi->processesList->rowCount()-1, 1) != 0)) + { + settings.beginWriteArray("RemoteProcessesList"); + for (int i = 0; i < procStartUi->processesList->rowCount(); ++i) + { + //if elements are only whitespaces we ignore them + if ((procStartUi->processesList->item(i, 0)->text().remove(QRegExp("\\s")) != "") && + (procStartUi->processesList->item(i, 1)->text().remove(QRegExp("\\s")) != "")) + { + settings.setArrayIndex(i-decrement); + settings.setValue("command", procStartUi->processesList->item(i, 0)->text()); + settings.setValue("description", procStartUi->processesList->item(i, 1)->text()); + } else decrement++; //and increment our decrement + } + settings.endArray(); + } + else + { + settings.beginWriteArray("RemoteProcessesList"); + for (int i = 0; i < procStartUi->processesList->rowCount()-1; ++i) + { + if ((procStartUi->processesList->item(i, 0)->text().remove(QRegExp("\\s")) != "") && + (procStartUi->processesList->item(i, 1)->text().remove(QRegExp("\\s")) != "")) + { + settings.setArrayIndex(i-decrement); + settings.setValue("command", procStartUi->processesList->item(i, 0)->text()); + settings.setValue("description", procStartUi->processesList->item(i, 1)->text()); + } else decrement++; + } + settings.endArray(); + } + listProcesses(); +} + +void ProcessesStartDialog::itemClicked(int row, int column) +{ + //if last item exists we put it in our message + if (procStartUi->processesList->item(row, 0) != 0) + procStartUi->message->setText(procStartUi->processesList->item(row, 0)->text()); +} diff --git a/src/gui/processesStartDialog.h b/src/gui/processesStartDialog.h index 61aee4f..358a356 100644 --- a/src/gui/processesStartDialog.h +++ b/src/gui/processesStartDialog.h @@ -3,29 +3,30 @@ #include <QDialog> #include <QtGui> +#include "ui_processesStartDialog.h" +namespace Ui { + class ProcessesStartDialog; +} class MainWindow; - +class QDialog; class ProcessesStartDialog : public QDialog { Q_OBJECT public: ProcessesStartDialog(QWidget *parent = 0); ~ProcessesStartDialog(); -/*protected: - void changeEvent(QEvent *e);*/ - private: - QGridLayout *layout; - QLabel *textLabel; - QLineEdit *messageEdit; - QPushButton *sendButton; - QPushButton *cancelButton; + Ui::ProcessesStartDialog *procStartUi; + QSettings settings; private slots: void send(); - void NotSend(); + void notSend(); + void listProcesses(); + void save(); + void itemClicked(int row, int column); }; #endif // PROCESSESSTARTDIALOG_H diff --git a/src/gui/ui/mainwindow.ui b/src/gui/ui/mainwindow.ui index d444092..a9d5cad 100644 --- a/src/gui/ui/mainwindow.ui +++ b/src/gui/ui/mainwindow.ui @@ -557,7 +557,7 @@ <string>showProcesses</string> </property> <property name="toolTip"> - <string>Show Processes of the selected Client</string> + <string>Show processes of all clients</string> </property> </action> <action name="actionStartProcess"> @@ -568,6 +568,9 @@ <property name="text"> <string>Start Process</string> </property> + <property name="toolTip"> + <string>Start process on the selected client(s)</string> + </property> </action> </widget> <layoutdefault spacing="6" margin="11"/> diff --git a/src/gui/ui/mainwindowtouch.ui b/src/gui/ui/mainwindowtouch.ui index 3480f09..12a2f2b 100644 --- a/src/gui/ui/mainwindowtouch.ui +++ b/src/gui/ui/mainwindowtouch.ui @@ -28,8 +28,8 @@ <rect> <x>0</x> <y>0</y> - <width>1335</width> - <height>673</height> + <width>1329</width> + <height>660</height> </rect> </property> <layout class="QGridLayout" name="gridLayout_3"> @@ -648,7 +648,7 @@ <string>showProcesses</string> </property> <property name="toolTip"> - <string>Show Processes of the selected Client</string> + <string>Show processes of all clients</string> </property> </action> <action name="actionStartProcess"> @@ -659,6 +659,9 @@ <property name="text"> <string>Start Process</string> </property> + <property name="toolTip"> + <string>Start process on the selected client(s)</string> + </property> </action> </widget> <layoutdefault spacing="6" margin="11"/> diff --git a/src/gui/ui/processWidget.ui b/src/gui/ui/processWidget.ui index 3e7f55e..a759dc1 100644 --- a/src/gui/ui/processWidget.ui +++ b/src/gui/ui/processWidget.ui @@ -26,7 +26,7 @@ <item> <widget class="QGroupBox" name="groupBox_2"> <property name="title"> - <string>Prozessliste</string> + <string>List of processes</string> </property> <widget class="QWidget" name="verticalLayoutWidget"> <property name="geometry"> @@ -56,7 +56,7 @@ <bool>true</bool> </property> <property name="selectionMode"> - <enum>QAbstractItemView::SingleSelection</enum> + <enum>QAbstractItemView::ExtendedSelection</enum> </property> <property name="selectionBehavior"> <enum>QAbstractItemView::SelectRows</enum> @@ -147,14 +147,14 @@ <item> <widget class="QPushButton" name="refreshButton"> <property name="text"> - <string>Aktualisieren</string> + <string>Refresh</string> </property> </widget> </item> <item> <widget class="QPushButton" name="stopButton"> <property name="text"> - <string>Prozess beenden</string> + <string>Stop process</string> </property> </widget> </item> @@ -180,7 +180,7 @@ </size> </property> <property name="title"> - <string>Prozess starten</string> + <string>Start Process</string> </property> <widget class="QWidget" name="horizontalLayoutWidget"> <property name="geometry"> @@ -198,7 +198,7 @@ <item> <widget class="QPushButton" name="startButton"> <property name="text"> - <string>Prozess starten</string> + <string>Start Process</string> </property> </widget> </item> diff --git a/src/gui/ui/processesDialog.ui b/src/gui/ui/processesDialog.ui index 4ac4859..14d2403 100644 --- a/src/gui/ui/processesDialog.ui +++ b/src/gui/ui/processesDialog.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>Prozesse</string> + <string>Processes</string> </property> <widget class="QDialogButtonBox" name="buttonBox"> <property name="geometry"> diff --git a/src/gui/ui/processesStartDialog.ui b/src/gui/ui/processesStartDialog.ui index 5d8c7ee..2003c57 100644 --- a/src/gui/ui/processesStartDialog.ui +++ b/src/gui/ui/processesStartDialog.ui @@ -6,58 +6,191 @@ <rect> <x>0</x> <y>0</y> - <width>393</width> - <height>109</height> + <width>524</width> + <height>309</height> </rect> </property> <property name="windowTitle"> <string>Start Process</string> </property> - <widget class="QWidget" name="layoutWidget"> + <widget class="QWidget" name="verticalLayoutWidget_3"> <property name="geometry"> <rect> - <x>20</x> - <y>20</y> - <width>351</width> - <height>71</height> + <x>10</x> + <y>10</y> + <width>503</width> + <height>291</height> </rect> </property> - <layout class="QVBoxLayout" name="verticalLayout"> + <layout class="QVBoxLayout" name="outerVerticalLayout"> <item> - <widget class="QLineEdit" name="message"/> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <property name="spacing"> - <number>5</number> - </property> + <layout class="QVBoxLayout" name="upperVerticalLayout"> <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>108</width> - <height>20</height> - </size> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Either use a command from this list or type in the process in the lower field.</string> </property> - </spacer> + </widget> </item> <item> - <widget class="QPushButton" name="cancel"> - <property name="text"> - <string>Cancel</string> + <widget class="QTableWidget" name="processesList"> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAsNeeded</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="editTriggers"> + <set>QAbstractItemView::DoubleClicked|QAbstractItemView::SelectedClicked</set> + </property> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::SingleSelection</enum> + </property> + <property name="selectionBehavior"> + <enum>QAbstractItemView::SelectRows</enum> + </property> + <property name="gridStyle"> + <enum>Qt::DotLine</enum> + </property> + <property name="sortingEnabled"> + <bool>false</bool> + </property> + <property name="wordWrap"> + <bool>false</bool> </property> + <property name="cornerButtonEnabled"> + <bool>false</bool> + </property> + <attribute name="horizontalHeaderVisible"> + <bool>true</bool> + </attribute> + <attribute name="horizontalHeaderCascadingSectionResizes"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderDefaultSectionSize"> + <number>200</number> + </attribute> + <attribute name="horizontalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderStretchLastSection"> + <bool>true</bool> + </attribute> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderStretchLastSection"> + <bool>true</bool> + </attribute> + <attribute name="horizontalHeaderCascadingSectionResizes"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderVisible"> + <bool>true</bool> + </attribute> + <attribute name="horizontalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderDefaultSectionSize"> + <number>200</number> + </attribute> + <column> + <property name="text"> + <string>Command</string> + </property> + </column> + <column> + <property name="text"> + <string>Description</string> + </property> + </column> </widget> </item> <item> - <widget class="QPushButton" name="send"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="saveButton"> + <property name="text"> + <string>Save</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + <item> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="lowerVerticalLayout"> + <item> + <widget class="QLabel" name="label"> <property name="text"> - <string>Send</string> + <string>Process to start:</string> </property> </widget> </item> + <item> + <widget class="QLineEdit" name="message"/> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>5</number> + </property> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>108</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="cancelButton"> + <property name="text"> + <string>Cancel</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="sendButton"> + <property name="text"> + <string>Start</string> + </property> + </widget> + </item> + </layout> + </item> </layout> </item> </layout> |
