summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-11 11:52:37 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-11 11:52:37 (GMT)
commit5d8633b4d3b57df2bcd1832efe2eec809e3e8632 (patch)
treef752c424dd479c035ffbbdccbb44a32bfcc6d519
parenta1e94cdfd833d41455e55ff5fdad2fcf76eb6e9b (diff)
Allow to define item selection model
-rw-r--r--CMakeLists.txt2
-rw-r--r--kaddressbookimportexport/src/kaddressbookimportexportplugininterface.cpp13
-rw-r--r--kaddressbookimportexport/src/kaddressbookimportexportplugininterface.h8
3 files changed, 20 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3412b93..ce35a53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
-set(PIM_VERSION "5.3.51")
+set(PIM_VERSION "5.3.52")
set(KDEPIM_APPS_LIB_VERSION ${PIM_VERSION})
set(QT_REQUIRED_VERSION "5.6.0")
diff --git a/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.cpp b/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.cpp
index 38325c5..8525690 100644
--- a/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.cpp
+++ b/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.cpp
@@ -23,7 +23,8 @@ using namespace KAddressBookImportExport;
KAddressBookImportExportPluginInterface::KAddressBookImportExportPluginInterface(QObject *parent)
: PimCommon::AbstractGenericPluginInterface(parent),
- mImportExportAction(Import)
+ mImportExportAction(Import),
+ mItemSelectionModel(Q_NULLPTR)
{
}
@@ -82,3 +83,13 @@ void KAddressBookImportExportPluginInterface::setAddressBookImportExportList(con
{
mAddressBookImportExportList = addressBookImportExportList;
}
+
+QItemSelectionModel *KAddressBookImportExportPluginInterface::itemSelectionModel() const
+{
+ return mItemSelectionModel;
+}
+
+void KAddressBookImportExportPluginInterface::setItemSelectionModel(QItemSelectionModel *itemSelectionModel)
+{
+ mItemSelectionModel = itemSelectionModel;
+}
diff --git a/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.h b/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.h
index 5ae10a2..8bbd9fd 100644
--- a/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.h
+++ b/kaddressbookimportexport/src/kaddressbookimportexportplugininterface.h
@@ -25,7 +25,7 @@
#include <QList>
#include <AkonadiCore/Collection>
#include <KAddressBookImportExport/KAddressBookImportExportContactList>
-
+class QItemSelectionModel;
namespace KAddressBookImportExport
{
class KADDRESSBOOK_IMPORTEXPORT_EXPORT KAddressBookImportExportPluginInterface : public PimCommon::AbstractGenericPluginInterface
@@ -55,12 +55,18 @@ public:
KAddressBookImportExport::KAddressBookImportExportContactList addressBookImportExportList() const;
void setAddressBookImportExportList(const KAddressBookImportExport::KAddressBookImportExportContactList &addressBookImportExportList);
+ void setSelectionModel(QItemSelectionModel *model);
+
+ QItemSelectionModel *itemSelectionModel() const;
+ void setItemSelectionModel(QItemSelectionModel *itemSelectionModel);
+
protected:
KAddressBookImportExport::KAddressBookImportExportContactList mAddressBookImportExportList;
QList<QAction *> mImportActions;
QList<QAction *> mExportActions;
ImportExportAction mImportExportAction;
Akonadi::Collection mDefaultCollection;
+ QItemSelectionModel *mItemSelectionModel;
};
}
#endif // KADDRESSBOOKIMPORTEXPORTPLUGININTERFACE_H