// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef GEOMGUI_ANNOTATIONMGR_H #define GEOMGUI_ANNOTATIONMGR_H #include "GEOM_GEOMGUI.hxx" #include #include CORBA_SERVER_HEADER(GEOM_Gen) #include #include #include class SalomeApp_Application; class GEOM_Displayer; /*! * \brief A help class to process visualizatin of annotation presentations. * It contains a map of presentations shown in each viewer. * and correct 2D position persistent properties of annotations of active viewer. * When the viewer is closed, information about the viewer is removed from the manager */ class GEOMGUI_EXPORT GEOMGUI_AnnotationMgr : public QObject { Q_OBJECT; public: GEOMGUI_AnnotationMgr( SalomeApp_Application* theApplication ); ~GEOMGUI_AnnotationMgr() {} SALOME_Prs* CreatePresentation(const GEOMGUI_AnnotationAttrs::Properties& theProperty, GEOM::GEOM_Object_ptr theObject); //void DisplayPresentation(SALOME_Prs* thePresentation); //void erasePresentation(SALOME_Prs* thePresentation); bool IsDisplayed(const QString& theEntry, const int theIndex); void Display(const QString& theEntry, const int theIndex); void Erase(const QString& theEntry, const int theIndex); protected: SalomeApp_Application* getApplication() const { return myApplication; } GEOM_Displayer* getDisplayer() const; void getObject( const QString& theEntry, const int theIndex, GEOM::GEOM_Object_ptr& anObject, GEOMGUI_AnnotationAttrs::Properties& aProperty ); private: SalomeApp_Application* myApplication; typedef QMap AnnotationToPrs; typedef QMap EntryToAnnotations; QMap myVisualized; }; #endif