mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-19 09:33:08 +05:00
71 lines
2.1 KiB
C
71 lines
2.1 KiB
C
![]() |
// Copyright (C) 2014 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 DEPENDENCYTREE_OBJECT_H
|
||
|
#define DEPENDENCYTREE_OBJECT_H
|
||
|
|
||
|
#include <GraphicsView_Object.h>
|
||
|
|
||
|
#include <QPen>
|
||
|
|
||
|
class DependencyTree_Object: public GraphicsView_Object
|
||
|
{
|
||
|
|
||
|
public:
|
||
|
DependencyTree_Object( const QString&, QGraphicsItem* = 0 );
|
||
|
~DependencyTree_Object();
|
||
|
|
||
|
virtual void compute() {};
|
||
|
|
||
|
virtual bool highlight( double, double );
|
||
|
virtual void unhighlight();
|
||
|
|
||
|
virtual bool select( double, double, const QRectF& );
|
||
|
virtual void unselect();
|
||
|
|
||
|
QString getEntry() const;
|
||
|
|
||
|
void updateName();
|
||
|
|
||
|
void setColor(const QColor& );
|
||
|
void setSelectColor(const QColor& );
|
||
|
void setMainObjectColor(const QColor& );
|
||
|
|
||
|
void setIsMainObject( bool );
|
||
|
|
||
|
private:
|
||
|
|
||
|
QPen getPen( const QColor& );
|
||
|
|
||
|
QColor myColor;
|
||
|
QColor mySelectColor;
|
||
|
QColor myMainObjectColor;
|
||
|
|
||
|
QGraphicsPolygonItem* myPolygonItem;
|
||
|
QGraphicsSimpleTextItem* myTextItem;
|
||
|
|
||
|
QString myEntry;
|
||
|
|
||
|
bool myIsMainObject;
|
||
|
bool myIsLongName;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|