Salome HOME
Fixing a bug : Salome GUI style needs addLibraryPath() method to be called
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewModel.h
index f523cb43f5397904c607ba4d8825fc853b4357bb..08bf29f06db89d9396493f83d76d7f92b103f87b 100755 (executable)
@@ -1,6 +1,7 @@
 #ifndef OCCVIEWER_VIEWMODEL_H
 #define OCCVIEWER_VIEWMODEL_H
 
+#include <qcolor.h>
 #include <qcursor.h>
 
 #include "OCCViewer.h"
@@ -48,7 +49,7 @@ public:
   static QString Type() { return "OCCViewer"; }
 
   OCCViewer_Viewer( bool DisplayTrihedron = true );
-       virtual ~OCCViewer_Viewer();
+  virtual ~OCCViewer_Viewer();
 
   void update();
 
@@ -72,9 +73,22 @@ public:
   virtual void                    updateViewAspects( const viewAspectList& );
   virtual void                    clearViewAspects();
 
-public slots:
-       void onClearViewAspects();
+  QColor                          backgroundColor() const;
+  void                            setBackgroundColor( const QColor& );
+
+  //! returns true if 3d Trihedron in viewer was created
+  bool                            trihedronActivated() const { return !myTrihedron.IsNull(); }
+
+  void                            toggleTrihedron();
+  bool                            isTrihedronVisible() const;
+  virtual void                    setTrihedronShown( const bool );
+
+  int                             trihedronSize() const;
+  virtual void                    setTrihedronSize( const int );
 
+public slots:
+  void                            onClearViewAspects();
 public:
   Handle(V3d_Viewer)              getViewer3d()    const { return myV3dViewer;}
   Handle(V3d_Viewer)              getCollector3d() const { return myV3dCollector; }
@@ -117,15 +131,17 @@ protected slots:
 private:
   Handle(V3d_Viewer)              myV3dViewer;
   Handle(V3d_Viewer)              myV3dCollector;
-  Handle(AIS_InteractiveContext)  myAISContext;
+
   Handle(AIS_Trihedron)           myTrihedron;
+  Handle(AIS_InteractiveContext)  myAISContext;
 
   viewAspectList                  myViewAspects;
 
-  bool mySelectionEnabled;
-  bool myMultiSelectionEnabled;
+  bool                            mySelectionEnabled;
+  bool                            myMultiSelectionEnabled;
 
-  QPoint myStartPnt, myEndPnt;
+  QColor                          myBgColor;
+  QPoint                          myStartPnt, myEndPnt;
 };
 
 #ifdef WIN32