Back to index

salome-gui  6.5.0
LightApp_Displayer.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef LIGHTAPP_DISPLAYER_HEADER
00024 #define LIGHTAPP_DISPLAYER_HEADER
00025 
00026 #include "LightApp.h"
00027 
00028 #include <SALOME_Prs.h>
00029 
00030 #include <Qtx.h>
00031 
00032 class QString;
00033 
00039 class LIGHTAPP_EXPORT LightApp_Displayer : public SALOME_Displayer
00040 {
00041 public:
00042   LightApp_Displayer();
00043   virtual ~LightApp_Displayer();
00044 
00045   void Display( const QString&, const bool = true, SALOME_View* = 0 );
00046   void Display( const QStringList&, const bool = true,
00047                 SALOME_View* = 0 );
00048 
00049   void Redisplay( const QString&, const bool = true );
00050 
00051   void Erase( const QStringList&, const bool forced = false,
00052               const bool updateViewer = true, SALOME_View* = 0);
00053   void Erase( const QString&, const bool forced = false, const bool updateViewer = true, SALOME_View* = 0 );
00054   void EraseAll( const bool forced = false, const bool updateViewer = true, SALOME_View* = 0 ) const;
00055 
00056   virtual bool IsDisplayed( const QString&, SALOME_View* = 0 ) const;
00057   void UpdateViewer() const;
00058 
00059   static SALOME_View*        GetActiveView();
00060   static LightApp_Displayer* FindDisplayer( const QString&, const bool );
00061 
00062   virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const;
00063           bool canBeDisplayed( const QString& /*entry*/ ) const;
00064          
00065          void setVisibilityState (const QString& entry, Qtx::VisibilityState) const;
00066 
00067 protected:
00068   virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
00069 protected:
00070   QString myLastEntry; 
00071 };
00072 
00073 #endif