From: vsr Date: Tue, 6 Mar 2012 16:24:05 +0000 (+0000) Subject: 0020136: EDF 933 DEV : Drag&Drop in OB, complete implementation X-Git-Tag: V6_5_0a1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=24545fa5a57f48421d2dfb0ccff91210108db0a3;p=modules%2Fgui.git 0020136: EDF 933 DEV : Drag&Drop in OB, complete implementation Correct spelling in isDraggable() method --- diff --git a/src/LightApp/LightApp_DataObject.cxx b/src/LightApp/LightApp_DataObject.cxx index 98b17cc3a..937fef628 100644 --- a/src/LightApp/LightApp_DataObject.cxx +++ b/src/LightApp/LightApp_DataObject.cxx @@ -152,17 +152,17 @@ bool LightApp_DataObject::isVisible() const } /*! - \brief Check if the object is dragable. + \brief Check if the object is draggable. This method can be re-implemented in the subclasses. \return \c true if it is possible to drag this object */ -bool LightApp_DataObject::isDragable() const +bool LightApp_DataObject::isDraggable() const { LightApp_Module* aModule = dynamic_cast(module()); if (aModule) { - return aModule->isDragable(this); + return aModule->isDraggable(this); } return false; } diff --git a/src/LightApp/LightApp_DataObject.h b/src/LightApp/LightApp_DataObject.h index 6ba9c446e..48cc0e2ee 100644 --- a/src/LightApp/LightApp_DataObject.h +++ b/src/LightApp/LightApp_DataObject.h @@ -64,7 +64,7 @@ public: virtual QVariant customData(Qtx::CustomDataType type); virtual bool isVisible() const; - virtual bool isDragable() const; + virtual bool isDraggable() const; virtual bool isDropAccepted() const; virtual bool renameAllowed( const int = NameId ) const; virtual bool setName( const QString& ); diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index d4b094d24..28cbe5c36 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -707,7 +707,7 @@ void LightApp_Module::paste() virtual method \return true if module allows dragging the given object */ -bool LightApp_Module::isDragable( const SUIT_DataObject* /*what*/ ) const +bool LightApp_Module::isDraggable( const SUIT_DataObject* /*what*/ ) const { return false; } diff --git a/src/LightApp/LightApp_Module.h b/src/LightApp/LightApp_Module.h index 16bcc29ed..5372fccd8 100644 --- a/src/LightApp/LightApp_Module.h +++ b/src/LightApp/LightApp_Module.h @@ -95,7 +95,7 @@ public: virtual bool canCopy() const; virtual bool canPaste() const; - virtual bool isDragable( const SUIT_DataObject* ) const; + virtual bool isDraggable( const SUIT_DataObject* ) const; virtual bool isDropAccepted( const SUIT_DataObject* ) const; virtual void dropObjects( const DataObjectList&, SUIT_DataObject*, const int, Qt::DropAction ); diff --git a/src/SUIT/SUIT_DataObject.cxx b/src/SUIT/SUIT_DataObject.cxx index d0b58b3d0..b98051122 100755 --- a/src/SUIT/SUIT_DataObject.cxx +++ b/src/SUIT/SUIT_DataObject.cxx @@ -571,7 +571,7 @@ bool SUIT_DataObject::isVisible() const \return \c true if it is possible to drag this object */ -bool SUIT_DataObject::isDragable() const +bool SUIT_DataObject::isDraggable() const { return false; } diff --git a/src/SUIT/SUIT_DataObject.h b/src/SUIT/SUIT_DataObject.h index 6851fbd80..607c577e7 100755 --- a/src/SUIT/SUIT_DataObject.h +++ b/src/SUIT/SUIT_DataObject.h @@ -114,7 +114,7 @@ public: virtual bool expandable() const; virtual bool isVisible() const; - virtual bool isDragable() const; + virtual bool isDraggable() const; virtual bool isDropAccepted() const; virtual bool isEnabled() const; diff --git a/src/SUIT/SUIT_TreeModel.cxx b/src/SUIT/SUIT_TreeModel.cxx index f6f784707..595b42f51 100755 --- a/src/SUIT/SUIT_TreeModel.cxx +++ b/src/SUIT/SUIT_TreeModel.cxx @@ -1004,7 +1004,7 @@ Qt::ItemFlags SUIT_TreeModel::flags( const QModelIndex& index ) const f = f | Qt::ItemIsEditable; // data object can be dragged - if (obj->isDragable()) + if (obj->isDraggable()) f = f | Qt::ItemIsDragEnabled; // another data object(s) can be dropped on this one