Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Mail-related libraries
Commits
403e3052
Commit
403e3052
authored
Mar 22, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new email list
parent
b994bb43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
...sbookgrantlee/src/printing/contactgrantleeprintobject.cpp
+13
-0
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.h
...essbookgrantlee/src/printing/contactgrantleeprintobject.h
+3
-0
No files found.
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.cpp
View file @
403e3052
...
...
@@ -22,6 +22,7 @@
#include "contactgrantleeprintgeoobject.h"
#include "contactgrantleeprintcryptoobject.h"
#include "contactgrantleeprintwebsite.h"
#include "contactgrantleeprintemail.h"
#include <KContacts/PhoneNumber>
...
...
@@ -54,6 +55,12 @@ ContactGrantleePrintObject::ContactGrantleePrintObject(const KContacts::Addresse
mListPhones
<<
new
ContactGrantleePrintPhoneObject
(
phone
);
}
const
auto
emails
=
address
.
emailList
();
mListEmails
.
reserve
(
emails
.
size
());
Q_FOREACH
(
const
KContacts
::
Email
&
email
,
emails
)
{
mListEmails
<<
new
ContactGrantleePrintEmail
(
mAddress
,
email
);
}
const
QStringList
customs
=
mAddress
.
customs
();
if
(
!
customs
.
empty
())
{
...
...
@@ -78,6 +85,7 @@ ContactGrantleePrintObject::~ContactGrantleePrintObject()
qDeleteAll
(
mListPhones
);
qDeleteAll
(
mListIm
);
qDeleteAll
(
mListWebSite
);
qDeleteAll
(
mListEmails
);
delete
mCryptoObject
;
}
...
...
@@ -207,6 +215,11 @@ QVariant ContactGrantleePrintObject::webSites() const
return
QVariant
::
fromValue
(
mListWebSite
);
}
QVariant
ContactGrantleePrintObject
::
emailsList
()
const
{
return
QVariant
::
fromValue
(
mListEmails
);
}
QVariant
ContactGrantleePrintObject
::
phones
()
const
{
return
QVariant
::
fromValue
(
mListPhones
);
...
...
kaddressbookgrantlee/src/printing/contactgrantleeprintobject.h
View file @
403e3052
...
...
@@ -65,6 +65,7 @@ class ContactGrantleePrintObject : public QObject
Q_PROPERTY
(
QString
spouse
READ
spouse
)
Q_PROPERTY
(
QString
languages
READ
languages
)
Q_PROPERTY
(
QVariant
webSites
READ
webSites
)
Q_PROPERTY
(
QVariant
emailsList
READ
emailsList
)
//Add more functions
public:
...
...
@@ -107,12 +108,14 @@ public:
QString
spouse
()
const
;
QString
languages
()
const
;
QVariant
webSites
()
const
;
QVariant
emailsList
()
const
;
private:
QString
imgToDataUrl
(
const
QImage
&
image
)
const
;
QList
<
QObject
*>
mListAddress
;
QList
<
QObject
*>
mListPhones
;
QList
<
QObject
*>
mListIm
;
QList
<
QObject
*>
mListWebSite
;
QList
<
QObject
*>
mListEmails
;
ContactGrantleePrintGeoObject
*
mGeoObject
;
ContactGrantleePrintCryptoObject
*
mCryptoObject
;
KContacts
::
Addressee
mAddress
;
...
...
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