delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kcmshell / main.h
blob515bb3285d8b4d0f2f0f7af8b75ab4288785b3ed
1 /*
2 Copyright (c) 2001 Waldo Bastian <bastian@kde.org>
3 Copyright (c) 2004 Frans Englich <frans.englich@telia.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 #ifndef MAIN_H
23 #define MAIN_H
25 #include <kapplication.h>
26 #include <kcmultidialog.h>
27 #include <kpagedialog.h>
29 /**
30 * The KApplication instance for kcmshell.
32 class KCMShell : public KApplication
34 Q_OBJECT
36 public:
38 /**
39 * Sets m_serviceName basically to @p serviceName,
40 * and then registers with D-BUS.
42 * @param serviceName name to set the D-BUS name to
44 void setServiceName(const QString &serviceName );
46 /**
47 * Waits until the last instance of kcmshell with the same
48 * module as this one exits, and then exits.
50 void waitForExit();
52 /**
53 * @return true if the shell is running
55 bool isRunning();
57 private Q_SLOTS:
59 /**
61 void appExit( const QString &appId, const QString &, const QString & );
63 private:
65 /**
66 * The D-Bus name which actually is registered.
67 * For example "kcmshell_mouse".
69 QString m_serviceName;
74 /**
75 * Essentially a plain KCMultiDialog, but has the additional functionality
76 * of allowing it to be told to request windows focus.
78 * @author Waldo Bastian <bastian@kde.org>
80 class KCMShellMultiDialog : public KCMultiDialog
82 Q_OBJECT
83 Q_CLASSINFO("D-Bus Interface", "org.kde.KCMShellMultiDialog")
85 public:
87 /**
88 * Constructor. Parameter @p dialogFace is passed to KCMultiDialog
89 * unchanged.
91 explicit KCMShellMultiDialog(KPageDialog::FaceType dialogFace, QWidget *parent = 0);
93 public Q_SLOTS:
95 /**
96 * Activate a module with id @p asn_id . This is used when
97 * black helicopters are spotted overhead.
99 virtual Q_SCRIPTABLE void activate( const QByteArray& asn_id );
103 // vim: sw=4 et sts=4
104 #endif // MAIN_H