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;
38
class KSystemActivityDialog;
42
class KRunnerApp : public KUniqueApplication
45
Q_CLASSINFO("D-Bus Interface", "org.kde.krunner.App")
48
static KRunnerApp* self();
51
void logout( KWorkSpace::ShutdownConfirm confirm, KWorkSpace::ShutdownType sdtype );
52
// The action collection of the active widget
53
KActionCollection* actionCollection();
55
virtual int newInstance();
57
SaverEngine& screensaver() { return m_saver; }
60
bool hasCompositeManager() const;
63
// DBUS interface. if you change these methods, you MUST run:
64
// qdbuscpp2xml -m krunnerapp.h -o dbus/org.kde.krunner.App.xml
65
Q_SCRIPTABLE void initializeStartupNotification();
67
/** Show taskmanager */
68
Q_SCRIPTABLE void showTaskManager();
69
/** Show taskmanager, filtering by the given string */
70
Q_SCRIPTABLE void showTaskManagerWithFilter(const QString &filterText);
72
/** Display the interface */
73
Q_SCRIPTABLE void display();
75
/** Enter single runner query mode **/
76
Q_SCRIPTABLE void displaySingleRunner(const QString& runnerName);
78
/** Display the interface, using clipboard contents */
79
Q_SCRIPTABLE void displayWithClipboardContents();
81
/** Display the interface */
82
Q_SCRIPTABLE void query(const QString& term);
84
/** Enter single runner query mode **/
85
Q_SCRIPTABLE void querySingleRunner(const QString& runnerName, const QString &term);
88
Q_SCRIPTABLE void switchUser();
90
/** Clear the search history */
91
Q_SCRIPTABLE void clearHistory();
93
Q_SCRIPTABLE QStringList singleModeAdvertisedRunnerIds() const;
97
* Called when the task dialog emits its finished() signal
99
void taskDialogFinished();
102
void displayOrHide();
103
void singleRunnerModeActionTriggered();
109
Plasma::RunnerManager *m_runnerManager;
110
KActionCollection *m_actionCollection;
114
KRunnerDialog *m_interface;
115
PanelShadows *m_shadows;
116
KSystemActivityDialog *m_tasks;
117
StartupId *m_startupId;
121
#endif /* KRUNNERAPP_H */