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.
22 #include <kworkspace.h>
24 #include <kuniqueapplication.h>
26 #include "saverengine.h"
29 class KActionCollection
;
40 class KRunnerApp
: public KUniqueApplication
43 Q_CLASSINFO("D-Bus Interface", "org.kde.krunner.App")
46 static KRunnerApp
* self();
49 void logout( KWorkSpace::ShutdownConfirm confirm
, KWorkSpace::ShutdownType sdtype
);
50 // The action collection of the active widget
51 KActionCollection
* actionCollection();
53 virtual int newInstance();
55 SaverEngine
& screensaver() { return m_saver
; }
58 bool hasCompositeManager() const;
61 //void showWindowList();
64 void logoutWithoutConfirmation();
65 void haltWithoutConfirmation();
66 void rebootWithoutConfirmation();
68 // DBUS interface. if you change these methods, you MUST run:
69 // qdbuscpp2xml -m krunnerapp.h -o org.kde.krunner.App.xml
70 Q_SCRIPTABLE
void initializeStartupNotification();
72 /** Show taskmanager */
73 Q_SCRIPTABLE
void showTaskManager();
75 /** Display the interface */
76 Q_SCRIPTABLE
void display();
78 /** Display the interface */
79 Q_SCRIPTABLE
void query(const QString
& term
);
81 /** Display the interface, using clipboard contents */
82 Q_SCRIPTABLE
void displayWithClipboardContents();
85 Q_SCRIPTABLE
void switchUser();
87 /** Clear the search history */
88 Q_SCRIPTABLE
void clearHistory();
92 * Called when the task dialog emits its finished() signal
94 void taskDialogFinished();
99 KRunnerApp(Display
*display
, Qt::HANDLE visual
= 0, Qt::HANDLE colormap
= 0);
102 Plasma::RunnerManager
*m_runnerManager
;
103 KActionCollection
*m_actionCollection
;
107 KRunnerDialog
*m_interface
;
109 StartupId
*m_startupId
;
112 #endif /* KRUNNERAPP_H */