mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-07 00:34:17 +05:00
*** empty log message ***
This commit is contained in:
parent
62026dd2c8
commit
f4b5c42b70
@ -8,7 +8,12 @@
|
|||||||
// Author : Sergey LITONIN
|
// Author : Sergey LITONIN
|
||||||
// Module : SALOME
|
// Module : SALOME
|
||||||
|
|
||||||
#include "SMESHGUI_Operation.h"
|
#include <SMESHGUI_Operation.h>
|
||||||
|
#include <SMESHGUI.h>
|
||||||
|
#include <SMESHGUI_VTKUtils.h>
|
||||||
|
|
||||||
|
#include <SVTK_ViewWindow.h>
|
||||||
|
#include <SVTK_Selector.h>
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -20,8 +25,10 @@
|
|||||||
// name : SMESHGUI_Operation
|
// name : SMESHGUI_Operation
|
||||||
// Purpose : Constructor
|
// Purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMESHGUI_Operation::SMESHGUI_Operation( SalomeApp_Application* theApp )
|
SMESHGUI_Operation::SMESHGUI_Operation( SalomeApp_Application* app )
|
||||||
: SalomeApp_Operation( theApp )
|
: SalomeApp_Operation( app ),
|
||||||
|
myViewWindow( 0 ),
|
||||||
|
mySelector( 0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -31,5 +38,44 @@ SMESHGUI_Operation::~SMESHGUI_Operation()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Operation::setSelectionMode( const Selection_Mode mode )
|
||||||
|
{
|
||||||
|
if( myViewWindow )
|
||||||
|
myViewWindow->SetSelectionMode( mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Operation::highlight( const Handle( SALOME_InteractiveObject )& obj,
|
||||||
|
const bool hilight, const bool immediately )
|
||||||
|
{
|
||||||
|
if( myViewWindow )
|
||||||
|
myViewWindow->highlight( obj, hilight, immediately );
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Operation::addOrRemoveIndex( const Handle( SALOME_InteractiveObject )& obj,
|
||||||
|
const TColStd_MapOfInteger& indices, const bool isModeShift )
|
||||||
|
{
|
||||||
|
if( mySelector )
|
||||||
|
mySelector->AddOrRemoveIndex( obj, indices, isModeShift );
|
||||||
|
}
|
||||||
|
|
||||||
|
SMESHGUI* SMESHGUI_Operation::getSMESHGUI() const
|
||||||
|
{
|
||||||
|
return dynamic_cast<SMESHGUI*>( module() );
|
||||||
|
}
|
||||||
|
|
||||||
|
SVTK_ViewWindow* SMESHGUI_Operation::getViewWindow() const
|
||||||
|
{
|
||||||
|
return myViewWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
SVTK_Selector* SMESHGUI_Operation::getSelector() const
|
||||||
|
{
|
||||||
|
return mySelector;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SMESHGUI_Operation::startOperation()
|
||||||
|
{
|
||||||
|
SalomeApp_Operation::startOperation();
|
||||||
|
myViewWindow = SMESH::GetViewWindow( getSMESHGUI() );
|
||||||
|
mySelector = myViewWindow ? myViewWindow->GetSelector() : 0;
|
||||||
|
}
|
||||||
|
@ -13,6 +13,14 @@
|
|||||||
#define SMESHGUI_Operation_H
|
#define SMESHGUI_Operation_H
|
||||||
|
|
||||||
#include <SalomeApp_Operation.h>
|
#include <SalomeApp_Operation.h>
|
||||||
|
#include <SALOME_InteractiveObject.hxx>
|
||||||
|
#include <SVTK_Selection.h>
|
||||||
|
|
||||||
|
class SMESHGUI;
|
||||||
|
class SVTK_ViewWindow;
|
||||||
|
class SVTK_Selector;
|
||||||
|
class TColStd_MapOfInteger;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : SMESHGUI_Operation
|
Class : SMESHGUI_Operation
|
||||||
@ -24,10 +32,23 @@ class SMESHGUI_Operation : public SalomeApp_Operation
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
SMESHGUI_Operation( SalomeApp_Application* );
|
SMESHGUI_Operation( SalomeApp_Application* );
|
||||||
virtual ~SMESHGUI_Operation();
|
virtual ~SMESHGUI_Operation();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void setSelectionMode( const Selection_Mode );
|
||||||
|
void highlight( const Handle( SALOME_InteractiveObject )&, const bool, const bool = true );
|
||||||
|
void addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&, const TColStd_MapOfInteger&, const bool );
|
||||||
|
|
||||||
|
virtual void startOperation();
|
||||||
|
|
||||||
|
SMESHGUI* getSMESHGUI() const;
|
||||||
|
SVTK_ViewWindow* getViewWindow() const;
|
||||||
|
SVTK_Selector* getSelector() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
SVTK_ViewWindow* myViewWindow;
|
||||||
|
SVTK_Selector* mySelector;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user