Commit 06884f23 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

RecipientLineNG: expose new MultiplyingLine icon API

parent 764a0544
......@@ -94,6 +94,7 @@ RecipientLineNG::RecipientLineNG(QWidget *parent)
connect(mEdit, &RecipientLineEdit::focusUp, this, &RecipientLineNG::slotFocusUp);
connect(mEdit, &RecipientLineEdit::focusDown, this, &RecipientLineNG::slotFocusDown);
connect(mEdit, &RecipientLineEdit::rightPressed, this, &RecipientLineNG::rightPressed);
connect(mEdit, &RecipientLineEdit::iconClicked, this, &RecipientLineNG::iconClicked);
connect(mEdit, SIGNAL(leftPressed()), mCombo, SLOT(setFocus()));
connect(mEdit, &RecipientLineEdit::editingFinished, this, &RecipientLineNG::slotEditingFinished);
......@@ -267,3 +268,7 @@ Recipient::Ptr RecipientLineNG::recipient() const
return qSharedPointerDynamicCast<Recipient>(data());
}
void RecipientLineNG::setIcon(const QIcon &icon, const QString &tooltip)
{
mEdit->setIcon(icon, tooltip);
}
......@@ -61,7 +61,7 @@ protected:
void keyPressEvent(QKeyEvent *ev) Q_DECL_OVERRIDE;
};
class RecipientLineNG : public KPIM::MultiplyingLine
class MESSAGECOMPOSER_EXPORT RecipientLineNG : public KPIM::MultiplyingLine
{
Q_OBJECT
public:
......@@ -95,6 +95,8 @@ public:
Recipient::Type recipientType() const;
QSharedPointer<Recipient> recipient() const;
void setIcon(const QIcon &icon, const QString &tooltip = QString());
/**
* Sets the config file used for storing recent addresses.
*/
......@@ -104,6 +106,8 @@ Q_SIGNALS:
void typeModified(RecipientLineNG *);
void addRecipient(RecipientLineNG *, const QString &);
void countChanged();
void iconClicked();
protected Q_SLOTS:
void slotEditingFinished();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment