#include <QStringList>
-static const Standard_GUID GUID_MUST_BE_UPDATED("80f2bb81-3873-4631-8ddd-940d2119f000");
static const Standard_GUID GUID_SELF_SPLITTED("997995aa-5c19-40bf-9a60-ab4b70ad04d8");
static const Standard_GUID GUID_HAS_LOCAL_POINTS("FD8841AA-FC44-42fa-B6A7-0F682CCC6F27");
static const Standard_GUID GUID_HAS_GLOBAL_POINTS("330D0E81-742D-4ea3-92D4-484877CFA7C1");
ImageComposer_Image aResImg = anOp->process( anObj1, anObj2 );
SetImage( aResImg );
+ SetTrsf( aResImg.transform() );
}
else // Update image if it positioned relatively to other image
{
if ( !aDocument.IsNull() )
{
// Change the states of this and all depended images
- MustBeUpdated( true );
+ SetToUpdate( true );
HYDROData_Tool::SetMustBeUpdatedImages( aDocument );
- MustBeUpdated( false );
+ SetToUpdate( false );
}
}
return aVarData;
}
+HYDROData_SequenceOfObjects HYDROData_Image::GetAllReferenceObjects() const
+{
+ HYDROData_SequenceOfObjects aResSeq = HYDROData_Entity::GetAllReferenceObjects();
+
+ Handle(HYDROData_Image) aRefImage = GetTrsfReferenceImage();
+ if ( !aRefImage.IsNull() )
+ aResSeq.Append( aRefImage );
+
+ HYDROData_SequenceOfObjects aSeqRefObjects = GetReferenceObjects( 0 );
+ aResSeq.Append( aSeqRefObjects );
+
+ return aResSeq;
+}
+
void HYDROData_Image::SetImage(const QImage& theImage)
{
if (theImage.isNull()) {
bool anIsByTwoPoints = IsByTwoPoints();
// Convert lambert coordinates to cartesian
- if ( aTrsfMode == ManualLambert )
+ if ( aTrsfMode == ManualGeodesic )
{
double aXCart = 0, aYCart = 0;
- HYDROData_Lambert93::toXY( aTrsfPointA.x(), aTrsfPointA.y(), aXCart, aYCart );
+ HYDROData_Lambert93::toXY( aTrsfPointA.y(), aTrsfPointA.x(), aXCart, aYCart );
aTrsfPointA = QPointF( aXCart, aYCart );
- HYDROData_Lambert93::toXY( aTrsfPointB.x(), aTrsfPointB.y(), aXCart, aYCart );
+ HYDROData_Lambert93::toXY( aTrsfPointB.y(), aTrsfPointB.x(), aXCart, aYCart );
aTrsfPointB = QPointF( aXCart, aYCart );
if ( !anIsByTwoPoints )
{
- HYDROData_Lambert93::toXY( aTrsfPointC.x(), aTrsfPointC.y(), aXCart, aYCart );
+ HYDROData_Lambert93::toXY( aTrsfPointC.y(), aTrsfPointC.x(), aXCart, aYCart );
aTrsfPointC = QPointF( aXCart, aYCart );
}
}
SetIsSelfSplitted( false );
}
- MustBeUpdated( false );
+ SetToUpdate( false );
bool anIsByTwoPoints = IsByTwoPoints();
HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
{
- TransformationMode aResMode = ManualLambert;
+ TransformationMode aResMode = ManualGeodesic;
TDF_Label aLabel = myLab.FindChild( DataTag_TrsfPoints, false );
if ( !aLabel.IsNull() )
return QByteArray(aData, aLen);
}
-void HYDROData_Image::MustBeUpdated(bool theFlag)
-{
- if (theFlag) {
- TDataStd_UAttribute::Set(myLab, GUID_MUST_BE_UPDATED);
- } else {
- myLab.ForgetAttribute(GUID_MUST_BE_UPDATED);
- }
-}
-
-bool HYDROData_Image::MustBeUpdated() const
-{
- return myLab.IsAttribute(GUID_MUST_BE_UPDATED);
-}
-
void HYDROData_Image::SetIsSelfSplitted(bool theFlag)
{
if (theFlag) {