-bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
-{
- // Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
- if ( !isConfirmed )
- {
- // If not modified check if the case has already defined regions with land cover zones
- HYDROData_SequenceOfObjects aSeq = myEditedObject->GetRegions( true );
- if ( aSeq.Length() > 0 )
- {
- // If there are already defined land cover zones then ask a user to confirm land cover zones recalculation
- isConfirmed = ( SUIT_MessageBox::question( module()->getApp()->desktop(),
- tr( "REGIONS_CHANGED" ),
- tr( "CONFIRM_LAND_COVER_PARTITION_RECALCULATION_REGIONS" ),
- QMessageBox::Yes | QMessageBox::No,
- QMessageBox::No ) == QMessageBox::Yes );
- }
- else
- {
- isConfirmed = true; // No regions - no land cover zones - nothing to recalculate
- }
- }
- return isConfirmed;
-}
-
-bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
-{
- // Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
- if ( !isConfirmed )
- {
- // If not modified check if the case has already defined regions with land cover zones
- HYDROData_SequenceOfObjects aSeq = myEditedObject->GetRegions( true );
- if ( aSeq.Length() > 0 )
- {
- // If there are already defined land cover zones then ask a user to confirm land cover zones recalculation
- isConfirmed = ( SUIT_MessageBox::question( module()->getApp()->desktop(),
- tr( "MODE_CHANGED" ),
- tr( "CONFIRM_LAND_COVER_PARTITION_RECALCULATION_MODE" ),
- QMessageBox::Yes | QMessageBox::No,
- QMessageBox::No ) == QMessageBox::Yes );
- }
- else
- {
- isConfirmed = true; // No regions - no land cover zones - nothing to recalculate
- }
- }
- return isConfirmed;
-}
-
-bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
-{
- // Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
- if ( !isConfirmed )
- {
- // If not modified check if the case has already defined regions with land cover zones
- HYDROData_SequenceOfObjects aSeq = myEditedObject->GetRegions( true );
- if ( aSeq.Length() > 0 )
- {
- // If there are already defined land cover zones then ask a user to confirm land cover zones recalculation
- isConfirmed = ( SUIT_MessageBox::question( module()->getApp()->desktop(),
- tr( "ORDER_CHANGED" ),
- tr( "CONFIRM_LAND_COVER_PARTITION_RECALCULATION_REGIONS" ),
- QMessageBox::Yes | QMessageBox::No,
- QMessageBox::No ) == QMessageBox::Yes );
- }
- else
- {
- isConfirmed = true; // No regions - no land cover zones - nothing to recalculate
- }
- }
- return isConfirmed;
-}
-
-bool HYDROGUI_CalculationOp::confirmLandCoverRuleChange() const
-{
- // Check if the case is already modified or not
- bool isConfirmed = myEditedObject->IsMustBeUpdated();
- if ( !isConfirmed )
- {
- // If not modified check if the case has already defined regions with land cover zones
- HYDROData_SequenceOfObjects aSeq = myEditedObject->GetRegions( true );
- if ( aSeq.Length() > 0 )
- {
- // If there are already defined land cover zones then ask a user to confirm land cover zones recalculation
- isConfirmed = ( SUIT_MessageBox::question( module()->getApp()->desktop(),
- tr( "RULE_CHANGED" ),
- tr( "CONFIRM_LAND_COVER_PARTITION_RECALCULATION_REGIONS" ),
- QMessageBox::Yes | QMessageBox::No,
- QMessageBox::No ) == QMessageBox::Yes );
- }
- else
- {
- isConfirmed = true; // No regions - no land cover zones - nothing to recalculate
- }
- }
- return isConfirmed;
-}
-