1/*
2 * Copyright (C) 2010 Marco Martin <notmart@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 as
6 * published by the Free Software Foundation; either version 2, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19
20#ifndef PLASMA_DIALOGMANAGER_H
21#define PLASMA_DIALOGMANAGER_H
22
23#include <QtCore/QObject>
24
25#include <plasma/plasma_export.h>
26
27
28namespace Plasma
29{
30 class Applet;
31 class Corona;
32
33 class AbstractDialogManagerPrivate;
34
35/**
36 * @class AbstractDialogManager plasma/dialogmanager.h <Plasma/AbstractDialogManager>
37 *
38 * @short The AbstractDialogManager class shows the dialogs shown by applets and the rest of the shell.
39 * a AbstractDialogManager can manage aspects like positioning, sizing and widget style
40 * of dialogs sich as the applet configuration dialog.
41 * @since 4.5
42 */
43class PLASMA_EXPORT AbstractDialogManager : public QObject
44{
45 Q_OBJECT
46
47public:
48 explicit AbstractDialogManager(Plasma::Corona *parent=0);
49 ~AbstractDialogManager();
50
51public Q_SLOTS:
52 /**
53 * This fake virtual slot shows a dialog belonging to an applet.
54 * There is no guarantee how the implementation will show it
55 * @param widget the dialog widget
56 * @param applet the applet that owns the dialog
57 */
58 void showDialog(QWidget *widget, Plasma::Applet *applet);
59
60private:
61
62 AbstractDialogManagerPrivate * const d;
63};
64
65}
66
67#endif
68