Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Contacts
Commits
0402c47c
Commit
0402c47c
authored
Feb 02, 2016
by
Laurent Montel
😁
Browse files
Add more object type
parent
b9bf2d00
Changes
2
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/editor/addresseditor/addressgrantleeobject.cpp
View file @
0402c47c
...
...
@@ -36,6 +36,17 @@ AddressGrantleeObject::~AddressGrantleeObject()
}
QString
AddressGrantleeObject
::
formattedAddress
()
const
{
QString
str
;
if
(
mAddress
.
label
().
isEmpty
())
{
str
=
mAddress
.
formattedAddress
().
trimmed
().
toHtmlEscaped
();
}
else
{
str
=
mAddress
.
label
().
toHtmlEscaped
();
}
return
str
;
}
QString
AddressGrantleeObject
::
removeAddressAction
()
const
{
//TODO
...
...
@@ -47,3 +58,14 @@ QString AddressGrantleeObject::modifyAddressAction() const
//TODO
return
{};
}
QString
AddressGrantleeObject
::
type
()
const
{
//TODO
return
{};
}
bool
AddressGrantleeObject
::
preferredAddress
()
const
{
return
(
mAddress
.
type
()
&
KContacts
::
Address
::
Pref
);
}
akonadi-contact/src/editor/addresseditor/addressgrantleeobject.h
View file @
0402c47c
...
...
@@ -30,12 +30,18 @@ class AddressGrantleeObject : public QObject
Q_OBJECT
Q_PROPERTY
(
QString
removeAddressAction
READ
removeAddressAction
)
Q_PROPERTY
(
QString
modifyAddressAction
READ
modifyAddressAction
)
Q_PROPERTY
(
QString
formattedAddress
READ
formattedAddress
)
Q_PROPERTY
(
QString
type
READ
type
)
Q_PROPERTY
(
bool
preferredAddress
READ
preferredAddress
)
public:
explicit
AddressGrantleeObject
(
const
KContacts
::
Address
&
address
,
int
addressIndex
,
QObject
*
parent
=
Q_NULLPTR
);
~
AddressGrantleeObject
();
QString
removeAddressAction
()
const
;
QString
modifyAddressAction
()
const
;
QString
formattedAddress
()
const
;
QString
type
()
const
;
bool
preferredAddress
()
const
;
private:
KContacts
::
Address
mAddress
;
int
mAddressIndex
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment