2 kopeteinfoevent.h - Kopete Info Event
4 Copyright (c) 2008 by Roman Jarosz <kedgedev@centrum.cz>
5 Kopete (c) 2008 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
9 * This library is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU Lesser General Public *
11 * License as published by the Free Software Foundation; either *
12 * version 2 of the License, or (at your option) any later version. *
14 *************************************************************************
16 #ifndef KOPETEINFOEVENT_H
17 #define KOPETEINFOEVENT_H
22 #include "kopete_export.h"
27 * Base class for all Info Events
29 * The info event will be shown in non-intrusive way
30 * to user in Kopete Main Window.
32 * You have to use sendEvent to show the event.
34 * The pointer is automatically deleted when the event is closed.
36 * @author Roman Jarosz <kedgedev@centrum.cz>
38 class KOPETE_EXPORT InfoEvent
: public QObject
42 InfoEvent( QObject
*parent
= 0 );
47 * @return the Info Event title
49 QString
title() const;
52 * Set the Info Event title.
53 * @param title the title
55 void setTitle( const QString
& title
);
58 * @return the Info Event text
63 * Set the Info Event text.
65 * The text is shown in a QLabel, you should make sure to escape any html that is needed.
66 * You can use some of the qt basic html tags.
68 * This text will also be shown in KNotification popup
70 * @param text the text
72 void setText( const QString
& text
);
75 * @return the additional text
77 QString
additionalText() const;
80 * Set the additional text.
82 * This is only shown in InfoEditWidget
84 * @param text the additional text
86 void setAdditionalText( const QString
& text
);
89 * @return the list of actions
91 QMap
<uint
, QString
> actions() const;
94 * Set the list of actions link.
95 * @param actions the list of actions
97 void addAction( uint actionId
, const QString
& actionText
);
103 virtual void sendEvent();
106 * Activate the action specified action
108 virtual void activate( uint actionId
);
111 * Close the info event.
113 * This will delete the info event.
119 * A action has been activated. This signal is only emitted if
120 * activate( uint ) is not replaced.
121 * @param actionId is the id of the activated action.
123 void actionActivated( uint actionId
);
126 * Emitted when the info event is closed.
128 void eventClosed( Kopete::InfoEvent
* event
);