make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / libkopete / kopeteinfoevent.h
blob27aa01472730aeac77f9691fb4b053f7f2641462
1 /*
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 *************************************************************************
8 * *
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. *
13 * *
14 *************************************************************************
16 #ifndef KOPETEINFOEVENT_H
17 #define KOPETEINFOEVENT_H
19 #include <QObject>
20 #include <QMap>
22 #include "kopete_export.h"
24 namespace Kopete {
26 /**
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
40 Q_OBJECT
41 public:
42 InfoEvent( QObject *parent = 0 );
44 ~InfoEvent();
46 /**
47 * @return the Info Event title
49 QString title() const;
51 /**
52 * Set the Info Event title.
53 * @param title the title
55 void setTitle( const QString& title );
57 /**
58 * @return the Info Event text
60 QString text() const;
62 /**
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 );
74 /**
75 * @return the additional text
77 QString additionalText() const;
79 /**
80 * Set the additional text.
82 * This is only shown in InfoEditWidget
84 * @param text the additional text
86 void setAdditionalText( const QString& text );
88 /**
89 * @return the list of actions
91 QMap<uint, QString> actions() const;
93 /**
94 * Set the list of actions link.
95 * @param actions the list of actions
97 void addAction( uint actionId, const QString& actionText );
99 public Q_SLOTS:
101 * Emit the event.
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.
115 void close();
117 Q_SIGNALS:
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 );
130 private:
131 class Private;
132 Private *d;
138 #endif