-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added process list display in client view
- Loading branch information
Jacek Barc
committed
Sep 13, 2021
1 parent
b160ea1
commit 93a173d
Showing
8 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "runningprocesses.h" | ||
#include "ui_runningprocesses.h" | ||
|
||
RunningProcesses::RunningProcesses(QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::RunningProcesses) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
RunningProcesses::RunningProcesses(std::map<int, std::string> i_processesMap) : | ||
QDialog(nullptr), | ||
ui(new Ui::RunningProcesses) | ||
{ | ||
ui->setupUi(this); | ||
processesMap = i_processesMap; | ||
for (const auto& [key, value] : processesMap) { | ||
ui->listWidgetProcesses->addItem(QString::number(key) + " \t" + QString::fromStdString(value)); | ||
} | ||
} | ||
|
||
RunningProcesses::~RunningProcesses() | ||
{ | ||
delete ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef RUNNINGPROCESSES_H | ||
#define RUNNINGPROCESSES_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class RunningProcesses; | ||
} | ||
|
||
class RunningProcesses : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit RunningProcesses(QWidget *parent = nullptr); | ||
RunningProcesses(std::map<int, std::string> i_processesMap); | ||
~RunningProcesses(); | ||
|
||
private: | ||
Ui::RunningProcesses *ui; | ||
std::map<int, std::string> processesMap; | ||
}; | ||
|
||
#endif // RUNNINGPROCESSES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>RunningProcesses</class> | ||
<widget class="QDialog" name="RunningProcesses"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>488</width> | ||
<height>587</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<widget class="QDialogButtonBox" name="buttonBox"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>120</x> | ||
<y>550</y> | ||
<width>341</width> | ||
<height>32</height> | ||
</rect> | ||
</property> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="standardButtons"> | ||
<set>QDialogButtonBox::Close</set> | ||
</property> | ||
</widget> | ||
<widget class="QListWidget" name="listWidgetProcesses"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>20</x> | ||
<y>10</y> | ||
<width>441</width> | ||
<height>531</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>RunningProcesses</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>RunningProcesses</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters