kopete/libkopete
#include <contactaddednotifydialog.h>
Public Types | |
enum | HideWidget { DefaultHide = 0x00, InfoButton = 0x01, AuthorizeCheckBox = 0x02, AddCheckBox = 0x04, AddGroupBox = 0x08 } |
Public Slots | |
MetaContact * | addContact () const |
Signals | |
void | applyClicked (const QString &contactId) |
void | infoClicked (const QString &contactId) |
Public Member Functions | |
ContactAddedNotifyDialog (const QString &contactId, const QString &contactNick=QString::null, Kopete::Account *account=0L, const HideWidgetOptions &hide=DefaultHide) | |
~ContactAddedNotifyDialog () | |
bool | added () const |
bool | authorized () const |
QString | displayName () const |
Group * | group () const |
Detailed Description
Dialog which is shown when a contact added you in the contact list.
This dialog asks the user to give authorization for the addition to the person who added the user and also asks the user if the contact who you've received the notification for should be added to the user's contact list
example of usage
and in your contactAddedDialogApplied slot
Note that you can also use exec() but this is not recommended
Definition at line 69 of file contactaddednotifydialog.h.
Member Enumeration Documentation
All widget in the dialog that may be hidden.
Definition at line 76 of file contactaddednotifydialog.h.
Constructor & Destructor Documentation
|
explicit |
Constructor.
The dialog is by default not modal, and will delete itself when closed
- Parameters
-
contactId the contactId of the contact which just added the user contactNick the nickname of the contact if available. account is used to display the account icon and informaiton about the account hide a bitmask of HideWidget used to hide some widget. By default, everything is shown.
Definition at line 54 of file contactaddednotifydialog.cpp.
Kopete::UI::ContactAddedNotifyDialog::~ContactAddedNotifyDialog | ( | ) |
Destructor.
Definition at line 110 of file contactaddednotifydialog.cpp.
Member Function Documentation
|
slot |
create a metacontact.
This function only works if the add checkbox is checked, 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 140 of file contactaddednotifydialog.cpp.
bool Kopete::UI::ContactAddedNotifyDialog::added | ( | ) | const |
return if the user has checked the "add" checkbox
- Returns
- true if the add checkbox is checked, false otherwise
Definition at line 116 of file contactaddednotifydialog.cpp.
|
signal |
the dialog has been applied
- Parameters
-
contactId is the id of the contact passed in the constructor.
bool Kopete::UI::ContactAddedNotifyDialog::authorized | ( | ) | const |
return if the user has checked the "authorize" checkbox
- Returns
- true if the authorize checkbox is checked, false otherwise
Definition at line 121 of file contactaddednotifydialog.cpp.
QString Kopete::UI::ContactAddedNotifyDialog::displayName | ( | ) | const |
return the display name the user has entered
Definition at line 126 of file contactaddednotifydialog.cpp.
Group * Kopete::UI::ContactAddedNotifyDialog::group | ( | ) | const |
return the group the user has selected
If the user has entered a group which doesn't exist yet, it will be created now
Definition at line 131 of file contactaddednotifydialog.cpp.
|
signal |
the button "info" has been pressed If you haven't hidden the more info button, you should connect this signal to a slot which show a dialog with more info about the contact.
hint: you can use sender() as parent of the new dialog
- Parameters
-
contactId is the id of the contact passed in the constructor.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.