Version: 9.16.0
Plot2d_ViewWindow.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// File : Plot2d_ViewWindow.h
24// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
25//
26#ifndef PLOT2D_VIEWWINDOW_H
27#define PLOT2D_VIEWWINDOW_H
28
29#include "Plot2d.h"
30#include <SUIT_ViewWindow.h>
31#include <QMap>
32
33
34#ifdef WIN32
35#pragma warning( disable:4251 )
36#endif
37
38class SUIT_Desktop;
39class Plot2d_Viewer;
41class QtxAction;
42class QImage;
43class QMenu;
44class QToolBar;
45
47{
48 Q_OBJECT
49
50public:
51 enum { DumpId,
52 ScaleOpId, FitAllId, FitRectId, ZoomId,
53 MoveOpId, PanId, GlobalPanId,
54 PModeXLinearId, PModeXLogarithmicId,
55 PModeYLinearId, PModeYLogarithmicId,
56 PModeNormLMaxId, PModeNormLMinId,
57 PModeNormRMaxId, PModeNormRMinId,
58 CurvPointsId, CurvLinesId, CurvSplinesId,
61 CloneId, PrintId,
62 AnalyticalCurveId };
63
64public:
66 virtual ~Plot2d_ViewWindow();
67
68 Plot2d_Viewer* getModel();
69 void putInfo( const QString&);
70 Plot2d_ViewFrame* getViewFrame();
71 QToolBar* getToolBar();
72 virtual void initLayout();
73 void contextMenuPopup( QMenu* );
74
75 virtual bool eventFilter( QObject*, QEvent* );
76
77 void createActions();
78 void createToolBar();
79
80 virtual QString getVisualParameters();
81 virtual void setVisualParameters( const QString& );
82
83 virtual void RefreshDumpImage();
84
85public slots:
86 void onChangeHorMode();
87 void onChangeVerMode();
88 void onChangeCurveMode();
89 void onChangeLegendMode();
90 void onChangeNormLMode();
91 void onChangeNormRMode();
92
93
94 void onFitAll();
95 void onFitRect();
96 void onZoom();
97 void onPanning();
98 void onGlobalPanning();
99 void onViewHorMode();
100 void onViewVerMode();
101 void onViewNormLMode();
102 void onViewNormRMode();
103 void onLegend();
104 void onCurves();
105
106 void onDumpView();
107 void onPrintView();
108
109protected:
110 virtual QImage dumpView();
111 virtual bool dumpViewToFormat( const QImage&,
112 const QString&,
113 const QString& );
114 virtual QString filter() const;
115
116signals:
117 void cloneView();
118
119private:
124};
125
126#ifdef WIN32
127#pragma warning( default:4251 )
128#endif
129
130#endif // PLOT2D_VIEWWINDOW_H
#define PLOT2D_EXPORT
Definition: Plot2d.h:36
Definition: Plot2d_ViewFrame.h:67
Plot2d view window.
Definition: Plot2d_ViewWindow.h:47
@ CurvSettingsId
Definition: Plot2d_ViewWindow.h:60
@ GlobalPanId
Definition: Plot2d_ViewWindow.h:53
@ CurvLinesId
Definition: Plot2d_ViewWindow.h:58
@ PModeNormRMaxId
Definition: Plot2d_ViewWindow.h:57
@ PModeYLinearId
Definition: Plot2d_ViewWindow.h:55
@ FitAllId
Definition: Plot2d_ViewWindow.h:52
@ LegendId
Definition: Plot2d_ViewWindow.h:59
@ DumpId
Definition: Plot2d_ViewWindow.h:51
@ PModeNormLMaxId
Definition: Plot2d_ViewWindow.h:56
@ CloneId
Definition: Plot2d_ViewWindow.h:61
@ PModeXLinearId
Definition: Plot2d_ViewWindow.h:54
Plot2d_ViewFrame * myViewFrame
Definition: Plot2d_ViewWindow.h:121
void cloneView()
Emitted when the "Clone View" action is activated.
QImage myDumpImage
Definition: Plot2d_ViewWindow.h:123
Plot2d_Viewer * myModel
Definition: Plot2d_ViewWindow.h:120
int myToolBar
Definition: Plot2d_ViewWindow.h:122
Definition: Plot2d_ViewModel.h:38
For more information see QT documentation.
Generic action class.
Definition: QtxAction.h:39
Definition: SUIT_Desktop.h:47
Definition: SUIT_ViewWindow.h:42
bool dumpViewToFormat(const QString &fileName, const QString &format)
Definition: SUIT_ViewWindow.cxx:125
virtual void setVisualParameters(const QString &parameters)
Definition: SUIT_ViewWindow.cxx:259
virtual QString getVisualParameters()
Definition: SUIT_ViewWindow.cxx:250
virtual QImage dumpView()
Definition: SUIT_ViewWindow.cxx:92
virtual QString filter() const
Definition: SUIT_ViewWindow.cxx:175
virtual void onDumpView()
Definition: SUIT_ViewWindow.cxx:165