1/* This file is part of the KDE Libraries
2 * Copyright (C) 1998 Thomas Tanghus (tanghus@earthling.net)
3 * Additions 1999-2000 by Espen Sand (espen@kde.org)
4 * and Holger Freyther <freyther@kde.org>
5 * 2005-2006 Olivier Goffart <ogoffart @ kde.org>
6 * 2006 Tobias Koenig <tokoe@kde.org>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 */
23
24#ifndef KDIALOGQUEUE_H
25#define KDIALOGQUEUE_H
26
27/**
28 * \brief Queue for showing modal dialogs one after the other.
29 *
30 * This is useful if you want to show a modal dialog but are not in the
31 * position to start a new event loop at that point in your code.
32 *
33 * The disadvantage is that you will not be able to get any information from
34 * the dialog, so it can currently only be used for simple dialogs.
35 *
36 * You probably want to use KMessageBox::queueMessageBox() instead
37 * of this class directly.
38 *
39 * @author Waldo Bastian <bastian@kde.org>
40 */
41class KDialogQueue : public QObject
42{
43 Q_OBJECT
44
45 public:
46 static void queueDialog(QDialog *);
47
48 ~KDialogQueue();
49
50 protected:
51 KDialogQueue();
52 static KDialogQueue *self();
53
54 private:
55 Q_PRIVATE_SLOT(d, void slotShowQueuedDialog())
56
57 private:
58 class Private;
59 friend class Private;
60 Private* const d;
61
62 Q_DISABLE_COPY(KDialogQueue)
63};
64
65#endif
66
67