summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-09 06:36:33 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-09 06:36:33 (GMT)
commitb59085751d854b9123ff78f2087470ea19300186 (patch)
tree100694f77f2203201e4fe7d7d147b1920823d73e
parent95c20b135ca5e0262b364ade83b204a57f63d070 (diff)
Add actions
-rw-r--r--kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp34
-rw-r--r--kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp30
-rw-r--r--kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp32
3 files changed, 16 insertions, 80 deletions
diff --git a/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp
index 77d91ad..aaaeade 100644
--- a/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/csv/csvimportexportplugininterface.cpp
@@ -36,35 +36,15 @@ 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;
+ QAction *action = ac->addAction(QStringLiteral("file_export_csv"));
+ action->setText(i18n("Export CSV file..."));
+ action->setWhatsThis(i18n("Export contacts to a file in comma separated value format."));
+ setExportActions(QList<QAction *>() << action);
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
+ action->setText(i18n("Import CSV file..."));
+ action->setWhatsThis(i18n("Import contacts from a file in comma separated value format."));
+ setImportActions(QList<QAction *>() << action);
}
void CSVImportExportPluginInterface::exec()
diff --git a/kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp b/kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp
index d4bee8d..9897b50 100644
--- a/kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/ldap/ldapimportexportplugininterface.cpp
@@ -36,37 +36,13 @@ LDapImportExportPluginInterface::~LDapImportExportPluginInterface()
void LDapImportExportPluginInterface::createAction(KActionCollection *ac)
{
-#if 0
QAction *action = ac->addAction(QStringLiteral("file_import_ldap"));
- action->setText(i18n("Import LDap..."));
- action->setWhatsThis(i18n("Import contacts from a LDap file."));
+ action->setText(i18n("Import From LDAP server..."));
+ action->setWhatsThis(i18n("Import contacts from an LDAP server."));
setImportActions(QList<QAction *>() << action);
-
- QList<QAction *> exportActionList;
-
- action = ac->addAction(QStringLiteral("file_import_ldap"));
- action->setText(i18n("Import LDap..."));
- action->setWhatsThis(i18n("Import contacts from a LDap file."));
- exportActionList << action;
-
- action = ac->addAction(QStringLiteral("file_export_ldap40"));
- action->setWhatsThis(i18n("Export contacts to a LDap 4.0 file."));
- action->setText(i18n("Export LDap 4.0..."));
- exportActionList << action;
-
- action = ac->addAction(QStringLiteral("file_export_ldap30"));
- action->setText(i18n("Export LDap 3.0..."));
- action->setWhatsThis(i18n("Export contacts to a LDap 3.0 file."));
- exportActionList << action;
-
- action = ac->addAction(QStringLiteral("file_export_ldap21"));
- action->setText(i18n("Export LDap 2.1..."));
- action->setWhatsThis(i18n("Export contacts to a LDap 2.1 file."));
- exportActionList << action;
- setExportActions(exportActionList);
-#endif
}
void LDapImportExportPluginInterface::exec()
{
+ //TODO
}
diff --git a/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
index b16a265..32a45be 100644
--- a/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
+++ b/kaddressbook/importexportplugins/ldif/ldifimportexportplugininterface.cpp
@@ -36,35 +36,15 @@ 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."));
+ action->setText(i18n("Import LDIF file..."));
+ action->setWhatsThis(i18n("Import contacts from an 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
+ action = ac->addAction(QStringLiteral("file_export_ldif"));
+ action->setText(i18n("Export LDIF file..."));
+ action->setWhatsThis(i18n("Export contacts to an LDIF file."));
+ setExportActions(QList<QAction *>() << action);
}
void LDifImportExportPluginInterface::exec()