geom/src/GEOMGUI/GEOMGUI_Selection.h

102 lines
3.8 KiB
C
Raw Normal View History

2014-02-18 12:44:41 +06:00
// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
2005-06-02 15:34:45 +06:00
//
2012-08-09 13:58:02 +06:00
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2005-06-02 15:34:45 +06:00
//
2012-08-09 13:58:02 +06:00
// 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
2014-02-18 12:44:41 +06:00
// version 2.1 of the License, or (at your option) any later version.
2005-06-02 15:34:45 +06:00
//
2012-08-09 13:58:02 +06:00
// 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.
2005-06-02 15:34:45 +06:00
//
2012-08-09 13:58:02 +06:00
// 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
2005-06-02 15:34:45 +06:00
//
2012-08-09 13:58:02 +06:00
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2013-04-01 18:25:01 +06:00
//
2012-08-09 13:58:02 +06:00
2009-02-13 17:16:39 +05:00
// File : GEOMGUI_Selection.h
// Author : Alexander SOLOVYOV, Open CASCADE S.A.S. (alexander.solovyov@opencascade.com)
2012-10-08 17:16:36 +06:00
2009-02-13 17:16:39 +05:00
#ifndef GEOMGUI_SELECTION_H
#define GEOMGUI_SELECTION_H
2005-06-02 15:34:45 +06:00
#include "GEOM_GEOMGUI.hxx"
#include <LightApp_Selection.h>
2012-08-09 13:58:02 +06:00
#include <SALOMEDSClient.hxx>
2005-06-02 15:34:45 +06:00
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(GEOM_Gen)
2009-02-13 17:16:39 +05:00
class LightApp_SelectionMgr;
2012-08-09 13:58:02 +06:00
class LightApp_DataOwner;
2009-02-13 17:16:39 +05:00
class GEOMGUI_EXPORT GEOMGUI_Selection : public LightApp_Selection
2005-06-02 15:34:45 +06:00
{
public:
GEOMGUI_Selection();
virtual ~GEOMGUI_Selection();
2012-08-09 13:58:02 +06:00
virtual void init( const QString&, LightApp_SelectionMgr* );
virtual bool processOwner( const LightApp_DataOwner* );
2009-02-13 17:16:39 +05:00
virtual QVariant parameter( const QString& ) const;
2012-08-09 13:58:02 +06:00
virtual QVariant parameter( const int, const QString& ) const;
static bool hasChildren( const _PTR(SObject)& );
static bool expandable( const _PTR(SObject)& );
static bool isCompoundOfVertices( GEOM::GEOM_Object_ptr );
static bool isFolder( const _PTR(SObject)& );
2012-08-09 13:58:02 +06:00
protected:
// virtual QVariant contextParameter( const QString& ) const;
// virtual QVariant objectParameter( const int, const QString& ) const;
2005-06-02 15:34:45 +06:00
private:
bool isVisible( const int ) const;
bool isAutoColor( const int ) const;
2012-08-09 13:58:02 +06:00
bool isImported( const int ) const;
QString typeName( const int ) const;
int typeId( const int ) const;
2005-06-02 15:34:45 +06:00
QString displayMode( const int ) const;
QString selectionMode() const;
2012-08-09 13:58:02 +06:00
bool isVectorsMode( const int ) const;
2012-10-08 17:16:36 +06:00
bool hasChildren( const int ) const;
int nbChildren( const int ) const;
2012-10-08 17:16:36 +06:00
bool hasConcealedChildren( const int ) const;
bool hasDisclosedChildren( const int ) const;
2012-08-09 13:58:02 +06:00
bool compoundOfVertices( const int ) const;
bool topLevel( const int ) const;
bool autoBringToFront( const int ) const;
2012-08-09 13:58:02 +06:00
bool isPhysicalMaterial( const int ) const;
2005-06-02 15:34:45 +06:00
bool isComponent( const int ) const;
bool isFolder( const int ) const;
bool hasDimensions( const int, bool&, bool& ) const;
bool hasHiddenDimensions( const int ) const;
bool hasVisibleDimensions( const int ) const;
2005-06-02 15:34:45 +06:00
GEOM::GEOM_Object_ptr getObject( const int ) const;
GEOM::GEOM_BaseObject_ptr getBaseObject( const int ) const;
2012-08-09 13:58:02 +06:00
bool hasImported() const;
bool allImported() const;
QVariant visibleProperty( const QString&, const QString& ) const;
private:
typedef QVector<GEOM::GEOM_BaseObject_var> GeomObjectVector;
2012-08-09 13:58:02 +06:00
private:
GeomObjectVector myObjects;
2005-06-02 15:34:45 +06:00
};
2012-08-09 13:58:02 +06:00
#endif