summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-07 20:41:40 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-07 20:41:40 (GMT)
commit86623cc734aa0255beb7cf51046f28316c218246 (patch)
tree650a72e1a69df1cab65d95f91d7d3d5ac59e5bb3
parent157be4b5da42130469a192766cc6d66e67aad73d (diff)
Add more plugins
-rw-r--r--CMakeLists.txt2
-rw-r--r--kaddressbook/importexportplugins/CMakeLists.txt5
-rw-r--r--kaddressbook/importexportplugins/csv/CMakeLists.txt15
-rw-r--r--kaddressbook/importexportplugins/csv/csvimportexportplugin.cpp46
-rw-r--r--kaddressbook/importexportplugins/csv/csvimportexportplugin.h36
-rw-r--r--kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp72
-rw-r--r--kaddressbook/importexportplugins/csv/csvimportexportplugininterface.h36
-rw-r--r--kaddressbook/importexportplugins/csv/kaddressbook_importexportcsvplugin.json12
-rw-r--r--kaddressbook/importexportplugins/gmx/CMakeLists.txt15
-rw-r--r--kaddressbook/importexportplugins/gmx/gmximportexportplugin.cpp46
-rw-r--r--kaddressbook/importexportplugins/gmx/gmximportexportplugin.h36
-rw-r--r--kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp72
-rw-r--r--kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.h36
-rw-r--r--kaddressbook/importexportplugins/gmx/kaddressbook_importexportgmxplugin.json12
-rw-r--r--kaddressbook/importexportplugins/ldap/CMakeLists.txt0
-rw-r--r--kaddressbook/importexportplugins/ldif/CMakeLists.txt15
-rw-r--r--kaddressbook/importexportplugins/ldif/kaddressbook_importexportldifplugin.json12
-rw-r--r--kaddressbook/importexportplugins/ldif/ldifimportexportplugin.cpp46
-rw-r--r--kaddressbook/importexportplugins/ldif/ldifimportexportplugin.h36
-rw-r--r--kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp72
-rw-r--r--kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.h36
-rw-r--r--kaddressbook/importexportplugins/vcards/CMakeLists.txt8
-rw-r--r--kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp30
23 files changed, 691 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67c3605..12fe919 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@ set(GRANTLEETHEME_LIB_VERSION "5.3.40")
set(CALENDARSUPPORT_LIB_VERSION "5.3.40")
set(EVENTVIEW_LIB_VERSION "5.3.40")
set(LIBKDEPIM_LIB_VERSION "5.3.40")
-set(KDEPIM_APPS_LIB_VERSION "5.3.42")
+set(KDEPIM_APPS_LIB_VERSION "5.3.45")
set(LIBKLEO_LIB_VERSION "5.3.40")
set(AKONADI_LIB_VERSION "5.3.45")
set(INCIDENCEEDITOR_LIB_VERSION "5.3.40")
diff --git a/kaddressbook/importexportplugins/CMakeLists.txt b/kaddressbook/importexportplugins/CMakeLists.txt
index 93b1bf1..0400b8d 100644
--- a/kaddressbook/importexportplugins/CMakeLists.txt
+++ b/kaddressbook/importexportplugins/CMakeLists.txt
@@ -1 +1,6 @@
add_subdirectory(vcards)
+add_subdirectory(csv)
+add_subdirectory(gmx)
+add_subdirectory(ldap)
+add_subdirectory(ldif)
+
diff --git a/kaddressbook/importexportplugins/csv/CMakeLists.txt b/kaddressbook/importexportplugins/csv/CMakeLists.txt
new file mode 100644
index 0000000..c326686
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/CMakeLists.txt
@@ -0,0 +1,15 @@
+set(kaddressbook_importexport_csv_SRCS
+ csvimportexportplugin.cpp
+ csvimportexportplugininterface.cpp
+ )
+
+
+kcoreaddons_add_plugin(kaddressbook_importexportcsvplugin JSON kaddressbook_importexportcsvplugin.json SOURCES
+ ${kaddressbook_importexport_csv_SRCS} INSTALL_NAMESPACE kaddressbook)
+
+target_link_libraries(kaddressbook_importexportcsvplugin KF5::KaddressbookImportExport
+ KF5::PimCommon
+ KF5::I18n
+ KF5::XmlGui
+ KF5::Contacts
+ )
diff --git a/kaddressbook/importexportplugins/csv/csvimportexportplugin.cpp b/kaddressbook/importexportplugins/csv/csvimportexportplugin.cpp
new file mode 100644
index 0000000..17e3d1a
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/csvimportexportplugin.cpp
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#include "csvimportexportplugin.h"
+#include "csvimportexportplugininterface.h"
+
+CSVImportExportPlugin::CSVImportExportPlugin(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
+{
+
+}
+
+CSVImportExportPlugin::~CSVImportExportPlugin()
+{
+
+}
+
+
+PimCommon::AbstractGenericPluginInterface *CSVImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
+{
+ CSVImportExportPluginInterface *interface = new CSVImportExportPluginInterface(parent);
+ interface->createAction(ac);
+ return interface;
+}
+
+bool CSVImportExportPlugin::hasPopupMenuSupport() const
+{
+ return true;
+}
diff --git a/kaddressbook/importexportplugins/csv/csvimportexportplugin.h b/kaddressbook/importexportplugins/csv/csvimportexportplugin.h
new file mode 100644
index 0000000..3a69041
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/csvimportexportplugin.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#ifndef CSVIMPORTEXPORTPLUGIN_H
+#define CSVIMPORTEXPORTPLUGIN_H
+#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
+
+class CSVImportExportPlugin : public KAddressBookImportExport::KAddressBookImportExportPlugin
+{
+ Q_OBJECT
+public:
+ explicit CSVImportExportPlugin(QObject *parent = Q_NULLPTR);
+ ~CSVImportExportPlugin();
+
+ PimCommon::AbstractGenericPluginInterface *createInterface(KActionCollection *ac, QObject *parent) Q_DECL_OVERRIDE;
+ bool hasPopupMenuSupport() const Q_DECL_OVERRIDE;
+};
+
+#endif // CSVIMPORTEXPORTPLUGIN_H
diff --git a/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp
new file mode 100644
index 0000000..77d91ad
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "csvimportexportplugininterface.h"
+#include <KLocalizedString>
+#include <KActionCollection>
+#include <QAction>
+
+CSVImportExportPluginInterface::CSVImportExportPluginInterface(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPluginInterface(parent)
+{
+
+}
+
+CSVImportExportPluginInterface::~CSVImportExportPluginInterface()
+{
+
+}
+
+
+void CSVImportExportPluginInterface::createAction(KActionCollection *ac)
+{
+#if 0
+ QAction *action = ac->addAction(QStringLiteral("file_import_csv"));
+ action->setText(i18n("Import CSV..."));
+ action->setWhatsThis(i18n("Import contacts from a CSV file."));
+ setImportActions(QList<QAction *>() << action);
+
+ QList<QAction *> exportActionList;
+
+ action = ac->addAction(QStringLiteral("file_import_csv"));
+ action->setText(i18n("Import CSV..."));
+ action->setWhatsThis(i18n("Import contacts from a CSV file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_csv40"));
+ action->setWhatsThis(i18n("Export contacts to a CSV 4.0 file."));
+ action->setText(i18n("Export CSV 4.0..."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_csv30"));
+ action->setText(i18n("Export CSV 3.0..."));
+ action->setWhatsThis(i18n("Export contacts to a CSV 3.0 file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_csv21"));
+ action->setText(i18n("Export CSV 2.1..."));
+ action->setWhatsThis(i18n("Export contacts to a CSV 2.1 file."));
+ exportActionList << action;
+ setExportActions(exportActionList);
+#endif
+}
+
+void CSVImportExportPluginInterface::exec()
+{
+}
diff --git a/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.h b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.h
new file mode 100644
index 0000000..1bc3669
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef CSVIMPORTEXPORTPLUGININTERFACE_H
+#define CSVIMPORTEXPORTPLUGININTERFACE_H
+
+#include <KAddressBookImportExport/KAddressBookImportExportPluginInterface>
+
+class CSVImportExportPluginInterface : public KAddressBookImportExport::KAddressBookImportExportPluginInterface
+{
+ Q_OBJECT
+public:
+ explicit CSVImportExportPluginInterface(QObject *parent = Q_NULLPTR);
+ ~CSVImportExportPluginInterface();
+
+ void createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ void exec() Q_DECL_OVERRIDE;
+};
+
+#endif // CSVIMPORTEXPORTPLUGININTERFACE_H
diff --git a/kaddressbook/importexportplugins/csv/kaddressbook_importexportcsvplugin.json b/kaddressbook/importexportplugins/csv/kaddressbook_importexportcsvplugin.json
new file mode 100644
index 0000000..c3773f2
--- /dev/null
+++ b/kaddressbook/importexportplugins/csv/kaddressbook_importexportcsvplugin.json
@@ -0,0 +1,12 @@
+{
+ "KPlugin": {
+ "Description": "This plugin allows you to import export csv.",
+ "EnabledByDefault": "true",
+ "Id": "kaddressbookimportexportcsv",
+ "Name": "Import Export CSV",
+ "ServiceTypes": [
+ "KAddressBook/ImportExportPlugin"
+ ],
+ "Version": "1.0"
+ }
+}
diff --git a/kaddressbook/importexportplugins/gmx/CMakeLists.txt b/kaddressbook/importexportplugins/gmx/CMakeLists.txt
new file mode 100644
index 0000000..cdad4e8
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/CMakeLists.txt
@@ -0,0 +1,15 @@
+set(kaddressbook_importexport_gmx_SRCS
+ gmximportexportplugin.cpp
+ gmximportexportplugininterface.cpp
+ )
+
+
+kcoreaddons_add_plugin(kaddressbook_importexportgmxplugin JSON kaddressbook_importexportgmxplugin.json SOURCES
+ ${kaddressbook_importexport_gmx_SRCS} INSTALL_NAMESPACE kaddressbook)
+
+target_link_libraries(kaddressbook_importexportgmxplugin KF5::KaddressbookImportExport
+ KF5::PimCommon
+ KF5::I18n
+ KF5::XmlGui
+ KF5::Contacts
+ )
diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugin.cpp b/kaddressbook/importexportplugins/gmx/gmximportexportplugin.cpp
new file mode 100644
index 0000000..8f79ce8
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugin.cpp
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#include "gmximportexportplugin.h"
+#include "gmximportexportplugininterface.h"
+
+GMXImportExportPlugin::GMXImportExportPlugin(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
+{
+
+}
+
+GMXImportExportPlugin::~GMXImportExportPlugin()
+{
+
+}
+
+
+PimCommon::AbstractGenericPluginInterface *GMXImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
+{
+ GMXImportExportPluginInterface *interface = new GMXImportExportPluginInterface(parent);
+ interface->createAction(ac);
+ return interface;
+}
+
+bool GMXImportExportPlugin::hasPopupMenuSupport() const
+{
+ return true;
+}
diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugin.h b/kaddressbook/importexportplugins/gmx/gmximportexportplugin.h
new file mode 100644
index 0000000..1e273ad
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugin.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#ifndef GMXIMPORTEXPORTPLUGIN_H
+#define GMXIMPORTEXPORTPLUGIN_H
+#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
+
+class GMXImportExportPlugin : public KAddressBookImportExport::KAddressBookImportExportPlugin
+{
+ Q_OBJECT
+public:
+ explicit GMXImportExportPlugin(QObject *parent = Q_NULLPTR);
+ ~GMXImportExportPlugin();
+
+ PimCommon::AbstractGenericPluginInterface *createInterface(KActionCollection *ac, QObject *parent) Q_DECL_OVERRIDE;
+ bool hasPopupMenuSupport() const Q_DECL_OVERRIDE;
+};
+
+#endif // GMXIMPORTEXPORTPLUGIN_H
diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp
new file mode 100644
index 0000000..eb50b4e
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "gmximportexportplugininterface.h"
+#include <KLocalizedString>
+#include <KActionCollection>
+#include <QAction>
+
+GMXImportExportPluginInterface::GMXImportExportPluginInterface(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPluginInterface(parent)
+{
+
+}
+
+GMXImportExportPluginInterface::~GMXImportExportPluginInterface()
+{
+
+}
+
+
+void GMXImportExportPluginInterface::createAction(KActionCollection *ac)
+{
+#if 0
+ QAction *action = ac->addAction(QStringLiteral("file_import_gmx"));
+ action->setText(i18n("Import GMX..."));
+ action->setWhatsThis(i18n("Import contacts from a GMX file."));
+ setImportActions(QList<QAction *>() << action);
+
+ QList<QAction *> exportActionList;
+
+ action = ac->addAction(QStringLiteral("file_import_gmx"));
+ action->setText(i18n("Import GMX..."));
+ action->setWhatsThis(i18n("Import contacts from a GMX file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_gmx40"));
+ action->setWhatsThis(i18n("Export contacts to a GMX 4.0 file."));
+ action->setText(i18n("Export GMX 4.0..."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_gmx30"));
+ action->setText(i18n("Export GMX 3.0..."));
+ action->setWhatsThis(i18n("Export contacts to a GMX 3.0 file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_gmx21"));
+ action->setText(i18n("Export GMX 2.1..."));
+ action->setWhatsThis(i18n("Export contacts to a GMX 2.1 file."));
+ exportActionList << action;
+ setExportActions(exportActionList);
+#endif
+}
+
+void GMXImportExportPluginInterface::exec()
+{
+}
diff --git a/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.h b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.h
new file mode 100644
index 0000000..a865d76
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/gmximportexportplugininterface.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef GMXIMPORTEXPORTPLUGININTERFACE_H
+#define GMXIMPORTEXPORTPLUGININTERFACE_H
+
+#include <KAddressBookImportExport/KAddressBookImportExportPluginInterface>
+
+class GMXImportExportPluginInterface : public KAddressBookImportExport::KAddressBookImportExportPluginInterface
+{
+ Q_OBJECT
+public:
+ explicit GMXImportExportPluginInterface(QObject *parent = Q_NULLPTR);
+ ~GMXImportExportPluginInterface();
+
+ void createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ void exec() Q_DECL_OVERRIDE;
+};
+
+#endif // GMXIMPORTEXPORTPLUGININTERFACE_H
diff --git a/kaddressbook/importexportplugins/gmx/kaddressbook_importexportgmxplugin.json b/kaddressbook/importexportplugins/gmx/kaddressbook_importexportgmxplugin.json
new file mode 100644
index 0000000..46c08b5
--- /dev/null
+++ b/kaddressbook/importexportplugins/gmx/kaddressbook_importexportgmxplugin.json
@@ -0,0 +1,12 @@
+{
+ "KPlugin": {
+ "Description": "This plugin allows you to import export gmx.",
+ "EnabledByDefault": "true",
+ "Id": "kaddressbookimportexportgmx",
+ "Name": "Import Export Gmx",
+ "ServiceTypes": [
+ "KAddressBook/ImportExportPlugin"
+ ],
+ "Version": "1.0"
+ }
+}
diff --git a/kaddressbook/importexportplugins/ldap/CMakeLists.txt b/kaddressbook/importexportplugins/ldap/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldap/CMakeLists.txt
diff --git a/kaddressbook/importexportplugins/ldif/CMakeLists.txt b/kaddressbook/importexportplugins/ldif/CMakeLists.txt
new file mode 100644
index 0000000..9b5a2d4
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/CMakeLists.txt
@@ -0,0 +1,15 @@
+set(kaddressbook_importexport_ldif_SRCS
+ ldifimportexportplugin.cpp
+ ldifimportexportplugininterface.cpp
+ )
+
+
+kcoreaddons_add_plugin(kaddressbook_importexportldifplugin JSON kaddressbook_importexportldifplugin.json SOURCES
+ ${kaddressbook_importexport_ldif_SRCS} INSTALL_NAMESPACE kaddressbook)
+
+target_link_libraries(kaddressbook_importexportldifplugin KF5::KaddressbookImportExport
+ KF5::PimCommon
+ KF5::I18n
+ KF5::XmlGui
+ KF5::Contacts
+ )
diff --git a/kaddressbook/importexportplugins/ldif/kaddressbook_importexportldifplugin.json b/kaddressbook/importexportplugins/ldif/kaddressbook_importexportldifplugin.json
new file mode 100644
index 0000000..30419a3
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/kaddressbook_importexportldifplugin.json
@@ -0,0 +1,12 @@
+{
+ "KPlugin": {
+ "Description": "This plugin allows you to import export ldif.",
+ "EnabledByDefault": "true",
+ "Id": "kaddressbookimportexportldif",
+ "Name": "Import Export Ldif",
+ "ServiceTypes": [
+ "KAddressBook/ImportExportPlugin"
+ ],
+ "Version": "1.0"
+ }
+}
diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.cpp b/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.cpp
new file mode 100644
index 0000000..7e05820
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.cpp
@@ -0,0 +1,46 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#include "ldifimportexportplugin.h"
+#include "ldifimportexportplugininterface.h"
+
+LDifImportExportPlugin::LDifImportExportPlugin(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPlugin(parent)
+{
+
+}
+
+LDifImportExportPlugin::~LDifImportExportPlugin()
+{
+
+}
+
+
+PimCommon::AbstractGenericPluginInterface *LDifImportExportPlugin::createInterface(KActionCollection *ac, QObject *parent)
+{
+ LDifImportExportPluginInterface *interface = new LDifImportExportPluginInterface(parent);
+ interface->createAction(ac);
+ return interface;
+}
+
+bool LDifImportExportPlugin::hasPopupMenuSupport() const
+{
+ return true;
+}
diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.h b/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.h
new file mode 100644
index 0000000..8de4e7d
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugin.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+
+#ifndef LDIFIMPORTEXPORTPLUGIN_H
+#define LDIFIMPORTEXPORTPLUGIN_H
+#include <KAddressBookImportExport/KAddressBookImportExportPlugin>
+
+class LDifImportExportPlugin : public KAddressBookImportExport::KAddressBookImportExportPlugin
+{
+ Q_OBJECT
+public:
+ explicit LDifImportExportPlugin(QObject *parent = Q_NULLPTR);
+ ~LDifImportExportPlugin();
+
+ PimCommon::AbstractGenericPluginInterface *createInterface(KActionCollection *ac, QObject *parent) Q_DECL_OVERRIDE;
+ bool hasPopupMenuSupport() const Q_DECL_OVERRIDE;
+};
+
+#endif // LDIFIMPORTEXPORTPLUGIN_H
diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
new file mode 100644
index 0000000..b16a265
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "ldifimportexportplugininterface.h"
+#include <KLocalizedString>
+#include <KActionCollection>
+#include <QAction>
+
+LDifImportExportPluginInterface::LDifImportExportPluginInterface(QObject *parent)
+ : KAddressBookImportExport::KAddressBookImportExportPluginInterface(parent)
+{
+
+}
+
+LDifImportExportPluginInterface::~LDifImportExportPluginInterface()
+{
+
+}
+
+
+void LDifImportExportPluginInterface::createAction(KActionCollection *ac)
+{
+#if 0
+ QAction *action = ac->addAction(QStringLiteral("file_import_ldif"));
+ action->setText(i18n("Import LDif..."));
+ action->setWhatsThis(i18n("Import contacts from a LDif file."));
+ setImportActions(QList<QAction *>() << action);
+
+ QList<QAction *> exportActionList;
+
+ action = ac->addAction(QStringLiteral("file_import_ldif"));
+ action->setText(i18n("Import LDif..."));
+ action->setWhatsThis(i18n("Import contacts from a LDif file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_ldif40"));
+ action->setWhatsThis(i18n("Export contacts to a LDif 4.0 file."));
+ action->setText(i18n("Export LDif 4.0..."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_ldif30"));
+ action->setText(i18n("Export LDif 3.0..."));
+ action->setWhatsThis(i18n("Export contacts to a LDif 3.0 file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_ldif21"));
+ action->setText(i18n("Export LDif 2.1..."));
+ action->setWhatsThis(i18n("Export contacts to a LDif 2.1 file."));
+ exportActionList << action;
+ setExportActions(exportActionList);
+#endif
+}
+
+void LDifImportExportPluginInterface::exec()
+{
+}
diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.h b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.h
new file mode 100644
index 0000000..592b882
--- /dev/null
+++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2016 Montel Laurent <montel@kde.org>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This program 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; see the file COPYING. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef LDIFIMPORTEXPORTPLUGININTERFACE_H
+#define LDIFIMPORTEXPORTPLUGININTERFACE_H
+
+#include <KAddressBookImportExport/KAddressBookImportExportPluginInterface>
+
+class LDifImportExportPluginInterface : public KAddressBookImportExport::KAddressBookImportExportPluginInterface
+{
+ Q_OBJECT
+public:
+ explicit LDifImportExportPluginInterface(QObject *parent = Q_NULLPTR);
+ ~LDifImportExportPluginInterface();
+
+ void createAction(KActionCollection *ac) Q_DECL_OVERRIDE;
+ void exec() Q_DECL_OVERRIDE;
+};
+
+#endif // LDIFIMPORTEXPORTPLUGININTERFACE_H
diff --git a/kaddressbook/importexportplugins/vcards/CMakeLists.txt b/kaddressbook/importexportplugins/vcards/CMakeLists.txt
index 39c1e3b..e6d5ee8 100644
--- a/kaddressbook/importexportplugins/vcards/CMakeLists.txt
+++ b/kaddressbook/importexportplugins/vcards/CMakeLists.txt
@@ -1,6 +1,8 @@
set(kaddressbook_importexport_vcard_SRCS
vcardimportexportplugin.cpp
vcardimportexportplugininterface.cpp
+ engine/vcardviewerdialog.cpp
+ engine/vcardexportselectionwidget.cpp
)
@@ -8,5 +10,9 @@ kcoreaddons_add_plugin(kaddressbook_importexportvcardplugin JSON kaddressbook_im
${kaddressbook_importexport_vcard_SRCS} INSTALL_NAMESPACE kaddressbook)
target_link_libraries(kaddressbook_importexportvcardplugin KF5::KaddressbookImportExport
- KF5::PimCommon KF5::I18n KF5::XmlGui
+ KF5::PimCommon
+ KF5::I18n
+ KF5::XmlGui
+ KF5::Contacts
+ KF5::KaddressbookGrantlee
)
diff --git a/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp b/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
index 9696fc1..4ef6171 100644
--- a/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
@@ -36,9 +36,33 @@ VCardImportExportPluginInterface::~VCardImportExportPluginInterface()
void VCardImportExportPluginInterface::createAction(KActionCollection *ac)
{
- QAction *action = ac->addAction(QStringLiteral("import_action_vcard"));
- action->setText(i18n("Merge Contacts..."));
- //TODO
+ QAction *action = ac->addAction(QStringLiteral("file_import_vcard"));
+ action->setText(i18n("Import vCard..."));
+ action->setWhatsThis(i18n("Import contacts from a vCard file."));
+ setImportActions(QList<QAction *>() << action);
+
+ QList<QAction *> exportActionList;
+
+ action = ac->addAction(QStringLiteral("file_import_vcard"));
+ action->setText(i18n("Import vCard..."));
+ action->setWhatsThis(i18n("Import contacts from a vCard file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_vcard40"));
+ action->setWhatsThis(i18n("Export contacts to a vCard 4.0 file."));
+ action->setText(i18n("Export vCard 4.0..."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_vcard30"));
+ action->setText(i18n("Export vCard 3.0..."));
+ action->setWhatsThis(i18n("Export contacts to a vCard 3.0 file."));
+ exportActionList << action;
+
+ action = ac->addAction(QStringLiteral("file_export_vcard21"));
+ action->setText(i18n("Export vCard 2.1..."));
+ action->setWhatsThis(i18n("Export contacts to a vCard 2.1 file."));
+ exportActionList << action;
+ setExportActions(exportActionList);
}
void VCardImportExportPluginInterface::exec()