2 kopeteinfoevent.cpp - 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 #include "kopeteinfoevent.h"
17 #include "kopeteinfoeventmanager.h"
19 #include <QStringList>
25 class InfoEvent::Private
28 QMap
<uint
, QString
> actions
;
31 QString additionalText
;
35 InfoEvent::InfoEvent( QObject
*parent
)
36 : QObject( parent
), d( new Private
)
41 InfoEvent::~InfoEvent()
44 emit
eventClosed( this );
49 void InfoEvent::sendEvent()
51 InfoEventManager::self()->addEvent( this );
54 QString
InfoEvent::title() const
59 void InfoEvent::setTitle( const QString
& title
)
64 QString
InfoEvent::text() const
69 void InfoEvent::setText( const QString
& text
)
74 QString
InfoEvent::additionalText() const
76 return d
->additionalText
;
79 void InfoEvent::setAdditionalText( const QString
& text
)
81 d
->additionalText
= text
;
84 QMap
<uint
, QString
> InfoEvent::actions() const
89 void InfoEvent::addAction( uint actionId
, const QString
& actionText
)
91 d
->actions
[actionId
] = actionText
;
94 void InfoEvent::activate( uint actionId
)
96 emit
actionActivated( actionId
);
99 void InfoEvent::close()
103 kDebug( 14010 ) << "Closing more the once!!!";
108 emit
eventClosed( this );
114 #include "kopeteinfoevent.moc"