1/* This file is part of the KDE libraries
2 Copyright (C) 2006 Michaël Larouche <michael.larouche@kdemail.net>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; version 2
7 of the License.
8
9 This library 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 GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#ifndef KDEUI_KMESSAGEBOXMESSAGEHANDLER_H
20#define KDEUI_KMESSAGEBOXMESSAGEHANDLER_H
21
22#include <kdeui_export.h>
23#include <kmessage.h>
24
25#include <QtCore/QObject>
26
27class QWidget;
28class KMessageBoxMessageHandlerPrivate;
29/**
30 * @brief This is a convience KMessageHandler that use KMessageBox.
31 *
32 * @author Michaël Larouche <michael.larouche@kdemail.net>
33*/
34class KDEUI_EXPORT KMessageBoxMessageHandler : public QObject, public KMessageHandler
35{
36 Q_OBJECT
37public:
38 /**
39 * @brief Create a new KMessageBoxMessageHandler
40 * @param parent Parent widget to use for the KMessageBox.
41 */
42 explicit KMessageBoxMessageHandler(QWidget *parent = 0);
43
44 /**
45 * Destroys the KMessageBoxMessageHandler.
46 */
47 virtual ~KMessageBoxMessageHandler();
48
49 /**
50 * @copydoc KMessageHandler::message
51 */
52 virtual void message(KMessage::MessageType messageType, const QString &text, const QString &caption);
53
54private:
55 KMessageBoxMessageHandlerPrivate * const d;
56};
57
58#endif
59// kate: space-indent on; indent-width 4; encoding utf-8; replace-tabs on;
60