summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-07 11:33:28 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-07 11:33:28 (GMT)
commit5187d72686c4ce0523e3bb3f7500e67ee77e7dfc (patch)
tree6e96fd2b9bce8fd0dd7e6f6c7a418791e69fee77
parent8992766ded7b2d9fc742dab3b7a4334b6dcf42bf (diff)
We can have several actions
-rw-r--r--kaddressbookimportexport/src/kaddressbookimportexportplugin.cpp20
-rw-r--r--kaddressbookimportexport/src/kaddressbookimportexportplugin.h15
2 files changed, 17 insertions, 18 deletions
diff --git a/kaddressbookimportexport/src/kaddressbookimportexportplugin.cpp b/kaddressbookimportexport/src/kaddressbookimportexportplugin.cpp
index 733e6ad..5482497 100644
--- a/kaddressbookimportexport/src/kaddressbookimportexportplugin.cpp
+++ b/kaddressbookimportexport/src/kaddressbookimportexportplugin.cpp
@@ -22,9 +22,7 @@
using namespace KAddressBookImportExport;
KAddressBookImportExportPlugin::KAddressBookImportExportPlugin(QObject *parent)
- : PimCommon::AbstractGenericPlugin(parent),
- mImportAction(Q_NULLPTR),
- mExportAction(Q_NULLPTR)
+ : PimCommon::AbstractGenericPlugin(parent)
{
}
@@ -34,22 +32,22 @@ KAddressBookImportExportPlugin::~KAddressBookImportExportPlugin()
}
-QAction *KAddressBookImportExportPlugin::importAction() const
+QList<QAction *> KAddressBookImportExportPlugin::importActions() const
{
- return mImportAction;
+ return mImportActions;
}
-void KAddressBookImportExportPlugin::setImportAction(QAction *importAction)
+void KAddressBookImportExportPlugin::setImportActions(const QList<QAction *> &importAction)
{
- mImportAction = importAction;
+ mImportActions = importAction;
}
-QAction *KAddressBookImportExportPlugin::exportAction() const
+QList<QAction *> KAddressBookImportExportPlugin::exportActions() const
{
- return mExportAction;
+ return mExportActions;
}
-void KAddressBookImportExportPlugin::setExportAction(QAction *exportAction)
+void KAddressBookImportExportPlugin::setExportActions(const QList<QAction *> &exportAction)
{
- mExportAction = exportAction;
+ mExportActions = exportAction;
}
diff --git a/kaddressbookimportexport/src/kaddressbookimportexportplugin.h b/kaddressbookimportexport/src/kaddressbookimportexportplugin.h
index d4628cf..db30c6d 100644
--- a/kaddressbookimportexport/src/kaddressbookimportexportplugin.h
+++ b/kaddressbookimportexport/src/kaddressbookimportexportplugin.h
@@ -23,6 +23,7 @@
#include <PimCommon/AbstractGenericPlugin>
#include "kaddressbook_importexport_export.h"
+#include <QList>
class QAction;
namespace KAddressBookImportExport
{
@@ -32,15 +33,15 @@ class KADDRESSBOOK_IMPORTEXPORT_EXPORT KAddressBookImportExportPlugin : public P
public:
explicit KAddressBookImportExportPlugin(QObject *parent = Q_NULLPTR);
~KAddressBookImportExportPlugin();
- QAction *importAction() const;
- void setImportAction(QAction *importAction);
+ QList<QAction *> importActions() const;
+ void setImportActions(const QList<QAction *> &importAction);
- QAction *exportAction() const;
- void setExportAction(QAction *exportAction);
+ QList<QAction *> exportActions() const;
+ void setExportActions(const QList<QAction *> &exportAction);
-private:
- QAction *mImportAction;
- QAction *mExportAction;
+protected:
+ QList<QAction *> mImportActions;
+ QList<QAction *> mExportActions;
};
}
#endif // KADDRESSBOOKIMPORTEXPORTPLUGIN_H