• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • kdecore
  • io
kmessage.h
Go to the documentation of this file.
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 KDECORE_KMESSAGE_H
20#define KDECORE_KMESSAGE_H
21
22#include <kdecore_export.h>
23
24#include <QtCore/QString>
25
26class KMessageHandler;
49namespace KMessage
50{
51 enum MessageType
52 {
57 Error,
62 Information,
67 Warning,
72 Sorry,
77 Fatal
78 };
79
88 KDECORE_EXPORT void message(KMessage::MessageType messageType, const QString &text, const QString &caption = QString());
89
99 KDECORE_EXPORT void setMessageHandler(KMessageHandler *handler);
100}
101
113class KDECORE_EXPORT KMessageHandler
114{
115public:
116 virtual ~KMessageHandler() {}
125 virtual void message(KMessage::MessageType type, const QString &text, const QString &caption) = 0;
126};
127
128#endif
129// kate: space-indent on; indent-width 4; encoding utf-8; replace-tabs on;
KMessageHandler
Abstract class for KMessage handler.
Definition: kmessage.h:114
KMessageHandler::~KMessageHandler
virtual ~KMessageHandler()
Definition: kmessage.h:116
KMessageHandler::message
virtual void message(KMessage::MessageType type, const QString &text, const QString &caption)=0
Display a long message of a certain type.
QString
kdecore_export.h
KMessage
Display an informative message using a KMessageHandler.
Definition: kmessage.h:50
KMessage::MessageType
MessageType
Definition: kmessage.h:52
KMessage::Warning
@ Warning
Warning message.
Definition: kmessage.h:67
KMessage::Information
@ Information
Information message.
Definition: kmessage.h:62
KMessage::Sorry
@ Sorry
Sorry message.
Definition: kmessage.h:72
KMessage::Error
@ Error
Error message.
Definition: kmessage.h:57
KMessage::Fatal
@ Fatal
Fatal message.
Definition: kmessage.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal