Akonadi Contacts
addemailaddressjob.cpp
33 AddEmailAddressJobPrivate(AddEmailAddressJob *qq, const QString &emailString, QWidget *parentWidget)
72 KMessageBox::information(mParentWidget, text, QString(), QStringLiteral("alreadyInAddressBook"));
85 auto const addressBookJob = new Akonadi::CollectionFetchJob(Akonadi::Collection::root(), Akonadi::CollectionFetchJob::Recursive);
102 const Akonadi::CollectionFetchJob *addressBookJob = qobject_cast<Akonadi::CollectionFetchJob *>(job);
119 i18nc("@info", "You must create an address book before adding a contact. Do you want to create an address book?"),
163 QPointer<Akonadi::SelectAddressBookDialog> dlg = new Akonadi::SelectAddressBookDialog(mParentWidget);
227 QPointer<Akonadi::ContactEditorDialog> dlg = new Akonadi::ContactEditorDialog(Akonadi::ContactEditorDialog::EditMode, mParentWidget);
229 QObject::connect(dlg.data(), &Akonadi::ContactEditorDialog::contactStored, q, [this](const Akonadi::Item &item) {
232 QObject::connect(dlg.data(), &Akonadi::ContactEditorDialog::error, q, [this](const QString &str) {
245 KMessageBox::error(mParentWidget, i18n("Contact cannot be stored: %1", error), i18nc("@title:window", "Failed to store contact"));
265AddEmailAddressJob::AddEmailAddressJob(const QString &email, QWidget *parentWidget, QObject *parent)
278 searchJob->setQuery(Akonadi::ContactSearchJob::Email, d->mEmail.toLower(), Akonadi::ContactSearchJob::ExactMatch);
A job to add a new contact with a given email address to Akonadi.
Definition addemailaddressjob.h:28
~AddEmailAddressJob() override
Destroys the add email address job.
Akonadi::Item contact() const
Returns the item that represents the new contact.
Definition addemailaddressjob.cpp:284
AddEmailAddressJob(const QString &email, QWidget *parentWidget, QObject *parent=nullptr)
Creates a new add email address job.
Definition addemailaddressjob.cpp:265
bool isValid() const
Collection::List collections() const
bool isValid() const
static Collection root()
CanCreateItem
A dialog for creating or editing a contact in Akonadi.
Definition contacteditordialog.h:65
void error(const QString &errMsg)
This signal is emitted whenever a contact is not updated or stored.
void contactStored(const Akonadi::Item &contact)
This signal is emitted whenever a contact was updated or stored.
Job that searches for contacts in the Akonadi storage.
Definition contactsearchjob.h:69
void setQuery(Criterion criterion, const QString &value, Match match=ExactMatch)
Sets the criterion and value for the search with match.
Definition contactsearchjob.cpp:52
@ ExactMatch
The result must match exactly the pattern (case sensitive).
Definition contactsearchjob.h:102
KContacts::Addressee::List contacts() const
Returns the contacts that matched the search criteria.
Definition contactsearchjob.cpp:79
void setLimit(int limit)
Sets a limit on how many results will be returned by this search job.
Definition contactsearchjob.cpp:74
Item item() const
void setPayload(const T &p)
void setMimeType(const QString &mimeType)
The SelectAddressBookDialog class This class allows to select addressbook where saving contacts.
Definition selectaddressbookdialog.h:21
void setNameFromString(const QString &s)
void addEmail(const Email &email)
static QString mimeType()
AddresseeList List
static void parseEmailAddress(const QString &rawEmail, QString &fullName, QString &email)
static QString mimeType()
void setErrorText(const QString &errorText)
void emitResult()
int error() const
void result(KJob *job)
void setError(int errorCode)
virtual Q_SCRIPTABLE void start()=0
QString errorText() const
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
A widget for editing the display name of a contact.
void information(QWidget *parent, const QString &text, const QString &title=QString(), const QString &dontShowAgainName=QString(), Options options=Notify)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
ButtonCode questionTwoActions(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const QString &dontAskAgainName=QString(), Options options=Notify)
KGuiItem cancel()
void append(QList< T > &&value)
qsizetype size() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
T * data() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.