Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / Plot2d / Plot2d_ViewFrame.h
index 9b611874fef48445450857f1220296d8ab99fdce..275c432fb843a4d25e7c4c9613ca3fee3ae5b926 100644 (file)
@@ -1,9 +1,10 @@
-//  File      : Plot2d_ViewFrame.h
-//  Created   : Wed Jun 27 16:38:42 2001
-//  Author    : Vadim SANDLER
-//  Project   : SALOME
-//  Module    : SALOMEGUI
-//  Copyright : Open CASCADE
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : Plot2d_ViewFrame.h
+//  Author : Vadim SANDLER
+//  Module : SALOME
 //  $Header$
 
 #ifndef Plot2d_ViewFrame_H
 
 #include "QAD_ViewFrame.h"
 #include "QAD_Popup.h"
+#include "QAD_Action.h"
 #include "Plot2d_Curve.h"
 #include "Plot2d_CurveContainer.h"
+#include "SALOME_Selection.h"
 #include <qmainwindow.h>
-#include <qaction.h>
 #include <qmap.h>
 #include <qintdict.h>
 #include <qwt_plot.h>
@@ -33,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 };
+        LegendId, CurvePointsId, CurveLinesId, CurveSplinesId, SettingsId, FitDataId, ChangeBackgroundId };
 public:
   /* Construction/destruction */
   Plot2d_ViewFrame( QWidget* parent, const QString& title = "" );
@@ -43,8 +45,8 @@ public:
   /* inherited */
   ViewType          getTypeView() const { return VIEW_PLOT2D; }
   QWidget*          getViewWidget();
-  void              SetSelectionMode( int mode ) {}
-  void              SetTrihedronSize( int dim ) {}
+  void              SetSelectionMode( Selection_Mode mode ) {}
+  void              onAdjustTrihedron( ) {}
 
   /* popup management */
   void              setPopupServer( QAD_Application* );
@@ -76,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 );
 
@@ -115,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& );
@@ -143,6 +155,15 @@ public slots:
   void    onLegend();
   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 );
@@ -152,7 +173,7 @@ protected slots:
 
 private:
   Plot2d_Plot2d*               myPlot;
-  QMap<int, QAction*>          myActions;
+  ActionMap                    myActions;
   int                          myOperation;
   QPoint                       myPnt;
   CurveDict                    myCurves;