From 7708e74b477b7278cd702f6da249c9be80787c4f Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 15 Jun 2015 11:59:41 +0300 Subject: [PATCH] refs #568: fill in Strickler table combo-box with with names of all different Strickler types defined in the model. --- src/HYDROGUI/HYDROGUI_LandCoverOp.cxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx b/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx index 492e871d..75c4ce08 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx +++ b/src/HYDROGUI/HYDROGUI_LandCoverOp.cxx @@ -103,17 +103,11 @@ void HYDROGUI_LandCoverOp::startOperation() Handle(HYDROData_StricklerTable)::DownCast( anIterator.Current() ); if ( !aStricklerTableObj.IsNull() ) { - // TODO: implement GetTypes method in data model - //QStringList aTypes = aStricklerTableObj->GetTypes(); - // The code below is a sample of data filling list of Strickler types - QStringList aTypes; - aTypes.append("Zones de champs, prairies, sans cultures"); - aTypes.append("Canaux naturels"); - aTypes.append("Zones à faible urbanization (bourg)"); - QStringList::const_iterator anIt = aTypes.begin(), aLast = aTypes.end(); - for( ; anIt!=aLast; anIt++ ) + // Get Strickler table data from the data model + TColStd_SequenceOfExtendedString aTypes = aStricklerTableObj->GetTypes(); + for ( int i = 1; i <= aTypes.Length(); i++ ) { - QString aType = *anIt; + QString aType = HYDROGUI_Tool::ToQString( aTypes.Value( i ) ); if ( !aType.isEmpty() && !aStricklerTypes.contains( aType )) aStricklerTypes.append( aType ); } @@ -275,9 +269,6 @@ void HYDROGUI_LandCoverOp::onCreatePreview( const QStringList& thePolylineNames if ( aViewManager && myPreviewPrs ) { - // TODO: Temporary commented until GetFillingColor, DefaultFillingColor, - // GetBorderColor and DefaultBorderColor data model methods will be implemented - /* QColor aFillingColor = HYDROData_LandCover::DefaultFillingColor(); QColor aBorderColor = HYDROData_LandCover::DefaultBorderColor(); if ( !myEditedObject.IsNull() ) { @@ -287,7 +278,6 @@ void HYDROGUI_LandCoverOp::onCreatePreview( const QStringList& thePolylineNames myPreviewPrs->setFillingColor( aFillingColor, false, false ); myPreviewPrs->setBorderColor( aBorderColor, false, false ); - */ TopoDS_Face aFace; if( !aZoneShape.IsNull() ) -- 2.39.2