Salome HOME
58a97cbc041b0ff5879f79476eb0ef0ee0f92ec1
[modules/med.git] / src / MEDCalc / gui / MEDCALCGUI_Displayer.hxx
1 // Copyright (C) 2021-2023  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // File   : MEDCALCGUI_Displayer.h
21 // Author : Roman NIKOLAEV, Open CASCADE S.A.S. (roman.nikolaev@opencascade.com)
22 //
23 #ifndef MEDCALCGUI_DISPLAYER_H
24 #define MEDCALCGUI_DISPLAYER_H
25 #include <SALOMEconfig.h>
26 #include CORBA_CLIENT_HEADER(MEDPresentationManager)
27 #include <LightApp_Displayer.h>
28
29 #include "MEDCALCGUI.hxx"
30
31 class PresentationController;
32
33 class MEDCALCGUI_EXPORT MEDCALCGUI_Displayer : public LightApp_Displayer
34 {
35
36 public:
37   /* Constructor */
38   MEDCALCGUI_Displayer(PresentationController* presentationController);
39   /* Destructor */
40   virtual ~MEDCALCGUI_Displayer() override;
41   virtual void Display(const QStringList&, const bool = true, SALOME_View* = 0) override;
42   virtual void Erase(const QStringList&, const bool forced = false, const bool updateViewer = true, SALOME_View* = 0) override;
43   virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const override;
44   virtual bool IsDisplayed(const QString& /*entry*/, SALOME_View* = 0) const override;
45
46 private:
47   void changeVisibility(const QStringList& list, const bool visible);
48   MEDCALC::PresentationVisibility visibilityState(const QString& entry) const;
49
50 private:
51   PresentationController* _presentationController;
52 };
53
54 #endif // MEDCALCGUI_DISPLAYER_H
55