~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to krunner/ksystemactivitydialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 2007-2010 John Tapsell <johnflux@gmail.com>
 
3
 *
 
4
 *   This program is free software; you can redistribute it and/or modify
 
5
 *   it under the terms of the GNU Library General Public License version 2 as
 
6
 *   published by the Free Software Foundation
 
7
 *
 
8
 *   This program is distributed in the hope that it will be useful,
 
9
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 *   GNU General Public License for more details
 
12
 *
 
13
 *   You should have received a copy of the GNU Library General Public
 
14
 *   License along with this program; if not, write to the
 
15
 *   Free Software Foundation, Inc.,
 
16
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
17
 */
 
18
 
 
19
#ifndef KSYSTEMACTIVITYDIALOG__H
 
20
#define KSYSTEMACTIVITYDIALOG__H
 
21
 
 
22
#ifndef Q_WS_WIN
 
23
 
 
24
#include <KDialog>
 
25
 
 
26
#include "processui/ksysguardprocesslist.h"
 
27
 
 
28
/** This creates a simple dialog box with a KSysguardProcessList
 
29
 *
 
30
 *  It remembers the size and position of the dialog, and sets
 
31
 *  the dialog to always be over the other windows
 
32
 */
 
33
class KSystemActivityDialog : public KDialog
 
34
{
 
35
    public:
 
36
        KSystemActivityDialog(QWidget *parent = NULL);
 
37
 
 
38
        /** Show the dialog and set the focus
 
39
         *
 
40
         *  This can be called even when the dialog is already showing to bring it
 
41
         *  to the front again and move it to the current desktop etc.
 
42
         */
 
43
        void run();
 
44
 
 
45
        /** Set the text in the filter line in the process list widget */
 
46
        void setFilterText(const QString &filterText);
 
47
 
 
48
        /** Save the settings if the user presses the ESC key */
 
49
        virtual void reject();
 
50
 
 
51
    protected:
 
52
        /** Save the settings if the user clicks (x) button on the window */
 
53
        void closeEvent(QCloseEvent *event);
 
54
 
 
55
    private:
 
56
        void saveDialogSettings();
 
57
 
 
58
        KSysGuardProcessList m_processList;
 
59
};
 
60
#endif // not Q_WS_WIN
 
61
 
 
62
#endif // KSYSTEMACTIVITYDIALOG__H