Version: 6.3.1

src/Plot2d/Plot2d_ViewWindow.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File   : Plot2d_ViewWindow.h
00024 // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
00025 //
00026 #ifndef PLOT2D_VIEWWINDOW_H
00027 #define PLOT2D_VIEWWINDOW_H
00028 
00029 #include "Plot2d.h"
00030 #include <SUIT_ViewWindow.h>
00031 #include <QMap>
00032 
00033 
00034 #ifdef WIN32
00035 #pragma warning( disable:4251 )
00036 #endif
00037 
00038 class SUIT_Desktop;
00039 class Plot2d_Viewer;
00040 class Plot2d_ViewFrame;
00041 class QtxAction;
00042 class QImage;
00043 class QMenu;
00044 class QToolBar;
00045 
00046 class PLOT2D_EXPORT Plot2d_ViewWindow : public SUIT_ViewWindow  
00047 {
00048   Q_OBJECT
00049 
00050 public:
00051   enum { DumpId, 
00052          ScaleOpId, FitAllId, FitRectId, ZoomId,
00053          MoveOpId, PanId, GlobalPanId,
00054          PModeXLinearId, PModeXLogarithmicId, 
00055          PModeYLinearId, PModeYLogarithmicId,
00056       CurvPointsId, CurvLinesId, CurvSplinesId, 
00057       LegendId,
00058       CurvSettingsId,
00059       CloneId, PrintId };
00060 
00061 public:
00062   Plot2d_ViewWindow( SUIT_Desktop*, Plot2d_Viewer* );
00063   virtual ~Plot2d_ViewWindow();
00064 
00065   Plot2d_Viewer*    getModel();
00066   void              putInfo( const QString&);
00067   Plot2d_ViewFrame* getViewFrame();
00068   QToolBar*         getToolBar();
00069   virtual void      initLayout();
00070   void              contextMenuPopup( QMenu* );
00071 
00072   virtual bool      eventFilter( QObject*, QEvent* );
00073 
00074   void              createActions();
00075   void              createToolBar();
00076 
00077   virtual QString   getVisualParameters();
00078   virtual void      setVisualParameters( const QString& );
00079   
00080   virtual void      RefreshDumpImage();
00081 
00082 public slots:
00083   void              onChangeHorMode();
00084   void              onChangeVerMode();
00085   void              onChangeCurveMode();
00086   void              onChangeLegendMode();
00087   
00088   void              onFitAll();
00089   void              onFitRect();
00090   void              onZoom();
00091   void              onPanning();
00092   void              onGlobalPanning();
00093   void              onViewHorMode();
00094   void              onViewVerMode();
00095   void              onLegend();
00096   void              onCurves();
00097 
00098   void              onDumpView();
00099   void              onPrintView();
00100 
00101 protected:
00102   virtual QImage    dumpView();
00103   virtual bool      dumpViewToFormat( const QImage&, 
00104                                       const QString&, 
00105                                       const QString& );
00106   virtual QString   filter() const;
00107 
00108 signals:
00109   void              cloneView();
00110 
00111 private:
00112   Plot2d_Viewer*    myModel;
00113   Plot2d_ViewFrame* myViewFrame;
00114   int               myToolBar;
00115   QImage            myDumpImage;
00116 };
00117 
00118 #ifdef WIN32
00119 #pragma warning( default:4251 )
00120 #endif
00121 
00122 #endif // PLOT2D_VIEWWINDOW_H
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS