Salome HOME
Merge from BR_new_bop4 (porting to new OCCT BOP) 13/09/2013
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewModel.h
index 46c1e47869abe9157c08d9619b49bccf03444ac1..e6893e3073b4fdd967188a3aca643d1775de4277 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -129,8 +129,13 @@ public:
   int                             zoomingStyle() const;
   void                            setZoomingStyle( const int );
 
+  void                            enablePreselection(bool isEnabled);
+  bool                            isPreselectionEnabled() const;
+  
   void                            enableSelection(bool isEnabled);
-  bool                            isSelectionEnabled() const { return mySelectionEnabled; }
+  bool                            isSelectionEnabled() const;
+
+  void                            setSelectionOptions( bool, bool );
 
   void                            enableMultiselection(bool isEnable);
   bool                            isMultiSelectionEnabled() const { return myMultiSelectionEnabled; }
@@ -142,7 +147,7 @@ public:
 
   /* Selection management */
   bool    highlight( const Handle(AIS_InteractiveObject)&, bool, bool=true );
-  bool    unHighlightAll( bool=true ); 
+  bool    unHighlightAll( bool=true, bool=true ); 
   bool    isInViewer( const Handle(AIS_InteractiveObject)&, bool=false );
   bool    isVisible( const Handle(AIS_InteractiveObject)& );
 
@@ -164,6 +169,7 @@ protected slots:
   virtual void onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
   virtual void onKeyPress(SUIT_ViewWindow*, QKeyEvent*);
   virtual void onViewClosed();
+  virtual void onViewMapped();
 
   void onDumpView();
   void onChangeBackground();
@@ -178,6 +184,7 @@ protected:
   int                             myInteractionStyle;
   int                             myZoomingStyle;
 
+  bool                            myPreselectionEnabled;
   bool                            mySelectionEnabled;
   bool                            myMultiSelectionEnabled;
   bool                            myIsRelative;
@@ -185,7 +192,7 @@ protected:
   int                             myTopLayerId;
 
   //QColor                          myBgColor;
-  QPoint                          myStartPnt, myEndPnt;
+  QPoint                          myStartPnt, myEndPnt, myCurPnt;
 
   bool                            myShowStaticTrihedron;