mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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:
@@ -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