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
380254bc
Commit
380254bc
authored
Feb 02, 2016
by
Laurent Montel
😁
Browse files
Install html file
parent
4e7135d2
Changes
5
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/src/CMakeLists.txt
View file @
380254bc
...
...
@@ -242,3 +242,5 @@ install( FILES
DESTINATION
${
KDE_INSTALL_INCLUDEDIR_KF5
}
/akonadi/contact COMPONENT Devel
)
add_subdirectory
(
editor/addresseditor/html
)
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
View file @
380254bc
...
...
@@ -24,14 +24,17 @@
#include "addressgrantleeobject.h"
#include <grantlee/engine.h>
#include <QVariantList>
#include <QStandardPaths>
AddressesLocationGrantleeFormater
::
AddressesLocationGrantleeFormater
(
QObject
*
parent
)
:
QObject
(
parent
),
mEngine
(
new
Grantlee
::
Engine
)
{
mTemplateLoader
=
QSharedPointer
<
Grantlee
::
FileSystemTemplateLoader
>
(
new
Grantlee
::
FileSystemTemplateLoader
);
QString
themePath
;
//TODO
changeGrantleePath
(
themePath
);
mGrantleeThemePath
=
QStandardPaths
::
locate
(
QStandardPaths
::
GenericDataLocation
,
QStringLiteral
(
"akonadicontact/grantleetheme/default/"
),
QStandardPaths
::
LocateDirectory
);
changeGrantleePath
(
mGrantleeThemePath
);
}
AddressesLocationGrantleeFormater
::~
AddressesLocationGrantleeFormater
()
...
...
@@ -48,8 +51,10 @@ QString AddressesLocationGrantleeFormater::formatAddresses(const KContacts::Addr
AddressGrantleeObject
*
addressObj
=
new
AddressGrantleeObject
(
addresses
.
at
(
i
),
i
);
addressList
<<
QVariant
::
fromValue
(
static_cast
<
QObject
*>
(
addressObj
));
}
//TODO
QVariantHash
addressHash
;
addressHash
.
insert
(
QStringLiteral
(
"addresses"
),
addressList
);
addressHash
.
insert
(
QStringLiteral
(
"absoluteThemePath"
),
mGrantleeThemePath
);
Grantlee
::
Context
context
(
addressHash
);
const
QString
contentHtml
=
mSelfcontainedTemplate
->
render
(
&
context
);
return
contentHtml
;
...
...
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.h
View file @
380254bc
...
...
@@ -44,6 +44,7 @@ private:
void
changeGrantleePath
(
const
QString
&
path
);
Grantlee
::
Engine
*
mEngine
;
QString
mErrorMessage
;
QString
mGrantleeThemePath
;
QSharedPointer
<
Grantlee
::
FileSystemTemplateLoader
>
mTemplateLoader
;
Grantlee
::
Template
mSelfcontainedTemplate
;
};
...
...
akonadi-contact/src/editor/addresseditor/html/CMakeLists.txt
0 → 100644
View file @
380254bc
install
(
DIRECTORY default DESTINATION
${
KDE_INSTALL_DATADIR
}
/akonadicontact/grantleetheme/
)
akonadi-contact/src/editor/addresseditor/html/addresseslocation.html
→
akonadi-contact/src/editor/addresseditor/html/
default/
addresseslocation.html
View file @
380254bc
File moved
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