summaryrefslogtreecommitdiffstats
path: root/src/storemodel.h
diff options
context:
space:
mode:
authorAnne Jan Brouwer <brouwer@annejan.com>2016-12-14 22:56:38 +0100
committerAnne Jan Brouwer <brouwer@annejan.com>2016-12-14 22:56:38 +0100
commitb42bb45e6074b3213aaf752e7dc906e95e01790a (patch)
treebd694541f8a32ec6163aef278bb9b614acc0643f /src/storemodel.h
parent816e5aac5030c3f3dd5ae8ae11eb3c97e034f68c (diff)
parentfdb5c50ee7b89d9eaf1e2bf08e802996edc58131 (diff)
Updated from master
Diffstat (limited to 'src/storemodel.h')
-rw-r--r--src/storemodel.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/storemodel.h b/src/storemodel.h
index 7407a216..6f3b2bda 100644
--- a/src/storemodel.h
+++ b/src/storemodel.h
@@ -4,6 +4,10 @@
#include <QFileSystemModel>
#include <QRegExp>
#include <QSortFilterProxyModel>
+#include <QStringListModel>
+#include "util.h"
+#include <QDataStream>
+#include <qtpasssettings.h>
/*!
\class StoreModel
@@ -15,6 +19,7 @@ private:
QFileSystemModel *fs;
QString store;
+
public:
StoreModel();
@@ -22,6 +27,25 @@ public:
bool ShowThis(const QModelIndex) const;
void setModelAndStore(QFileSystemModel *sourceModel, QString passStore);
QVariant data(const QModelIndex &index, int role) const;
+
+ // QAbstractItemModel interface
+public:
+ Qt::DropActions supportedDropActions() const;
+ Qt::DropActions supportedDragActions() const;
+ Qt::ItemFlags flags(const QModelIndex &index) const;
+ QStringList mimeTypes() const;
+ QMimeData *mimeData(const QModelIndexList &indexes) const;
+ bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
+};
+/*!
+ \struct dragAndDropInfo
+ \brief holds values to share beetween drag and drop on the passwordstorage view
+ */
+struct dragAndDropInfoPasswordStore {
+ bool isDir;
+ bool isFile;
+ QString path;
};
#endif // STOREMODEL_H_