Salome HOME
327578f6a8e575401cde409a4afce2057a375b46
[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   virtual   SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
32
33   /* Reimplemented from SALOME_View */
34   virtual void                Display( const SALOME_OCCPrs* );
35   virtual void                Erase( const SALOME_OCCPrs*, const bool = false );
36   virtual void                EraseAll( const bool = false );
37   virtual SALOME_Prs*         CreatePrs( const char* entry = 0 );
38   virtual void                BeforeDisplay( SALOME_Displayer* d );
39   virtual void                AfterDisplay ( SALOME_Displayer* d );
40   virtual void                LocalSelection( const SALOME_OCCPrs*, const int );
41   virtual void                GlobalSelection( const bool = false ) const;
42   virtual bool                isVisible( const Handle(SALOME_InteractiveObject)& );
43   virtual void                Repaint();
44
45   // a utility function, used by SALOME_View_s methods
46   bool                        getTrihedronSize( double& theNewSize, double& theSize );
47
48 };
49
50 #ifdef WIN32
51 #pragma warning( default:4251 )
52 #endif
53
54 #endif