-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.cpp
31 lines (27 loc) · 1.39 KB
/
actions.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "actions.h"
#include "listprocmodel.h"
#include "procview.h"
#include "highlightdelegate.h"
Actions::Actions(QWidget *parent): QDialog(parent)
{
setupUi(this);
setUpdatesEnabled(true);
//QString partialprocessname = selectedprocess->text(); // get partial process name
auto procmodel = new ListProcModel(this); // get process table model
auto procview = new ProcessView(this); // get process table view
auto highlightdelegate=new HighLightDelegate(this);
procview->setItemDelegate(highlightdelegate);
procview->setModel(dynamic_cast<ListProcModel *>(procmodel));
procview->horizontalHeader()->setStretchLastSection(true);
proctablelayout->addWidget(procview);
killselectedbutton->blockSignals(true);
processnamefilter->blockSignals(true);
clearbutton->blockSignals(true);
connect(processnamefilter,SIGNAL(editingFinished()),procmodel,SLOT(addprocs())); // read processes from system upon entry of the process name filter
connect(clearbutton,SIGNAL(clicked()),procmodel,SLOT(clearkillselections()));
connect(killselectedbutton,SIGNAL(clicked()),procmodel,SLOT(killselectedprocs()));
killselectedbutton->blockSignals(false);
processnamefilter->blockSignals(false);
clearbutton->blockSignals(false);
//HighlightFoundProc *highlightproc=new HighlightFoundProc(processnamefilter->document());
}