Salome HOME
IPAL9182: linking to libSPlot2d.so added
[modules/gui.git] / src / SOCC / SOCC_ViewModel.h
1 #ifndef SOCC_VIEWMODEL_H
2 #define SOCC_VIEWMODEL_H
3
4 #ifdef WIN32
5 #pragma warning( disable:4251 )
6 #endif
7
8 #include "SOCC.h"
9 #include "SALOME_Prs.h"
10 #include "OCCViewer_ViewModel.h"
11 #include "SALOME_InteractiveObject.hxx"
12
13 class SOCC_EXPORT SOCC_Viewer: public OCCViewer_Viewer, public SALOME_View
14 {
15   Q_OBJECT
16
17 public:
18   SOCC_Viewer( bool DisplayTrihedron = true );
19   virtual ~SOCC_Viewer();
20
21   /* Selection management */
22   bool      highlight( const Handle(SALOME_InteractiveObject)&, bool, bool=true );
23   bool      isInViewer( const Handle(SALOME_InteractiveObject)&, bool=false );
24
25   void      setColor( const Handle(SALOME_InteractiveObject)&, const QColor&, bool=true );
26   void      switchRepresentation( const Handle(SALOME_InteractiveObject)&, int, bool=true );
27   void      setTransparency( const Handle(SALOME_InteractiveObject)&, float, bool=true );
28
29   void      rename( const Handle(SALOME_InteractiveObject)&, const QString& );
30
31   /* Reimplemented from SALOME_View */
32   virtual void                Display( const SALOME_OCCPrs* );
33   virtual void                Erase( const SALOME_OCCPrs*, const bool = false );
34   virtual void                EraseAll( const bool = false );
35   virtual SALOME_Prs*         CreatePrs( const char* entry = 0 );
36   virtual void                BeforeDisplay( SALOME_Displayer* d );
37   virtual void                AfterDisplay ( SALOME_Displayer* d );
38   virtual void                LocalSelection( const SALOME_OCCPrs*, const int );
39   virtual void                GlobalSelection( const bool = false ) const;
40   virtual bool                isVisible( const Handle(SALOME_InteractiveObject)& );
41   virtual void                Repaint();
42
43   // a utility function, used by SALOME_View_s methods
44   bool                        getTrihedronSize( double& theNewSize, double& theSize );
45
46 };
47
48 #ifdef WIN32
49 #pragma warning( default:4251 )
50 #endif
51
52 #endif