Back to index

salome-geom  6.5.0
GEOMGUI_Selection.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 // File   : GEOMGUI_Selection.h
00024 // Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
00025 //
00026 #ifndef GEOMGUI_SELECTION_H
00027 #define GEOMGUI_SELECTION_H
00028 
00029 #include "GEOM_GEOMGUI.hxx"
00030 
00031 #include <LightApp_Selection.h>
00032 #include <SALOMEDSClient.hxx>
00033 
00034 #include <SALOMEconfig.h>
00035 #include CORBA_SERVER_HEADER(GEOM_Gen)
00036 
00037 class LightApp_SelectionMgr;
00038 class LightApp_DataOwner;
00039 
00040 class GEOMGUI_EXPORT GEOMGUI_Selection : public LightApp_Selection
00041 {
00042 public:
00043   GEOMGUI_Selection();
00044   virtual ~GEOMGUI_Selection();
00045 
00046   virtual void          init( const QString&, LightApp_SelectionMgr* );
00047   virtual bool          processOwner( const LightApp_DataOwner* );
00048 
00049   virtual QVariant      parameter( const QString& ) const;
00050   virtual QVariant      parameter( const int, const QString& ) const;
00051 
00052   static bool           hasChildren( const _PTR(SObject)& );
00053   static bool           expandable( const _PTR(SObject)& );
00054   static bool           isCompoundOfVertices( GEOM::GEOM_Object_ptr );
00055 
00056 protected:
00057   //  virtual QVariant      contextParameter( const QString& ) const;
00058   //  virtual QVariant      objectParameter( const int, const QString& ) const;
00059 
00060 private:
00061   bool                  isVisible( const int ) const;
00062   bool                  isAutoColor( const int ) const;
00063   bool                  isImported( const int ) const;
00064   QString               typeName( const int ) const;
00065   int                   typeId( const int ) const;
00066   QString               displayMode( const int ) const;
00067   QString               selectionMode() const;
00068   bool                  isVectorsMode( const int ) const;
00069   bool                  hasHiddenChildren( const int ) const;
00070   bool                  hasShownChildren( const int ) const;
00071   bool                  compoundOfVertices( const int ) const;
00072   bool                  topLevel( const int ) const;
00073   bool                  isPhysicalMaterial( const int ) const;
00074 
00075   bool                  isComponent( const int ) const;
00076   GEOM::GEOM_Object_ptr getObject( const int ) const;
00077 
00078   bool                  hasImported() const;
00079   bool                  allImported() const;
00080 
00081   QVariant              visibleProperty( const QString&, const QString& ) const;
00082 
00083 private:
00084   typedef QVector<GEOM::GEOM_Object_var> GeomObjectVector;
00085 
00086 private:
00087   GeomObjectVector      myObjects;
00088 };
00089 
00090 #endif