Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 571fc448 authored by Laurent Montel's avatar Laurent Montel 😁

Add support for languages

parent d238c531
......@@ -52,7 +52,7 @@ QString ContactGrantleePrintGeoObject::toString() const
{
QString result;
if (mGeo.isValid()) {
result = QString::fromLatin1("%1 %2, %3 %2").arg(mGeo.latitude()).arg(QChar(176)).arg(mCoordinates.longitude());
result = QString::fromLatin1("%1 %2, %3 %2").arg(mGeo.latitude()).arg(QChar(176)).arg(mGeo.longitude());
}
return result;
}
......
......@@ -24,6 +24,7 @@
#include <KABC/Address>
#include <KABC/PhoneNumber>
#include <kabc/lang.h>
#include <KLocalizedString>
#include <KGlobal>
#include <KLocale>
......@@ -117,6 +118,19 @@ QString ContactGrantleePrintObject::name() const
return mAddress.name();
}
QString ContactGrantleePrintObject::languages() const
{
QString result;
QStringList langList;
Q_FOREACH ( const KABC::Lang &lang, mAddress.langs() ) {
langList.append(lang.language());
}
if (!langList.isEmpty()) {
result = langList.join(QLatin1String(","));
}
return result;
}
QStringList ContactGrantleePrintObject::emails() const
{
QStringList emails;
......
......@@ -99,6 +99,7 @@ public:
QString manager() const;
QString assistant() const;
QString spouse() const;
QString languages() const;
private:
QString imgToDataUrl( const QImage &image ) const;
QList<QObject*> mListAddress;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment