kopete/libkopete
#include <kopeteaddedinfoevent.h>

Public Types | |
enum | ShowAction { AddAction = 0x001, AuthorizeAction = 0x002, BlockAction = 0x004, InfoAction = 0x008, AddContactAction = 0x100, AllActions = 0x00F } |
Public Slots | |
virtual void | activate (uint actionId) |
virtual void | sendEvent () |
![]() | |
virtual void | activate (uint actionId) |
void | close () |
virtual void | sendEvent () |
Public Member Functions | |
AddedInfoEvent (const QString &contactId, Kopete::Account *account) | |
~AddedInfoEvent () | |
Kopete::Account * | account () const |
MetaContact * | addContact () const |
QString | contactId () const |
void | setContactNickname (const QString &nickname) |
void | showActions (ShowActionOptions actions) |
![]() | |
InfoEvent (QObject *parent=0) | |
~InfoEvent () | |
QMap< uint, QString > | actions () const |
void | addAction (uint actionId, const QString &actionText) |
QString | additionalText () const |
bool | isClosed () const |
void | setAdditionalText (const QString &text) |
void | setShowOnSend (bool showOnSend) |
void | setText (const QString &text) |
void | setTitle (const QString &title) |
bool | showOnSend () const |
QString | text () const |
QString | title () const |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Additional Inherited Members | |
![]() | |
void | actionActivated (uint actionId) |
void | changed () |
void | eventClosed (Kopete::InfoEvent *event) |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
objectName | |
Detailed Description
Event which is shown when a contact added you into the contact list or requested authorization.
This event allows the user to give authorization for the addition to the person who added the user and also allows the user to add the person into the user's contact list.
The title()
and text()
will be filled with predefined text. If you want to add additional information use setAdditionalText()
The actionActivated(uint)
signal can be emitted more than once. All AddedInfoEvent object will be closed and deleted automatically.
example of usage
and in your addedInfoEventActionActivated slot
Definition at line 67 of file kopeteaddedinfoevent.h.
Member Enumeration Documentation
All actions that may be shown and emitted.
Enumerator | |
---|---|
AddAction | |
AuthorizeAction |
Add action was activated. The default implementation shows ContactAddedNotifyDialog if activate(uint) isn't replaced |
BlockAction |
You should authorize the contact. |
InfoAction |
You should block this and future requests. |
AddContactAction |
You should show info about contact. |
AllActions |
You should add contact to Kopete contact list with |
Definition at line 74 of file kopeteaddedinfoevent.h.
Constructor & Destructor Documentation
Kopete::AddedInfoEvent::AddedInfoEvent | ( | const QString & | contactId, |
Kopete::Account * | account | ||
) |
Constructor.
- Parameters
-
contactId the contactId of the contact which has added you account the account which has generated this event
Definition at line 40 of file kopeteaddedinfoevent.cpp.
Kopete::AddedInfoEvent::~AddedInfoEvent | ( | ) |
Definition at line 50 of file kopeteaddedinfoevent.cpp.
Member Function Documentation
Kopete::Account * Kopete::AddedInfoEvent::account | ( | ) | const |
Return the account that has generated this event.
Definition at line 63 of file kopeteaddedinfoevent.cpp.
|
virtualslot |
Activate the action specified action.
Definition at line 78 of file kopeteaddedinfoevent.cpp.
MetaContact * Kopete::AddedInfoEvent::addContact | ( | ) | const |
create a metacontact.
This function only works if the AddContactAction action was activated, otherwise it will return 0L.
it uses the Account::addContact function to add the contact
- Returns
- the new metacontact created, or 0L if the operation failed.
Definition at line 112 of file kopeteaddedinfoevent.cpp.
QString Kopete::AddedInfoEvent::contactId | ( | ) | const |
Return the contactId of a contact which has added you.
Definition at line 58 of file kopeteaddedinfoevent.cpp.
|
virtualslot |
Emit the event.
Definition at line 120 of file kopeteaddedinfoevent.cpp.
void Kopete::AddedInfoEvent::setContactNickname | ( | const QString & | nickname | ) |
Set contact nickname.
- Parameters
-
nickname the nickname of the contact.
Definition at line 73 of file kopeteaddedinfoevent.cpp.
void Kopete::AddedInfoEvent::showActions | ( | ShowActionOptions | actions | ) |
Set which actions should be shown.
- Parameters
-
actions a bitmask of ShowAction used to show specific actions.
- Note
- by default everything is shown.
Definition at line 68 of file kopeteaddedinfoevent.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.