|
Lines 272-282
const QValueList<int>&
Link Here
|
| 272 |
ProcessList::getSelectedPIds() |
272 |
ProcessList::getSelectedPIds() |
| 273 |
{ |
273 |
{ |
| 274 |
selectedPIds.clear(); |
274 |
selectedPIds.clear(); |
| 275 |
// iterate through all items of the listview and find selected processes |
275 |
// iterate through all selected visible items of the listview |
| 276 |
QListViewItemIterator it(this); |
276 |
QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected ); |
| 277 |
for ( ; it.current(); ++it ) |
277 |
for ( ; it.current(); ++it ) |
| 278 |
if (it.current()->isSelected()) |
278 |
selectedPIds.append(it.current()->text(1).toInt()); |
| 279 |
selectedPIds.append(it.current()->text(1).toInt()); |
|
|
| 280 |
|
279 |
|
| 281 |
return (selectedPIds); |
280 |
return (selectedPIds); |
| 282 |
} |
281 |
} |
|
Lines 285-298
const QStringList&
Link Here
|
| 285 |
ProcessList::getSelectedAsStrings() |
284 |
ProcessList::getSelectedAsStrings() |
| 286 |
{ |
285 |
{ |
| 287 |
selectedAsStrings.clear(); |
286 |
selectedAsStrings.clear(); |
| 288 |
// iterate through all items of the listview and find selected processes |
287 |
// iterate through all selected visible items of the listview |
| 289 |
QListViewItemIterator it(this); |
288 |
QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected ); |
| 290 |
QString spaces; |
289 |
QString spaces; |
| 291 |
for ( ; it.current(); ++it ) |
290 |
for ( ; it.current(); ++it ) { |
| 292 |
if (it.current()->isSelected()) { |
291 |
spaces.fill(QChar(' '), 7 - it.current()->text(1).length()); |
| 293 |
spaces.fill(QChar(' '), 7 - it.current()->text(1).length()); |
292 |
selectedAsStrings.append("(PID: " + it.current()->text(1) + ")" + spaces + " " + it.current()->text(0)); |
| 294 |
selectedAsStrings.append("(PID: " + it.current()->text(1) + ")" + spaces + " " + it.current()->text(0)); |
293 |
} |
| 295 |
} |
|
|
| 296 |
|
294 |
|
| 297 |
return (selectedAsStrings); |
295 |
return (selectedAsStrings); |
| 298 |
} |
296 |
} |
|
Lines 868-881
ProcessList::handleRMBPressed(QListViewI
Link Here
|
| 868 |
/* we go through list to get all task also |
866 |
/* we go through list to get all task also |
| 869 |
when update interval is paused */ |
867 |
when update interval is paused */ |
| 870 |
selectedPIds.clear(); |
868 |
selectedPIds.clear(); |
| 871 |
QListViewItemIterator it(this); |
869 |
QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected); |
| 872 |
|
870 |
|
| 873 |
// iterate through all items of the listview |
871 |
// iterate through all selected visible items of the listview |
| 874 |
for ( ; it.current(); ++it ) |
872 |
for ( ; it.current(); ++it ) |
| 875 |
{ |
873 |
{ |
| 876 |
if (it.current()->isSelected()) { |
874 |
selectedPIds.append(it.current()->text(1).toInt()); |
| 877 |
selectedPIds.append(it.current()->text(1).toInt()); |
|
|
| 878 |
} |
| 879 |
} |
875 |
} |
| 880 |
|
876 |
|
| 881 |
QString msg = i18n("Do you really want to send signal %1 to the selected process?", |
877 |
QString msg = i18n("Do you really want to send signal %1 to the selected process?", |