From: asl Date: Mon, 4 Jul 2005 10:25:33 +0000 (+0000) Subject: The default methods of selection management are moved to SMESHGUI X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9469545536c6a63b6bed79328a6073dc6f5a81f1;p=modules%2Fgui.git The default methods of selection management are moved to SMESHGUI --- diff --git a/src/SalomeApp/SalomeApp_Operation.cxx b/src/SalomeApp/SalomeApp_Operation.cxx index 87be9e786..7592d3716 100755 --- a/src/SalomeApp/SalomeApp_Operation.cxx +++ b/src/SalomeApp/SalomeApp_Operation.cxx @@ -12,13 +12,10 @@ #include #include #include -#include -#include #include #include - /* Class : SalomeApp_Operation Description : Base class for all operations @@ -208,46 +205,6 @@ bool SalomeApp_Operation::eventFilter( QObject* obj, QEvent* e ) return SUIT_Operation::eventFilter( obj, e ); } -//======================================================================= -// name : type -// Purpose : Find type by entry -//======================================================================= -int SalomeApp_Operation::type( const QString& ) const -{ - return -1; -} - -//======================================================================= -// name : selected -// Purpose : Get names, types and entries of selected objects -//======================================================================= -void SalomeApp_Operation::selected( QStringList& names, SalomeApp_Dialog::TypesList& types, QStringList& entries ) const -{ - SUIT_DataOwnerPtrList list; selectionMgr()->selected( list ); - SUIT_DataOwnerPtrList::const_iterator anIt = list.begin(), - aLast = list.end(); - for( ; anIt!=aLast; anIt++ ) - { - SalomeApp_DataOwner* owner = dynamic_cast( (*anIt).operator->() ); - SalomeApp_DataSubOwner* subowner = dynamic_cast( (*anIt).operator->() ); - - if( subowner ) - { - QString entry = QString( "%1#%2" ).arg( subowner->entry() ).arg( subowner->index() ); - entries.append( entry ); - types.append( type( entry ) ); - names.append( QString( "%1" ).arg( subowner->index() ) ); - } - - if( owner ) - { - QString entry = owner->entry(); - entries.append( entry ); - types.append( type( entry ) ); - names.append( owner->IO()->getName() ); - } - } -} //======================================================================= // name : eventFilter // Purpose : Block mouse and key events if operator is not active one @@ -257,3 +214,4 @@ void SalomeApp_Operation::update( const int flags ) if ( myModule != 0 ) myModule->update( flags ); } + diff --git a/src/SalomeApp/SalomeApp_Operation.h b/src/SalomeApp/SalomeApp_Operation.h index fbc2e7456..82b8176b2 100755 --- a/src/SalomeApp/SalomeApp_Operation.h +++ b/src/SalomeApp/SalomeApp_Operation.h @@ -91,17 +91,7 @@ protected: void update( const int ); // Call update() method of module ( see SalomeApp_Module for description ) - - - - - virtual void selected( QStringList&, SalomeApp_Dialog::TypesList&, QStringList& ) const; - // Get names, types and entries of selected objects - - virtual int type( const QString& ) const; - // Find type by entry: default implementation is to return -1 - // Please redefine it if you want function "selected" to work correctly - + private slots: virtual void onSelectionDone();