mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Renamed classes and function names relaed to drag and drop
This commit is contained in:
@@ -105,7 +105,7 @@ private:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuDragDrop::RiuDragDrop()
|
||||
{
|
||||
m_proposedAction = Qt::MoveAction;
|
||||
m_proposedDropAction = Qt::MoveAction;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -163,7 +163,7 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
|
||||
itemflags |= Qt::ItemIsDropEnabled;
|
||||
}
|
||||
}
|
||||
else if (m_proposedAction == Qt::MoveAction)
|
||||
else if (m_proposedDropAction == Qt::MoveAction)
|
||||
{
|
||||
if (dynamic_cast<RimWellLogPlot*>(uiItem))
|
||||
{
|
||||
@@ -191,7 +191,7 @@ Qt::ItemFlags RiuDragDrop::flags(const QModelIndex &index) const
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_proposedAction == Qt::CopyAction)
|
||||
else if (m_proposedDropAction == Qt::CopyAction)
|
||||
{
|
||||
if (dynamic_cast<RimWellLogPlotTrack*>(uiItem))
|
||||
{
|
||||
@@ -290,7 +290,7 @@ QStringList RiuDragDrop::mimeTypes() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuDragDrop::endDrag()
|
||||
void RiuDragDrop::onDragCanceled()
|
||||
{
|
||||
m_dragItems.clear();
|
||||
}
|
||||
@@ -449,7 +449,7 @@ std::vector<caf::PdmPointer<caf::PdmObjectHandle> > RiuDragDrop::objectHandlesFr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuDragDrop::setProposedAction(Qt::DropAction action)
|
||||
void RiuDragDrop::onProposedDropActionUpdated(Qt::DropAction action)
|
||||
{
|
||||
m_proposedAction = action;
|
||||
m_proposedDropAction = action;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmUiDragDropHandle.h"
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmObjectGroup.h"
|
||||
|
||||
@@ -38,19 +38,21 @@ class RimWellLogPlotCurve;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RiuDragDrop : public caf::PdmUiDragDropHandle
|
||||
class RiuDragDrop : public caf::PdmUiDragDropInterface
|
||||
{
|
||||
public:
|
||||
RiuDragDrop();
|
||||
virtual ~RiuDragDrop();
|
||||
|
||||
protected:
|
||||
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;
|
||||
virtual void endDrag();
|
||||
virtual void setProposedAction(Qt::DropAction action);
|
||||
|
||||
virtual void onDragCanceled();
|
||||
virtual void onProposedDropActionUpdated(Qt::DropAction action);
|
||||
|
||||
private:
|
||||
void moveCasesToGridGroup(caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup);
|
||||
@@ -64,6 +66,6 @@ private:
|
||||
|
||||
private:
|
||||
mutable std::vector<caf::PdmPointer<caf::PdmObjectHandle> > m_dragItems;
|
||||
Qt::DropAction m_proposedAction;
|
||||
Qt::DropAction m_proposedDropAction;
|
||||
};
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ RiuMainWindow::RiuMainWindow()
|
||||
|
||||
sm_mainWindowInstance = this;
|
||||
|
||||
m_dragDrop = new RiuDragDrop;
|
||||
m_dragDropInterface = new RiuDragDrop;
|
||||
|
||||
initializeGuiNewProjectLoaded();
|
||||
|
||||
@@ -209,7 +209,7 @@ void RiuMainWindow::closeEvent(QCloseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
delete m_dragDrop;
|
||||
delete m_dragDropInterface;
|
||||
|
||||
saveWinGeoAndDockToolBarLayout();
|
||||
|
||||
@@ -1319,7 +1319,7 @@ void RiuMainWindow::setPdmRoot(caf::PdmObject* pdmRoot)
|
||||
|
||||
m_projectTreeView->setPdmItem(pdmRoot);
|
||||
// For debug only : m_projectTreeView->treeView()->expandAll();
|
||||
m_projectTreeView->setDragDropHandle(m_dragDrop);
|
||||
m_projectTreeView->setDragDropInterface(m_dragDropInterface);
|
||||
|
||||
for (size_t i = 0; i < additionalProjectViews.size(); i++)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace caf
|
||||
class UiPropertyCreatorPdm;
|
||||
class UiTreeModelPdm;
|
||||
class PdmUiItem;
|
||||
class PdmUiDragDropHandle;
|
||||
class PdmUiDragDropInterface;
|
||||
}
|
||||
|
||||
namespace ssihub
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
private:
|
||||
caf::PdmUiTreeView* m_projectTreeView;
|
||||
|
||||
caf::PdmUiDragDropHandle* m_dragDrop;
|
||||
caf::PdmUiDragDropInterface* m_dragDropInterface;
|
||||
|
||||
QUndoView* m_undoView;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user