+}
+
+void HYDROGUI_CalculationDlg::setAvailableGroups( const QStringList& theGroups )
+{
+ myAvailableGroups->clear();
+ myGroups->clear();
+ foreach( QString aGroup, theGroups )
+ myAvailableGroups->addItem( aGroup );
+}
+
+QStringList HYDROGUI_CalculationDlg::getSelectedGroups() const
+{
+ return getSelected( myGroups );
+}
+
+QStringList HYDROGUI_CalculationDlg::getSelectedAvailableGroups() const
+{
+ return getSelected( myAvailableGroups );
+}
+
+void HYDROGUI_CalculationDlg::includeGroups( const QStringList& theObjects )
+{
+ moveItems( myAvailableGroups, myGroups, theObjects );
+}
+
+void HYDROGUI_CalculationDlg::excludeGroups( const QStringList& theObjects )
+{
+ moveItems( myGroups, myAvailableGroups, theObjects );
+}
+
+/**
+ Get creation mode.
+ @param theMode the mode
+*/
+int HYDROGUI_CalculationDlg::getMode() const
+{
+ return myModeButtons->checkedId();
+}
+
+/**
+ Set creation mode.
+ @param theMode the mode
+*/
+void HYDROGUI_CalculationDlg::setMode( int theMode )
+{
+ bool isBlocked = myModeButtons->blockSignals( true );
+ myModeButtons->button( theMode )->setChecked( true );
+ myModeButtons->blockSignals( isBlocked );
+
+ bool isAuto = ( theMode == HYDROData_CalculationCase::AUTOMATIC );
+
+ myGeomObjects->setOrderingEnabled( isAuto );
+ QWidget* aWidget = mySplitter->widget( 1 );
+ if ( aWidget ) {
+ aWidget->setVisible( isAuto );
+ }
+}
+
+/**
+ Enable/disable zones drag'n'drop and renaming.
+ @param theIsEnabled if true - zones drag'n'drop and renaming will be enabled
+*/
+void HYDROGUI_CalculationDlg::setEditZonesEnabled( const bool theIsEnabled )
+{
+ myBrowser->setReadOnly( !theIsEnabled );
+}
+
+/**
+ Get included geometry objects.
+ @return the list of geometry objects
+ */
+QList<Handle(HYDROData_Object)> HYDROGUI_CalculationDlg::getGeometryObjects()
+{
+ QList<Handle(HYDROData_Entity)> anEntities = myGeomObjects->getObjects();
+ QList<Handle(HYDROData_Object)> anObjects;
+
+ foreach ( Handle(HYDROData_Entity) anEntity, anEntities ) {
+ Handle(HYDROData_Object) anObj = Handle(HYDROData_Object)::DownCast( anEntity );
+ if ( anObj.IsNull() ) {
+ continue;
+ }
+
+ anObjects << anObj;
+ }
+
+ return anObjects;
+}
+
+/**
+ Get rules.
+ @return the list of rules
+ */
+HYDROData_ListOfRules HYDROGUI_CalculationDlg::getRules() const
+{
+ return myPriorityWidget->getRules();
+}
+
+/**
+ Set rules.
+ @param theRules the list of rules
+ */
+void HYDROGUI_CalculationDlg::setRules( const HYDROData_ListOfRules& theRules ) const
+{
+ myPriorityWidget->setRules( theRules );
+}
+
+/**
+ Slot called when objects order is changed.
+ */
+void HYDROGUI_CalculationDlg::onOrderChanged()
+{
+ myPriorityWidget->setObjects( getGeometryObjects() );