{
myObjectName->clear();
myGeomObjects->clear();
+ myPolylineName->clear();
+ myAvailableGeomObjects->clear();
}
QWizardPage* HYDROGUI_CalculationDlg::createObjectsPage() {
connect( myValidator, SIGNAL( alreadyExists( QString ) ), SLOT( onAlreadyExists( QString ) ) );
myPolylineName = new QComboBox( aPage );
+ connect( myPolylineName, SIGNAL( activated( const QString & ) ),
+ SIGNAL( boundarySelected( const QString & ) ) );
myGeomObjects = new QListWidget( aPage );
myGeomObjects->setSelectionMode( QListWidget::SingleSelection );
}
}
+void HYDROGUI_CalculationDlg::setBoundary( const QString& theObjName )
+{
+ bool isBlocked = myPolylineName->blockSignals( true );
+ myPolylineName->setCurrentIndex( myPolylineName->findText( theObjName ) );
+ myPolylineName->blockSignals( isBlocked );
+}
+
+void HYDROGUI_CalculationDlg::setPolylineNames( const QStringList& theObjects, const QStringList& theObjectsEntries )
+{
+ myPolylineName->clear();
+ myPolylineName->addItem( "", "" ); // No boundary item
+
+ for ( int i = 0, n = theObjects.length(); i < n; ++i )
+ {
+ myPolylineName->addItem( theObjects.at( i ), theObjectsEntries.at( i ) );
+ }
+}
void HYDROGUI_CalculationDlg::setAllGeomObjects( const QStringList& theObjects, const QStringList& theObjectsEntries )
{
myAvailableGeomObjects->clear();