Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / XGUI / XGUI_Viewer.h
index 92bc5319220d46ce48d005dc215d39f1c811e205..654221a595bd99b13f7b0c5c8bff3e3f1ee13e9d 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef XGUI_Viewer_H
 #define XGUI_Viewer_H
 
@@ -18,49 +17,62 @@ class XGUI_ViewWindow;
 class QMouseEvent;
 class QKeyEvent;
 
-class XGUI_Viewer : public QObject
+class XGUI_Viewer: public QObject
 {
-    Q_OBJECT
+Q_OBJECT
 public:
-    static QString backgroundData( QStringList&, QIntList&, QIntList& );
-    
-    XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron = true);
-    ~XGUI_Viewer();
-
-    QMdiSubWindow* createView(V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
-
-    XGUI_MainWindow* mainWindow() const { return myMainWindow; }
-
-    Handle(V3d_Viewer) v3dViewer() const { return myV3dViewer; }
-
-    Handle(AIS_InteractiveContext) AISContext() const { return myAISContext; }
-
-    Handle(AIS_Trihedron) trihedron() const { return myTrihedron; }
-
-    void toggleTrihedron();
-    bool isTrihedronVisible() const;
-    void setTrihedronShown( const bool on );
-    double trihedronSize() const;
-    void setTrihedronSize( const double sz, bool isRelative );
-    bool trihedronRelative() const { return myIsRelative; }
-    void updateTrihedron();
-    bool computeTrihedronSize( double& theNewSize, double& theSize );
-
-
-
-    static void setHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
-                                  Qt::KeyboardModifiers theState, Qt::MouseButtons theButton );
-    static void getHotButton( XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
-                                  Qt::KeyboardModifiers& theState, Qt::MouseButtons& theButton );
-
-    typedef QMap<XGUI::HotOperation, Qt::KeyboardModifiers> StatesMap;
-    typedef QMap<XGUI::HotOperation, Qt::MouseButtons>      ButtonsMap;
-
-    typedef QMap<XGUI::InteractionStyle, StatesMap>  InteractionStyle2StatesMap;
-    typedef QMap<XGUI::InteractionStyle, ButtonsMap> InteractionStyle2ButtonsMap;
-
-    static InteractionStyle2StatesMap  myStateMap;
-    static InteractionStyle2ButtonsMap myButtonMap;
+  static QString backgroundData(QStringList&, QIntList&, QIntList&);
+
+  XGUI_Viewer(XGUI_MainWindow* theParent, bool DisplayTrihedron = true);
+  ~XGUI_Viewer();
+
+  QMdiSubWindow* createView(V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
+
+  XGUI_MainWindow* mainWindow() const
+  {
+    return myMainWindow;
+  }
+
+  Handle(V3d_Viewer) v3dViewer() const
+  {
+    return myV3dViewer;
+  }
+
+  Handle(AIS_InteractiveContext) AISContext() const
+  {
+    return myAISContext;
+  }
+
+  Handle(AIS_Trihedron) trihedron() const
+  {
+    return myTrihedron;
+  }
+
+  void toggleTrihedron();
+  bool isTrihedronVisible() const;
+  void setTrihedronShown(const bool on);
+  double trihedronSize() const;
+  void setTrihedronSize(const double sz, bool isRelative);
+  bool trihedronRelative() const
+  {
+    return myIsRelative;
+  }
+  void updateTrihedron();
+  bool computeTrihedronSize(double& theNewSize, double& theSize);
+
+  static void setHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
+                           Qt::KeyboardModifiers theState, Qt::MouseButtons theButton);
+  static void getHotButton(XGUI::InteractionStyle theInteractionStyle, XGUI::HotOperation theOper,
+                           Qt::KeyboardModifiers& theState, Qt::MouseButtons& theButton);
+
+  typedef QMap<XGUI::HotOperation, Qt::KeyboardModifiers> StatesMap;
+  typedef QMap<XGUI::HotOperation, Qt::MouseButtons> ButtonsMap;
+
+  typedef QMap<XGUI::InteractionStyle, StatesMap> InteractionStyle2StatesMap;
+  typedef QMap<XGUI::InteractionStyle, ButtonsMap> InteractionStyle2ButtonsMap;
+
+  static InteractionStyle2StatesMap myStateMap;
+  static InteractionStyle2ButtonsMap myButtonMap;
 
 signals:
     void lastViewClosed();
@@ -87,24 +99,22 @@ private:
     void removeView(QMdiSubWindow* theView);
 
 private:
-    XGUI_MainWindow* myMainWindow;
+  XGUI_MainWindow* myMainWindow;
 
-    Handle(V3d_Viewer)              myV3dViewer;
-    Handle(AIS_Trihedron)           myTrihedron;
-    Handle(AIS_InteractiveContext)  myAISContext;
-    
-    XGUI::InteractionStyle myInteractionStyle;
-  
-    bool myPreselectionEnabled;
-    bool mySelectionEnabled;
-    bool myMultiSelectionEnabled;
-    bool myIsRelative;
+  Handle(V3d_Viewer) myV3dViewer;Handle(AIS_Trihedron) myTrihedron;Handle(AIS_InteractiveContext) myAISContext;
+
+  XGUI::InteractionStyle myInteractionStyle;
+
+  bool myPreselectionEnabled;
+  bool mySelectionEnabled;
+  bool myMultiSelectionEnabled;
+  bool myIsRelative;
 
-    double myTrihedronSize;
+  double myTrihedronSize;
   
     QList<QMdiSubWindow*> myViews;
 
     QMdiSubWindow* myActiveView;
 };
 
-#endif
\ No newline at end of file
+#endif