HYDROData_Channel::HYDROData_Channel()
-: HYDROData_ArtificialObject()
+: HYDROData_ArtificialObject( Geom_3d )
{
}
SetReferenceObject( theGuideLine, DataTag_GuideLine );
// Indicate model of the need to update the chanel presentation
- SetToUpdate( true, true );
+ Changed( Geom_3d );
return true;
}
ClearReferenceObjects( DataTag_GuideLine );
// Indicate model of the need to update the chanel presentation
- SetToUpdate( true, true );
+ Changed( Geom_3d );
}
bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile )
SetReferenceObject( theProfile, DataTag_Profile );
// Indicate model of the need to update the chanel presentation
- SetToUpdate( true, true );
+ Changed( Geom_3d );
return true;
}
ClearReferenceObjects( DataTag_Profile );
// Indicate model of the need to update the chanel presentation
- SetToUpdate( true, true );
+ Changed( Geom_3d );
}
ObjectKind HYDROData_Channel::getAltitudeObjectType() const
HYDROData_Confluence::HYDROData_Confluence()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
{
}
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_DummyObject3D,HYDROData_Entity)
HYDROData_DummyObject3D::HYDROData_DummyObject3D()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_3d )
{
}
if ( !aGeomChangeAttr.IsNull() )
aGeomChangeFlag = aGeomChangeAttr->Get();
- if( ( myGeom & theChangedGeometry ) == 0 )
+ int aBitsToChange = ( myGeom & theChangedGeometry );
+ if( aBitsToChange == 0 )
return;
- aGeomChangeFlag = ( aGeomChangeFlag | theChangedGeometry );
+ aGeomChangeFlag = ( aGeomChangeFlag | aBitsToChange );
TDataStd_Integer::Set( aGeomChangeLab, aGeomChangeFlag );
HYDROData_Iterator anIter( aDocument );
{
Handle(HYDROData_Entity) aRefObject = aRefSeq.Value( i );
if( aRefObject->Label()==myLab )
- Changed( theChangedGeometry );
+ anObject->Changed( theChangedGeometry );
}
}
}
Geom_3d = Geom_2d | Geom_Z,
Geom_2d_and_groups = Geom_2d | Geom_Groups,
+ Geom_All = Geom_3d | Geom_Groups | Geom_No,
};
public:
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IAltitudeObject, HYDROData_Entity)
HYDROData_IAltitudeObject::HYDROData_IAltitudeObject()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_Z )
{
}
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IPolyline, HYDROData_Entity)
HYDROData_IPolyline::HYDROData_IPolyline()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
{
}
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity)
HYDROData_Image::HYDROData_Image()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
{
}
void HYDROData_Image::Update()
{
- bool anIsToUpdate = IsMustBeUpdated();
+ bool anIsToUpdate = IsMustBeUpdated( Geom_2d );
HYDROData_Entity::Update();
UpdateTrsf();
}
- SetToUpdate( false );
+ ClearChanged();
}
bool HYDROData_Image::IsHas2dPrs() const
SaveByteArray(0, aData, anImage.byteCount());
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_Image::LoadImage( const QString& theFilePath )
TCollection_AsciiString anAsciiStr( theFilePath.toStdString().c_str() );
TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), anAsciiStr );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
QString HYDROData_Image::GetFilePath() const
anArray->SetValue(8, theTrsf.m32());
anArray->SetValue(9, theTrsf.m33());
- SetToUpdate( true );
+ Changed( Geom_2d );
}
QTransform HYDROData_Image::Trsf() const
QImage anImage = Image();
if ( anImage.isNull() )
{
- SetToUpdate( false );
+ ClearChanged();
return;
}
SetGlobalPoints( ManualCartesian, aTrsfPointA, aTrsfPointB, aTrsfPointC );
- SetToUpdate( false );
+ ClearChanged();
}
void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
if ( theIsUpdate )
UpdateTrsf();
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_Image::GetLocalPoints( QPoint& thePointA,
if ( theIsUpdate )
UpdateTrsf();
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_Image::GetGlobalPoints( TransformationMode& theMode,
void HYDROData_Image::SetTrsfMode( const TransformationMode& theMode )
{
TDataStd_Integer::Set( myLab.FindChild( DataTag_TrsfMode ), (int)theMode );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
void HYDROData_Image::SetTrsfReferenceImage( const Handle(HYDROData_Image)& theRefImage )
{
SetReferenceObject( theRefImage, DataTag_TrsfImage );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
void HYDROData_Image::RemoveTrsfReferenceImage()
{
RemoveReferenceObject( DataTag_TrsfImage );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_Image::AppendReference( const Handle(HYDROData_Entity)& theReferenced )
{
AddReferenceObject( theReferenced, 0 );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
int HYDROData_Image::NbReferences() const
const int theIndex, Handle(HYDROData_Entity) theReferenced)
{
SetReferenceObject( theReferenced, 0, theIndex );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_Image::RemoveReference(const int theIndex)
{
RemoveReferenceObject( 0, theIndex );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_Image::ClearReferences()
{
ClearReferenceObjects( 0 );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_Image::SetOperatorName( const QString theOpName )
{
TCollection_AsciiString anAsciiStr( theOpName.toStdString().c_str() );
TDataStd_AsciiString::Set( myLab.FindChild( DataTag_Operator ), anAsciiStr );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
QString HYDROData_Image::OperatorName() const
void HYDROData_Image::SetArgs(const QByteArray& theArgs)
{
SaveByteArray(DataTag_Operator, theArgs.constData(), theArgs.length());
- SetToUpdate( true );
+ Changed( Geom_2d );
}
QByteArray HYDROData_Image::Args() const
} else {
myLab.ForgetAttribute(GUID_SELF_SPLITTED);
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_Image::IsSelfSplitted() const
HYDROData_ImmersibleZone::HYDROData_ImmersibleZone()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_2d )
{
}
return;
SetReferenceObject( thePolyline, DataTag_Polyline );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
Handle(HYDROData_PolylineXY) HYDROData_ImmersibleZone::GetPolyline() const
void HYDROData_ImmersibleZone::RemovePolyline()
{
ClearReferenceObjects( DataTag_Polyline );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
IMPLEMENT_STANDARD_RTTIEXT( HYDROData_LandCover, HYDROData_Entity )
HYDROData_LandCover::HYDROData_LandCover()
+: HYDROData_Entity( Geom_2d )
{
}
void HYDROData_LandCover::SetPolylines( const HYDROData_SequenceOfObjects& thePolylines )
{
SetReferenceObjects( thePolylines, DataTag_Polylines );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
HYDROData_SequenceOfObjects HYDROData_LandCover::GetPolylines() const
IMPLEMENT_STANDARD_HANDLE(HYDROData_NaturalObject,HYDROData_Object)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_NaturalObject,HYDROData_Object)
-HYDROData_NaturalObject::HYDROData_NaturalObject()
-: HYDROData_Object()
+HYDROData_NaturalObject::HYDROData_NaturalObject( Geometry theGeometry )
+: HYDROData_Object( theGeometry )
{
}
* Creates new object in the internal data structure. Use higher level objects
* to create objects with real content.
*/
- HYDRODATA_EXPORT HYDROData_NaturalObject();
+ HYDRODATA_EXPORT HYDROData_NaturalObject( Geometry );
/**
* Destructs properties of the object and object itself, removes it from the document.
void HYDROData_Object::Update()
{
- if( IsMustBeUpdated2d() )
+ if( IsMustBeUpdated( Geom_2d ) )
{
removeTopShape();
removeGroupObjects();
}
- if( IsMustBeUpdated3d() )
+ if( IsMustBeUpdated( Geom_3d ) )
removeShape3D();
checkAndSetAltitudeObject();
HYDROData_Obstacle::HYDROData_Obstacle()
-: HYDROData_ArtificialObject()
+: HYDROData_ArtificialObject( Geom_3d )
{
}
HYDROData_Polyline3D::HYDROData_Polyline3D()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
{
}
updateChildProfilePoints();
// Indicate model of the need to update the polyline presentation
- SetToUpdate( true );
+ Changed( Geom_2d );
return true;
}
ClearReferenceObjects( DataTag_PolylineXY );
// Indicate model of the need to update the polyline presentation
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_Polyline3D::SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile )
RemoveAltitudeObject();
// Indicate model of the need to update the polyline presentation
- SetToUpdate( true );
+ Changed( Geom_Z );
return true;
}
ClearReferenceObjects( DataTag_ProfileUZ );
// Indicate model of the need to update the polyline presentation
- SetToUpdate( true );
+ Changed( Geom_Z );
}
bool HYDROData_Polyline3D::SetAltitudeObject(
if ( !IsEditable() )
{
// If polyline is not editable we no need to update it wire
- SetToUpdate( false );
+ ClearChanged();
return;
}
aTypesList->Append( theSectionType );
aClosuresList->Append( theIsClosed );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
TCollection_AsciiString HYDROData_PolylineXY::GetSectionName( const int theSectionIndex ) const
TDataStd_ListIteratorOfListOfExtendedString aNamesIter( anOldNamesList );
for ( int i = 0; aNamesIter.More(); aNamesIter.Next(), ++i )
aNamesList->Append( i == theSectionIndex ? aNewSectName : aNamesIter.Value() );
-
- SetToUpdate( true );
}
HYDROData_PolylineXY::SectionType HYDROData_PolylineXY::GetSectionType( const int theSectionIndex ) const
for ( int i = 0; aTypesIter.More(); aTypesIter.Next(), ++i )
aTypesList->Append( i == theSectionIndex ? theSectionType : aTypesIter.Value() );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
bool HYDROData_PolylineXY::IsClosedSection( const int theSectionIndex ) const
for ( int i = 0; aClosuresIter.More(); aClosuresIter.Next(), ++i )
aClosuresList->Append( i == theSectionIndex ? theIsClosed : (bool)aClosuresIter.Value() );
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::GetSections( NCollection_Sequence<TCollection_AsciiString>& theSectNames,
removePointsLists( theSectionIndex );
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::RemoveSections()
{
removeSectionsLists();
removePointsLists();
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::AddPoint( const int theSectionIndex,
}
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::SetPoint( const int theSectionIndex,
}
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::SetPoints( const int theSectionIndex,
}
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
HYDROData_PolylineXY::PointsList HYDROData_PolylineXY::GetPoints( const int theSectionIndex, bool IsConvertToGlobal ) const
}
SetPoints( i, aPoints );
}
- SetToUpdate( true );
+ Changed( Geom_2d );
}
void HYDROData_PolylineXY::Transform( const QTransform& theTrsf )
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object)
HYDROData_Profile::HYDROData_Profile()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
{
}
anArray->SetValue( 0, aLPoint.X() );
anArray->SetValue( 1, aLPoint.Y() );
- SetToUpdate( true );
+ Changed( Geom_3d );
}
bool HYDROData_Profile::GetLeftPoint( gp_XY& thePoint, bool IsConvertToGlobal,
anArray->SetValue( 0, aLPoint.X() );
anArray->SetValue( 1, aLPoint.Y() );
- SetToUpdate( true );
+ Changed( Geom_3d );
}
bool HYDROData_Profile::GetRightPoint( gp_XY& thePoint, bool IsConvertToGlobal,
if ( !aLastLabel.IsNull() )
aLastLabel.ForgetAllAttributes();
- SetToUpdate( true );
+ Changed( Geom_3d );
}
Handle(HYDROData_ProfileUZ) HYDROData_Profile::GetProfileUZ( const bool theIsCreate ) const
if ( !aProfileUZ.IsNull() )
{
aProfileUZ->RemoveSections();
- SetToUpdate( true );
+ Changed( Geom_3d );
}
}
aProfileUZ->AddPoint( 0, aPoint );
}
- SetToUpdate( true );
+ Changed( Geom_3d );
}
HYDROData_ProfileUZ::PointsList HYDROData_Profile::GetParametricPoints() const
HYDROData_Region::HYDROData_Region()
- : HYDROData_Entity()
+ : HYDROData_Entity( Geom_2d )
{
}
HYDROData_River::HYDROData_River()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
{
}
HYDROData_ShapesGroup::HYDROData_ShapesGroup()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_Groups )
{
}
HYDROData_Stream::HYDROData_Stream()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
{
}
updateProfilesOrder();
// Indicate model of the need to update the stream presentation
- SetToUpdate( true );
+ Changed( Geom_3d );
return true;
}
RemoveProfiles();
// Indicate model of the need to update the stream presentation
- SetToUpdate( true );
+ Changed( Geom_3d );
}
bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProfile,
insertProfileInToOrder( theProfile, aProfileIndex );
// Indicate model of the need to update the stream presentation
- SetToUpdate( true );
+ Changed( Geom_3d );
return true;
}
SetReferenceObjects( theProfiles, DataTag_Profile );
if ( anIsToUpdate )
- SetToUpdate( true );
+ Changed( Geom_3d );
}
return true;
removeParameter( aProfileIndex );
// Indicate model of the need to update the stream presentation
- SetToUpdate( true );
+ Changed( Geom_3d );
return true;
}
void HYDROData_Stream::RemoveProfiles()
{
- bool anIsToUpdate = IsMustBeUpdated() || NbReferenceObjects( DataTag_Profile ) > 0;
-
ClearReferenceObjects( DataTag_Profile );
// Remove the parameters array
removeParametersArray();
// Indicate model of the need to update the stream presentation
- SetToUpdate( anIsToUpdate );
+ Changed( Geom_3d );
}
void HYDROData_Stream::insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile,
IMPLEMENT_STANDARD_HANDLE( HYDROData_StricklerTable, HYDROData_Entity )
IMPLEMENT_STANDARD_RTTIEXT( HYDROData_StricklerTable, HYDROData_Entity )
- HYDROData_StricklerTable::HYDROData_StricklerTable()
+HYDROData_StricklerTable::HYDROData_StricklerTable()
+: HYDROData_Entity( Geom_No )
{
}
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_VisualState, HYDROData_Entity)
HYDROData_VisualState::HYDROData_VisualState()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_No )
{
}
HYDROData_Zone::HYDROData_Zone()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
{
myInterpolator = NULL;
}
bool HYDROGUI_CalculationOp::confirmRegionsChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with zones
bool HYDROGUI_CalculationOp::confirmOrderChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with zones
bool HYDROGUI_CalculationOp::confirmRuleChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with zones
bool HYDROGUI_CalculationOp::confirmModeChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with zones
bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with land cover zones
bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with land cover zones
bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with land cover zones
bool HYDROGUI_CalculationOp::confirmLandCoverRuleChange() const
{
// Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
if ( !isConfirmed )
{
// If not modified check if the case has already defined regions with land cover zones
}
}
aPanel->setStricklerTableNames( aList, anEntryList );
- bool anUpdateState = myEditedObject->IsMustBeUpdated();
+ //@ASL: bool anUpdateState = myEditedObject->IsMustBeUpdated();
if ( !aList.isEmpty() )
aPanel->setStricklerTable( aList.at( 0 ), false );
- myEditedObject->SetToUpdate( anUpdateState );
+ //@ASL: myEditedObject->SetToUpdate( anUpdateState );
// Fill in list widget with all available land covers
aSeq = HYDROGUI_Tool::GetLandCovers( module() );
if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
{
// Set objects in the specified order
- if( myEditedObject->IsMustBeUpdated() )
+ if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
{
myEditedObject->RemoveGeometryObjects();
foreach ( const QString& aName, aPanel->getAllGeomObjects() )
if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
{
// Set objects in the specified order
- if( myEditedObject->IsMustBeUpdated() )
+ if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
{
myEditedObject->RemoveLandCovers();
foreach ( const QString& aName, aPanel->getAllLandCovers() )
}
aPanel->setEditLandCoverZonesEnabled( aMode == HYDROData_CalculationCase::MANUAL );
- if ( myEditedObject->IsMustBeUpdated() )
+ if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No ) )
{
myShowZones = true;
myEditedObject->Update();
aGroupsNames.append( aGroup->GetName() );
}
}
- if( myEditedObject->IsMustBeUpdated() ) {
+ if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) ) {
for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) {
Handle(HYDROData_ShapesGroup) aGeomGroup =
Handle(HYDROData_ShapesGroup)::DownCast( aSeq.Value( anIndex ) );
aPanel->setAvailableGroups( aGroupsNames );
aPanel->includeGroups( aList );
- bool isUpdated = myEditedObject->IsMustBeUpdated();
+ //@ASL: bool isUpdated = myEditedObject->IsMustBeUpdated();
}
void HYDROGUI_CalculationOp::onAddGroups()
isConfirmed = confirmOrderChange();
if( isConfirmed )
- myEditedObject->SetToUpdate( true );
+ myEditedObject->Changed( HYDROData_Entity::Geom_2d );
}
void HYDROGUI_CalculationOp::onOrderLandCoverChanged( bool& isConfirmed )
isConfirmed = confirmLandCoverOrderChange();
if( isConfirmed )
- myEditedObject->SetToUpdate( true );
+ myEditedObject->Changed( HYDROData_Entity::Geom_No );
}
void HYDROGUI_CalculationOp::onRuleChanged( bool& isConfirmed )
isConfirmed = confirmRuleChange();
if( isConfirmed )
- myEditedObject->SetToUpdate( true );
+ myEditedObject->Changed( HYDROData_Entity::Geom_2d );
}
void HYDROGUI_CalculationOp::onRuleLandCoverChanged( bool& isConfirmed )
isConfirmed = confirmLandCoverRuleChange();
if( isConfirmed )
- myEditedObject->SetToUpdate( true );
+ myEditedObject->Changed( HYDROData_Entity::Geom_No );
}
void HYDROGUI_CalculationOp::onRegenerateColors()
myEditedObject->SetProfile( aProfile );
}
- if ( myEditedObject->IsMustBeUpdated() )
+ if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
myEditedObject->Update();
erasePreview();
if( theId == NameId )
{
Handle(HYDROData_Entity) aDataObject = modelObject();
- if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+ if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
{
aFont.setItalic( true );
aFont.setBold( true );
if ( !aColor.isValid() )
{
Handle(HYDROData_Entity) aDataObject = modelObject();
- if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+ if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
{
switch ( theRole )
{
}
else
{
- QString aNeedUpdate( aDataObject->IsMustBeUpdated() ? "M_" : "" );
+ QString aNeedUpdate( aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) ? "M_" : "" );
int anObjectKind = (int)aDataObject->GetKind();
if ( anObjectKind == KIND_DUMMY_3D )
return true;
// Check if the land cover object is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
+ bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
if ( !isConfirmed )
{
// If not modified check if the land cover has already defined polylines
anIsVisibleInSelection |= aVisibility;
anIsHiddenInSelection |= !aVisibility;
- if ( anObject->CanBeUpdated() && anObject->IsMustBeUpdated() )
+ if ( anObject->CanBeUpdated() && anObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
{
anIsMustObjectBeUpdated = true;
}
}
// At first we update the child u,z profile object
- aProfileUZ->SetToUpdate( true );
+ aProfileUZ->Changed( HYDROData_Entity::Geom_2d );
aProfileUZ->Update();
// And now we update our edited object
myEditedObject->SetHydraulicAxis( aHydAxis );
myEditedObject->SetProfiles( aRefProfiles, false );
- if ( myEditedObject->IsMustBeUpdated() )
+ if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
myEditedObject->Update();
if ( !myIsEdit )
updateObject( anObject, theMapOfTreated );
}
- if ( !myIsForced && !theObject->IsMustBeUpdated() )
+ if ( !myIsForced && !theObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
return;
theObject->Update();
%End
public:
+ enum Geometry
+ {
+ Geom_No = 1,
+ Geom_2d = 2,
+ Geom_Z = 4,
+ Geom_Groups = 8,
+
+ Geom_3d = 6,
+ Geom_2d_and_groups = 10,
+ };
/**
* Returns the kind of this object. Must be redefined in all objects of known type.
*/
virtual QVariant GetDataVariant();
-
- /**
- * Sets the "MustBeUpdated" flag: if object is depended on updated features.
- * \param theFlag is true for objects that must be updated, false for up-to-date
- */
- virtual void SetToUpdate( bool theFlag );
-
- /**
- * Returns the "MustBeUpdated" flag: is object data must be updated or not
- * \returns false if object is up to date
- */
- virtual bool IsMustBeUpdated() const;
-
/**
* Returns flag indicating that object is updateble or not.
*/
* Creates new object in the internal data structure. Use higher level objects
* to create objects with real content.
*/
- HYDROData_Entity();
+ HYDROData_Entity( Geometry );
/**
* Destructs properties of the object and object itself, removes it from the document.