enum TransformationPointType { None = 0, PointA, PointB, PointC };
struct TransformationPoint
{
- QPoint Point;
- QString Caption;
- QGraphicsEllipseItem* PointItem;
- QGraphicsSimpleTextItem* CaptionItem;
+ TransformationPoint() : Point( 0, 0 ), Caption( "" ), GroupItem( 0 ) {}
+
+ QPoint Point;
+ QString Caption;
+ QGraphicsItemGroup* GroupItem;
};
typedef QMap < int, TransformationPoint > TransformationPointMap;
typedef QMapIterator< int, TransformationPoint > TransformationPointMapIterator;
virtual ~HYDROGUI_PrsImage();
public:
- void setImage( const QImage& theImage );
+ void setImage( const QImage& theImage,
+ const bool theCompute = false );
QImage getImage() const;
void setCaption( const QString& theCaption );
virtual void setSelected( bool theState );
protected:
- void computeTransformationPoints();
+ void computeTransformationPoints( const bool theObligatoryInit = false );
+
+ QGraphicsItemGroup* createPointItem( const QString& theCaption,
+ const QColor& theColor );
+
+ /**
+ * Create presentations for transformation points A, B and C or update the presentation
+ * parameters if it is already created
+ */
+ void initTrsfPoints( const int thePointType );
/**
* Show/hide a transformation point if necessary.
*/