Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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