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 #ifndef HYDROGUI_ABSTRACT_DISPLAYER_H
24 #define HYDROGUI_ABSTRACT_DISPLAYER_H
26 #include <HYDROData_Entity.h>
28 class HYDROGUI_Module;
29 class SUIT_ViewManager;
32 * \class HYDROGUI_DataModel
33 * \brief Class intended to create, display and update the presentations.
35 class HYDROGUI_AbstractDisplayer
40 * \param theModule module object
42 HYDROGUI_AbstractDisplayer( HYDROGUI_Module* theModule );
47 virtual ~HYDROGUI_AbstractDisplayer();
51 * \brief Check if this displayer is applicable to the given view manager.
52 * The view manager method getType is used.
53 * \param theViewerId viewer identifier
55 virtual bool IsApplicable( const int theViewerId ) const;
58 * \brief Check if this displayer is applicable to the given view manager.
59 * The view manager method getType is used.
60 * \param theViewMgr the view manager to check
62 virtual bool IsApplicable( const SUIT_ViewManager* theViewMgr ) const;
65 * \brief Update all objects in the viewer.
66 * \param theViewerId viewer identifier
67 * \param theIsInit flag used for initial update
68 * \param theIsForced flag used to update all objects, including the unchanged ones
70 virtual void UpdateAll( const int theViewerId,
72 const bool theIsForced,
73 const bool theDoFitAll );
76 * \brief Force the specified objects to be updated.
77 * \param theObjs sequence of objects to update
78 * \param theViewerId viewer identifier
80 virtual void SetToUpdate( const HYDROData_SequenceOfObjects& theObjs,
81 const int theViewerId ) = 0;
84 * \brief Get the applicable viewer type.
86 virtual QString GetType() const = 0;
90 * \brief Update and display all objects in the viewer.
91 * \param theViewerId viewer identifier
92 * \param theIsForced flag used to update all objects, including the unchanged ones
94 virtual void DisplayAll( const int theViewerId,
95 const bool theIsForced,
96 const bool theDoFitAll );
99 * \brief Update the specified viewer objects.
100 * \param theObjs sequence of objects to update
101 * \param theViewerId viewer identifier
102 * \param theIsForced flag used to update all objects, including the unchanged ones
103 * \param theDoFitAll flag used to fit the view to all visible objects; do not fit by default
105 virtual void Update( const HYDROData_SequenceOfObjects& theObjs,
106 const int theViewerId,
107 const bool theIsForced,
108 const bool theDoFitAll );
111 * \brief Erase all viewer objects.
112 * \param theViewerId viewer identifier
114 virtual void EraseAll( const int theViewerId ) = 0;
117 * \brief Erase the specified viewer objects.
118 * \param theObjs sequence of objects to erase
119 * \param theViewerId viewer identifier
121 virtual void Erase( const HYDROData_SequenceOfObjects& theObjs,
122 const int theViewerId ) = 0;
125 * \brief Display the specified viewer objects.
126 * \param theObjs sequence of objects to display
127 * \param theViewerId viewer identifier
128 * \param theIsForced flag used to update all objects, including the unchanged ones
129 * \param theDoFitAll flag used to fit the view to all visible objects; do not fit by default
131 virtual void Display( const HYDROData_SequenceOfObjects& theObjs,
132 const int theViewerId,
133 const bool theIsForced,
134 const bool theDoFitAll ) = 0;
138 * \brief Purge all invalid objects in the viewer.
139 * \param theViewerId viewer identifier
141 virtual void purgeObjects( const int theViewerId ) = 0;
143 HYDROGUI_Module* module() const {return myModule;}
146 HYDROGUI_Module* myModule;