Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / Plot2d / Plot2d_ViewFrame.h
index ee92ee7ba4c325980f7cde14cbf9e78e98ef5136..275c432fb843a4d25e7c4c9613ca3fee3ae5b926 100644 (file)
@@ -15,6 +15,7 @@
 #include "QAD_Action.h"
 #include "Plot2d_Curve.h"
 #include "Plot2d_CurveContainer.h"
+#include "SALOME_Selection.h"
 #include <qmainwindow.h>
 #include <qmap.h>
 #include <qintdict.h>
@@ -34,7 +35,7 @@ class QAD_EXPORT Plot2d_ViewFrame : public QAD_ViewFrame, public QAD_PopupClient
 
   enum { NoOpId, FitAllId, FitAreaId, ZoomId, PanId, DumpId, 
         ModeXLinearId, ModeXLogarithmicId, ModeYLinearId, ModeYLogarithmicId,
-        LegendId, CurvePointsId, CurveLinesId, CurveSplinesId, SettingsId, FitDataId };
+        LegendId, CurvePointsId, CurveLinesId, CurveSplinesId, SettingsId, FitDataId, ChangeBackgroundId };
 public:
   /* Construction/destruction */
   Plot2d_ViewFrame( QWidget* parent, const QString& title = "" );
@@ -44,7 +45,7 @@ public:
   /* inherited */
   ViewType          getTypeView() const { return VIEW_PLOT2D; }
   QWidget*          getViewWidget();
-  void              SetSelectionMode( int mode ) {}
+  void              SetSelectionMode( Selection_Mode mode ) {}
   void              onAdjustTrihedron( ) {}
 
   /* popup management */
@@ -77,6 +78,13 @@ public:
   void           EraseAll();
   void           Repaint();
 
+  /* Reimplemented from SALOME_View */
+  void          Display( const SALOME_Prs2d* );
+  void          Erase( const SALOME_Prs2d*, const bool = false );
+  SALOME_Prs*   CreatePrs( const char* entry = 0 );
+  virtual void  BeforeDisplay( SALOME_Displayer* d );
+  virtual void  AfterDisplay ( SALOME_Displayer* d );
+
   /* event filter */
   bool    eventFilter( QObject* o, QEvent* e );
 
@@ -116,6 +124,9 @@ public:
   void    setVerScaleMode( const int mode, bool update = true );
   int     getVerScaleMode() const { return myYMode; }
 
+  void    incrementalPan ( const int incrX, const int incrY );
+  void    incrementalZoom( const int incrX, const int incrY );
+
 protected:
   void    createActions();
   int     testOperation( const QMouseEvent& );
@@ -145,6 +156,14 @@ public slots:
   void    onCurves();
   void    onSettings();
   void    onFitData();
+  void    onChangeBackground();
+
+  void    onPanLeft();
+  void    onPanRight();
+  void    onPanUp();
+  void    onPanDown();
+  void    onZoomIn();
+  void    onZoomOut();
 
 protected slots:
   void    onLegendClicked( long key );