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
82fa598f
Commit
82fa598f
authored
Feb 02, 2016
by
Laurent Montel
😁
Browse files
Continue to implement it
parent
106b98ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
View file @
82fa598f
...
...
@@ -21,6 +21,9 @@
*/
#include "addresseslocationgrantleeformater.h"
#include "addressgrantleeobject.h"
#include <QVariantList>
AddressesLocationGrantleeFormater
::
AddressesLocationGrantleeFormater
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
@@ -35,6 +38,13 @@ AddressesLocationGrantleeFormater::~AddressesLocationGrantleeFormater()
QString
AddressesLocationGrantleeFormater
::
formatAddresses
(
const
KContacts
::
Address
::
List
&
addresses
)
{
QVariantList
addressList
;
const
int
nbAddress
(
addresses
.
count
());
addressList
.
reserve
(
nbAddress
);
for
(
int
i
=
0
;
i
<
nbAddress
;
++
i
)
{
AddressGrantleeObject
*
addressObj
=
new
AddressGrantleeObject
(
addresses
.
at
(
i
),
i
);
addressList
<<
QVariant
::
fromValue
(
static_cast
<
QObject
*>
(
addressObj
));
}
//TODO
return
QString
();
}
akonadi-contact/src/editor/addresseditor/addressgrantleeobject.cpp
View file @
82fa598f
...
...
@@ -22,9 +22,10 @@
#include "addressgrantleeobject.h"
AddressGrantleeObject
::
AddressGrantleeObject
(
const
KContacts
::
Address
&
address
,
QObject
*
parent
)
AddressGrantleeObject
::
AddressGrantleeObject
(
const
KContacts
::
Address
&
address
,
int
addressIndex
,
QObject
*
parent
)
:
QObject
(
parent
),
mAddress
(
address
)
mAddress
(
address
),
mAddressIndex
(
addressIndex
)
{
}
...
...
@@ -33,3 +34,15 @@ AddressGrantleeObject::~AddressGrantleeObject()
{
}
QString
AddressGrantleeObject
::
removeAddressAction
()
const
{
//TODO
return
{};
}
QString
AddressGrantleeObject
::
modifyAddressAction
()
const
{
//TODO
return
{};
}
akonadi-contact/src/editor/addresseditor/addressgrantleeobject.h
View file @
82fa598f
...
...
@@ -28,12 +28,17 @@
class
AddressGrantleeObject
:
public
QObject
{
Q_OBJECT
Q_PROPERTY
(
QString
removeAddressAction
READ
removeAddressAction
)
Q_PROPERTY
(
QString
modifyAddressAction
READ
modifyAddressAction
)
public:
explicit
AddressGrantleeObject
(
const
KContacts
::
Address
&
address
,
QObject
*
parent
=
Q_NULLPTR
);
explicit
AddressGrantleeObject
(
const
KContacts
::
Address
&
address
,
int
addressIndex
,
QObject
*
parent
=
Q_NULLPTR
);
~
AddressGrantleeObject
();
QString
removeAddressAction
()
const
;
QString
modifyAddressAction
()
const
;
private:
KContacts
::
Address
mAddress
;
int
mAddressIndex
;
};
#endif // ADDRESSGRANTLEEOBJECT_H
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