Version: 9.16.0
SPlot2d_ViewModel.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 : SPlot2d_ViewModel.h
24// Author : Sergey RUIN
25// Module : SUIT
26//
27#ifndef SPlot2d_ViewModel_H
28#define SPlot2d_ViewModel_H
29
30#include "SPlot2d.h"
31#include "SPlot2d_Curve.h"
32#include "Plot2d_ViewModel.h"
33#include "Plot2d_ViewFrame.h"
34#include "Plot2d_ViewWindow.h"
35
36#include <SALOME_Prs.h>
38#include <SALOME_ListIO.hxx>
39
41{
42 Q_OBJECT
43
44public:
45 static QString Type() { return "Plot2d"; }
46
47 /* Construction/destruction */
48 SPlot2d_Viewer( bool theAutoDel = false );
49 virtual ~SPlot2d_Viewer();
50
51public:
52 virtual QString getType() const { return Type(); }
53
54 /* interactive object management */
55 void highlight( const Handle(SALOME_InteractiveObject)& /*IObject*/, bool /*highlight*/, bool /*update*/ = true ) {}
57 void rename( const Handle(SALOME_InteractiveObject)&, const QString&, Plot2d_ViewFrame* = 0 );
58 void renameAll( const Handle(SALOME_InteractiveObject)&, const QString& );
59 bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
60
61 virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
62
63 /* display */
64 void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
65 void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
66 void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
67
68 /* Reimplemented from SALOME_View */
69 void Display( const SALOME_Prs2d* );
70 void Erase( const SALOME_Prs2d*, const bool = false );
71 virtual void EraseAll(SALOME_Displayer*, const bool = false);
72 virtual void Repaint();
73 virtual SALOME_Prs* CreatePrs( const char* entry = 0 );
74
75 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& IObject );
76 virtual void GetVisible( SALOME_ListIO& theList );
77
78 virtual void setObjectsSelected( SALOME_ListIO& theList );
79
80
81 /* operations */
83 Plot2d_ViewFrame* getActiveViewFrame();
84 Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
85
86protected slots:
87 virtual void onClicked( const QVariant&, int );
88
89signals:
90 void legendSelected( const QString& );
92private:
94};
95
96
97#endif // SPlot2d_ViewModel_H
98
99
100
101
Handle(TDocStd_Application) CAF_Application
Get OCAF application.
Definition: CAF_Application.cxx:97
#define SPLOT2D_EXPORT
Definition: SPlot2d.h:30
Definition: Plot2d_ViewFrame.h:67
Definition: Plot2d_ViewModel.h:38
virtual SUIT_ViewWindow * createView(SUIT_Desktop *theDesktop)
Definition: Plot2d_ViewModel.cxx:60
static QString Type()
Definition: Plot2d_ViewModel.h:42
virtual void onClicked(const QVariant &, int)
Definition: Plot2d_ViewModel.cxx:223
Definition: SALOME_Prs.h:366
Definition: SALOME_ListIO.hxx:29
Definition: SALOME_Prs.h:247
Definition: SALOME_Prs.h:53
Definition: SALOME_Prs.h:292
virtual bool isVisible(const Handle(SALOME_InteractiveObject)&)
Definition: SALOME_Prs.h:356
virtual void GetVisible(SALOME_ListIO &)
Definition: SALOME_Prs.h:358
void Erase(SALOME_Displayer *, const SALOME_Prs *, const bool=false)
This Erase() method should be called to erase given presentation created anywhere by anybody.
Definition: SALOME_Prs.cxx:340
void Display(SALOME_Displayer *, const SALOME_Prs *)
This Display() method should be called to display given presentation created anywhere by anybody.
Definition: SALOME_Prs.cxx:331
virtual void Repaint()
Null body here.
Definition: SALOME_Prs.h:357
virtual SALOME_Prs * CreatePrs(const char *=0)
Creates empty presentation of corresponding type.
Definition: SALOME_Prs.h:344
virtual void EraseAll(SALOME_Displayer *, const bool=false)
This EraseAll() method should be called to erase all presentations created anywhere by anybody.
Definition: SALOME_Prs.cxx:431
Definition: SPlot2d_Curve.h:37
Definition: SPlot2d_ViewModel.h:41
void clearSelected()
virtual QString getType() const
Definition: SPlot2d_ViewModel.h:52
void highlight(const Handle(SALOME_InteractiveObject)&, bool, bool=true)
Definition: SPlot2d_ViewModel.h:55
static QString Type()
Definition: SPlot2d_ViewModel.h:45
void legendSelected(const QString &)
bool myDeselectAnalytical
Definition: SPlot2d_ViewModel.h:93
void unHighlightAll()
Definition: SPlot2d_ViewModel.h:56
Handle(SALOME_InteractiveObject) FindIObject(const char *Entry)
Definition: SUIT_Desktop.h:47
Definition: SUIT_ViewWindow.h:42