Commit 7733f446 authored by Laurent Montel's avatar Laurent Montel 😁

Add support for phonenumber preferred

parent 9ddb1c56
......@@ -37,3 +37,8 @@ QString ContactGrantleePrintPhoneObject::number() const
{
return mPhoneNumber.number();
}
bool ContactGrantleePrintPhoneObject::preferred() const
{
return (mPhoneNumber.type() & KContacts::PhoneNumber::Pref);
}
......@@ -26,6 +26,7 @@ class ContactGrantleePrintPhoneObject : public QObject
Q_OBJECT
Q_PROPERTY(QString type READ type)
Q_PROPERTY(QString number READ number)
Q_PROPERTY(bool preferred READ preferred)
public:
explicit ContactGrantleePrintPhoneObject(const KContacts::PhoneNumber &phone, QObject *parent = Q_NULLPTR);
......@@ -33,6 +34,7 @@ public:
QString type() const;
QString number() const;
bool preferred() const;
private:
KContacts::PhoneNumber mPhoneNumber;
};
......
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