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
2634c427
Commit
2634c427
authored
Feb 01, 2016
by
Laurent Montel
😁
Browse files
Start to add grantlee support
parent
46fbcfb3
Changes
5
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/CMakeLists.txt
View file @
2634c427
...
...
@@ -35,6 +35,7 @@ kconfig_add_kcfg_files(akonadicontact_actions_SRCS actions/contactactionssetting
set
(
akonadicontact_addresslocation_editor_SRCS
editor/addresseditor/addresslocationwidget.cpp
editor/addresseditor/addresseslocationviewer.cpp
editor/addresseditor/addresseslocationgrantleeformater.cpp
)
set
(
akonadicontact_editor_SRCS
...
...
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
0 → 100644
View file @
2634c427
/*
This file is part of Akonadi Contact.
Copyright (C) 2016 eyeOS S.L.U., a Telefonica company, sales@eyeos.com
Copyright (C) 2016 Laurent Montel <laurent.montel@kdab.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "addresseslocationgrantleeformater.h"
AddressesLocationGrantleeFormater
::
AddressesLocationGrantleeFormater
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
AddressesLocationGrantleeFormater
::~
AddressesLocationGrantleeFormater
()
{
}
QString
AddressesLocationGrantleeFormater
::
formatAddresses
(
const
KContacts
::
Address
::
List
&
addresses
)
{
//TODO
return
QString
();
}
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.h
0 → 100644
View file @
2634c427
/*
This file is part of Akonadi Contact.
Copyright (C) 2016 eyeOS S.L.U., a Telefonica company, sales@eyeos.com
Copyright (C) 2016 Laurent Montel <laurent.montel@kdab.com>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef ADDRESSESLOCATIONGRANTLEEFORMATER_H
#define ADDRESSESLOCATIONGRANTLEEFORMATER_H
#include <QObject>
#include <KContacts/Address>
class
AddressesLocationGrantleeFormater
:
public
QObject
{
Q_OBJECT
public:
explicit
AddressesLocationGrantleeFormater
(
QObject
*
parent
=
Q_NULLPTR
);
~
AddressesLocationGrantleeFormater
();
QString
formatAddresses
(
const
KContacts
::
Address
::
List
&
addresses
);
};
#endif // ADDRESSESLOCATIONGRANTLEEFORMATER_H
akonadi-contact/src/editor/addresseditor/addresseslocationviewer.cpp
View file @
2634c427
...
...
@@ -33,6 +33,19 @@ AddressesLocationViewer::~AddressesLocationViewer()
}
void
AddressesLocationViewer
::
updateView
()
{
//TODO
}
void
AddressesLocationViewer
::
addAddress
(
const
KContacts
::
Address
&
address
)
{
if
(
!
address
.
isEmpty
())
{
mAddresses
.
append
(
address
);
updateView
();
}
}
KContacts
::
Address
::
List
AddressesLocationViewer
::
addresses
()
const
{
return
mAddresses
;
...
...
akonadi-contact/src/editor/addresseditor/addresseslocationviewer.h
View file @
2634c427
...
...
@@ -35,10 +35,13 @@ public:
~
AddressesLocationViewer
();
void
addAddress
(
const
KContacts
::
Address
&
address
);
KContacts
::
Address
::
List
addresses
()
const
;
void
setAddresses
(
const
KContacts
::
Address
::
List
&
addresses
);
private:
void
updateView
();
KContacts
::
Address
::
List
mAddresses
;
};
...
...
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