mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-01 16:43:03 -06:00
Added drag and drop support.
Implemented our own insertRows/deleteRows to avoid bug caused by default drag and drop behaviour of Qt https://bugreports.qt-project.org/browse/QTBUG-26229 https://bugreports.qt-project.org/browse/QTBUG-6679 p4#: 21028
This commit is contained in:
1 parent
1e8d5236d1
commit
b0503cabba
5 files changed
+122
-23
No files matched your search
@@ -96,8 +96,9 @@ class RimUiTreeModelPdm : public caf::UiTreeModelPdm
|
||||
public:
|
||||
RimUiTreeModelPdm(QObject* parent);
|
||||
|
||||
// Overrides
|
||||
virtual bool insertRows(int position, int rows, const QModelIndex &parent = QModelIndex());
|
||||
|
||||
// TO BE DELETED, NOT USED
|
||||
virtual bool insertRows_special(int position, int rows, const QModelIndex &parent = QModelIndex());
|
||||
|
||||
// Special edit methods
|
||||
bool deleteRangeFilter(const QModelIndex& itemIndex);
|
||||
@@ -119,6 +120,12 @@ public:
|
||||
|
||||
void updateScriptPaths();
|
||||
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
virtual QMimeData * mimeData(const QModelIndexList &indexes) const;
|
||||
virtual QStringList mimeTypes() const;
|
||||
|
||||
private slots:
|
||||
void slotRefreshScriptTree(QString path);
|
||||
void clearClipboard();
|
||||
|
||||
Reference in new issue
Block a user