2
KSysGuard, the KDE System Guard
4
Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
5
Copyright (c) 2006 John Tapsell <john.tapsell@kdemail.net>
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of version 2 of the GNU General Public
9
License as published by the Free Software Foundation.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
16
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
#ifndef PROCESSFILTER_H_
23
#define PROCESSFILTER_H_
25
#include <QSortFilterProxyModel>
27
#include <kdemacros.h>
31
class KDE_EXPORT ProcessFilter : public QSortFilterProxyModel
37
enum State {AllProcesses=0,AllProcessesInTreeForm, SystemProcesses, UserProcesses, OwnProcesses};
38
ProcessFilter(QObject *parent=0) : QSortFilterProxyModel(parent) {mFilter = AllProcesses;}
39
virtual ~ProcessFilter() {}
40
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
41
State filter() const {return mFilter; }
45
void setFilter(State index);
48
virtual bool filterAcceptsRow( int source_row, const QModelIndex & source_parent ) const;