#include <SalomeApp_Module.h>
#include <SalomeApp_Application.h>
#include <SalomeApp_Operation.h>
-#include <SalomeApp_DataOwner.h>
-#include <SalomeApp_DataSubOwner.h>
#include <SalomeApp_SelectionMgr.h>
#include <SUIT_Desktop.h>
-
/*
Class : SalomeApp_Operation
Description : Base class for all operations
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<SalomeApp_DataOwner*>( (*anIt).operator->() );
- SalomeApp_DataSubOwner* subowner = dynamic_cast<SalomeApp_DataSubOwner*>( (*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
if ( myModule != 0 )
myModule->update( flags );
}
+
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();