Merge branch 'central-widget'
[krunner.git] / krunnerapp.h
blob79eed3cd1873c0095f1f31d402eb92a6dab43ed6
1 /*
2 * Copyright (C) 2006 Aaron Seigo <aseigo@kde.org>
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
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
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.
19 #ifndef KRUNNERAPP_H
20 #define KRUNNERAPP_H
22 #include <kworkspace.h>
24 #include "restartingapplication.h"
25 #include "saverengine.h"
27 class KActionCollection;
28 class KDialog;
29 class Interface;
31 class KRunnerApp : public RestartingApplication
33 Q_OBJECT
34 public:
35 /* KRunnerApp(Display *display,
36 Qt::HANDLE visual = 0,
37 Qt::HANDLE colormap = 0);*/
38 KRunnerApp();
39 ~KRunnerApp();
41 void logout( KWorkSpace::ShutdownConfirm confirm, KWorkSpace::ShutdownType sdtype );
42 // The action collection of the active widget
43 KActionCollection *actionCollection();
45 virtual int newInstance();
46 SaverEngine& screensaver() { return m_saver; }
48 //UGLY
49 static bool s_haveCompositeManager;
51 public slots:
52 /** Show taskmanager */
53 void showTaskManager();
54 //void showWindowList();
56 void logout();
57 void logoutWithoutConfirmation();
58 void haltWithoutConfirmation();
59 void rebootWithoutConfirmation();
61 private slots:
62 /**
63 * Called when the task dialog emits its finished() signal
65 void taskDialogFinished();
67 private:
68 void initialize();
70 KActionCollection *m_actionCollection;
71 SaverEngine m_saver;
72 Interface* m_interface;
73 KDialog* m_tasks;
76 #endif /* KRUNNERAPP_H */