1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #if !defined(_PLOT2D_VIEWMODEL_H)
24 #define _PLOT2D_VIEWMODEL_H
27 #include "SUIT_ViewModel.h"
28 #include <qwt_plot_item.h>
30 class SUIT_ViewWindow;
32 class Plot2d_ViewFrame;
37 class PLOT2D_EXPORT Plot2d_Viewer: public SUIT_ViewModel
42 static QString Type() { return "Plot2d"; }
44 Plot2d_Viewer(bool theAutoDel = false);
47 virtual void setViewManager( SUIT_ViewManager* );
48 virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
49 virtual QString getType() const { return Type(); }
50 virtual void contextMenuPopup(QMenu*);
51 Plot2d_Prs* getPrs() const { return myPrs; };
52 void setPrs(Plot2d_Prs* thePrs);
55 void setAutoDel(bool theDel);
58 void viewCloned( SUIT_ViewWindow* );
61 void onChangeBgColor();
64 virtual void onCloneView( Plot2d_ViewFrame*, Plot2d_ViewFrame* );
65 virtual void onLegendClicked( QwtPlotItem* );
72 #endif // !defined(_PLOT2D_VIEWMODEL_H)