From 98d31dde1d8c220bd3602d4751c24508a54e3fab Mon Sep 17 00:00:00 2001
From: Fabian Schillinger
Date: Fri, 5 Nov 2010 02:03:45 +0100
Subject: Process start/stop/view functionality Cleanup write to logfiles if
start/stop/view of processes failed added some prompts stop more then one
process at the same time
---
src/gui/ui/processWidget.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/gui/ui/processWidget.ui')
diff --git a/src/gui/ui/processWidget.ui b/src/gui/ui/processWidget.ui
index 3e7f55e..5ada967 100644
--- a/src/gui/ui/processWidget.ui
+++ b/src/gui/ui/processWidget.ui
@@ -56,7 +56,7 @@
true
- QAbstractItemView::SingleSelection
+ QAbstractItemView::ExtendedSelection
QAbstractItemView::SelectRows
--
cgit v1.2.3-55-g7522
From ded15ea687403e165914b746e948bce2cc78bc57 Mon Sep 17 00:00:00 2001
From: Fabian Schillinger
Date: Fri, 5 Nov 2010 11:14:22 +0100
Subject: Process start/stop/view functionality Cleanup
---
misc/pvs.conf | 2 ++
src/gui/processWidget.cpp | 16 ++++++++++++----
src/gui/processWidget.h | 2 +-
src/gui/processesDialog.cpp | 13 ++++++++++++-
src/gui/processesDialog.h | 2 ++
src/gui/ui/mainwindow.ui | 5 ++++-
src/gui/ui/mainwindowtouch.ui | 9 ++++++---
src/gui/ui/processWidget.ui | 10 +++++-----
src/pvs.cpp | 8 +++++++-
9 files changed, 51 insertions(+), 16 deletions(-)
(limited to 'src/gui/ui/processWidget.ui')
diff --git a/misc/pvs.conf b/misc/pvs.conf
index 93c4ac5..8e1f67c 100644
--- a/misc/pvs.conf
+++ b/misc/pvs.conf
@@ -7,3 +7,5 @@ vnc_other=no
allow_chat=T
allow_filetransfer=T
+[RemoteProcess]
+filter=pvs pvsgui pvsmgr x11vnc dbus
diff --git a/src/gui/processWidget.cpp b/src/gui/processWidget.cpp
index d61b42c..ac0b419 100644
--- a/src/gui/processWidget.cpp
+++ b/src/gui/processWidget.cpp
@@ -56,9 +56,19 @@ void ProcessWidget::resendProcessList()
sendCommand("SHOWPROCESSES", "");
}
-
-void ProcessWidget::refrProcessList()
+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--)
{
@@ -77,8 +87,6 @@ void ProcessWidget::refrProcessList()
prowui->processTable->setItem(i,j,new QTableWidgetItem(processesList.at(j),0));
}
}
- //select row 0
- prowui->processTable->selectRow(0);
}
void ProcessWidget::stopProcess()
diff --git a/src/gui/processWidget.h b/src/gui/processWidget.h
index 788c9e6..4d696eb 100644
--- a/src/gui/processWidget.h
+++ b/src/gui/processWidget.h
@@ -19,7 +19,7 @@ public:
~ ProcessWidget();
public slots:
- void refrProcessList();
+ void refrProcessList(bool timerEvent = false);
private:
Ui::ProcessWidget *prowui;
diff --git a/src/gui/processesDialog.cpp b/src/gui/processesDialog.cpp
index 49535d5..7c0405c 100644
--- a/src/gui/processesDialog.cpp
+++ b/src/gui/processesDialog.cpp
@@ -49,13 +49,24 @@ ProcessDialog::ProcessDialog(QDialog *parent, int displayedClientNameEnum) :
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(tWidget->currentWidget());
- temp->refrProcessList();
+ temp->refrProcessList(false);
+}
+
+void ProcessDialog::currRefr()
+{
+ ProcessWidget *temp = static_cast(tWidget->currentWidget());
+ temp->refrProcessList(true);
}
ProcessDialog::~ProcessDialog()
diff --git a/src/gui/processesDialog.h b/src/gui/processesDialog.h
index d2bcae1..2c821fb 100644
--- a/src/gui/processesDialog.h
+++ b/src/gui/processesDialog.h
@@ -6,6 +6,7 @@
#include
#include
#include
+#include
namespace Ui {
@@ -32,6 +33,7 @@ private:
private slots:
void currChanged();
+ void currRefr();
};
#endif // PROCESSESDIALOG_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 @@
showProcesses
- Show Processes of the selected Client
+ Show processes of all clients
@@ -568,6 +568,9 @@
Start Process
+
+ Start process on the selected client(s)
+
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 @@
0
0
- 1335
- 673
+ 1329
+ 660
@@ -648,7 +648,7 @@
showProcesses
- Show Processes of the selected Client
+ Show processes of all clients
@@ -659,6 +659,9 @@
Start Process
+
+ Start process on the selected client(s)
+
diff --git a/src/gui/ui/processWidget.ui b/src/gui/ui/processWidget.ui
index 5ada967..a759dc1 100644
--- a/src/gui/ui/processWidget.ui
+++ b/src/gui/ui/processWidget.ui
@@ -26,7 +26,7 @@
-
- Prozessliste
+ List of processes
@@ -147,14 +147,14 @@
-
- Aktualisieren
+ Refresh
-
- Prozess beenden
+ Stop process
@@ -180,7 +180,7 @@
- Prozess starten
+ Start Process
@@ -198,7 +198,7 @@
-
- Prozess starten
+ Start Process
diff --git a/src/pvs.cpp b/src/pvs.cpp
index 18b3570..8017d8b 100755
--- a/src/pvs.cpp
+++ b/src/pvs.cpp
@@ -940,6 +940,9 @@ QString PVS::getConfigValue(QString key)
void PVS::showProc()
{
+ QString settings = getConfigValue("RemoteProcess/filter");
+ QStringList filter = settings.split(" ");
+
//look at procfs
QDir procfs("/proc");
QStringList procList = procfs.entryList();
@@ -985,8 +988,11 @@ void PVS::showProc()
}
if (write)
{
- if ((name.startsWith("pvs")) || (name.startsWith("dbus")))
+ for (int i=0;i