Salome HOME
lot 10 - warnings for DTM - untested
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationDlg.h
index ba2fb2cbd9e36f1bc58dc27a1a44b28b8f12dd9e..3353209c5cd8cc51ead29a0d60cfedfe61f3fd14 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "HYDROGUI_Wizard.h"
 #include <HYDROData_CalculationCase.h>
+#include <HYDROData_LandCoverMap.h>
 
 class HYDROGUI_ObjSelector;
 class HYDROGUI_DataBrowser;
@@ -47,13 +48,13 @@ class HYDROGUI_CalculationDlg : public HYDROGUI_Wizard
   Q_OBJECT
 
 public:
-  HYDROGUI_CalculationDlg( HYDROGUI_Module* theModule, const QString& theTitle );
+  HYDROGUI_CalculationDlg( HYDROGUI_Module* theModule, const QString& theTitle, bool IsComplete );
   virtual ~HYDROGUI_CalculationDlg();
 
   void                       reset();
 
   int                        getMode() const;
-
+  
   void                       setObjectName( const QString& theName );
   QString                    getObjectName() const;
 
@@ -62,32 +63,60 @@ public:
   void                       setAllGeomObjects( const QStringList& theObjects, const QStringList& theObjectsEntries );
   QStringList                getAllGeomObjects() const;
   void                       setPolylineNames( const QStringList& theObjects, const QStringList& theObjectsEntries );
+  void                       setLandCoverMapsNames( const QStringList& theObjects, const QStringList& theObjectsEntries );
+  void                       setStricklerTableNames( const QStringList& theObjects, const QStringList& theObjectsEntries );
   QStringList                getSelectedGeomObjects() const;
   QStringList                getSelectedAvailableGeomObjects() const;
   QStringList                getSelectedGroups() const;
   QStringList                getSelectedAvailableGroups() const;
+  QStringList                getSelectedBoundaryPolygons() const;
+  QStringList                getSelectedISBoundaryPolygons() const;
+  QStringList                getSelectedAvailableBoundaryPolygons() const;
   HYDROGUI_Zone*             getCurrentZone() const;
   
   void                       setAvailableGroups( const QStringList& );
 
+  void                       setAvailableBoundaryPolygons( const QStringList&, const QVector<int>& );
+
   void                       setEditZonesEnabled( const bool theIsEnabled );
 
   HYDROData_ListOfRules      getRules() const;
   void                       setRules( const HYDROData_ListOfRules& theRules ) const;
 
+  QList<Handle(HYDROData_Entity)> getGeometryObjects(bool GeomObjOnly = true);
+
 public slots:
   void                       setMode( int theMode );
+  void                       setGeomOrderingEnabled( int enabled );
+
   void                       setBoundary( const QString& theObjName );
   void                       includeGeomObjects( const QStringList& theObjects );
   void                       excludeGeomObjects( const QStringList& theObjects );
   void                       includeGroups( const QStringList& theObjects );
   void                       excludeGroups( const QStringList& theObjects );
+
+  void                       hideAvailableGeomObjects( const QStringList& theObjects );
+  void                       setAlreadyAddedGeomObjects( const QStringList& theObjects ); 
+  QStringList                getAlreadyAddedGeomObjects();
+
+
+  void                       includeBoundaryPolygons( const QStringList& theObjects );
+  void                       includeISBoundaryPolygons( const QStringList& theObjects );
+
+  void                       excludeBoundaryPolygons( const QStringList& theObjects );
+  void                       excludeISBoundaryPolygons( const QStringList& theObjects );
+
+
   void                       onEmptyName();
   void                       onAlreadyExists( QString theName );
   void                       refreshZonesBrowser();
   void                       onDataChanged();
   void                       onOrderChanged();
+  void                       onRuleChanged();
 
+  void                       setStricklerTable( const QString& theStricklerTableName, bool theBlockSignals = true );
+  void                       setLandCoverMap( const QString& theLandCoverMapName, bool theBlockSignals = true );
+  
   /**
    * Process items selection: hide/show bathymetry merge type selector.
    */
@@ -103,56 +132,85 @@ public slots:
     SUIT_DataObject* theTargetParent, int theTargetRow, Qt::DropAction theDropAction );
 
 signals:
-  void                       changeMode( int theMode );
+  void                       changeMode( int theMode );  
 
   void                       addObjects();
   void                       removeObjects();
   void                       objectsSelected();
+  void                       orderChanged( bool& isConfirmed );
+  void                       ruleChanged( bool& isConfirmed );
 
   void                       addGroups();
   void                       removeGroups();
   void                       groupsSelected();
 
+  void                       addBoundaryPolygons();
+  void                       removeBoundaryPolygons();
+
   void                       boundarySelected( const QString & theObjName );
   void                       setMergeType( int theMergeType, QString& theBathymetryName );
   void                       createRegion( const QList<SUIT_DataObject*>& theZonesList );
   void                       moveZones( SUIT_DataObject* theRegion, const QList<SUIT_DataObject*>& theZonesList );
   void                       clickedInZonesBrowser( SUIT_DataObject* );
 
+  void                       landCoverMapSelected( const QString & theObjName );
+
+  void                       StricklerTableSelected( const QString & theObjName );
+
+  void                       regenerateColors();
+
 protected:
 
   virtual bool               acceptCurrent() const;
 
+protected slots:
+  void OnNewRegion();
+
 private:
-  QList<Handle(HYDROData_Object)> getGeometryObjects();
 
+  
   QWizardPage*               createObjectsPage();
   QWizardPage*               createGroupsPage();
-  QWizardPage*               createZonesPage();
+  QWizardPage*               createBoundaryPolygonsPage();
 
+  QWizardPage*               createLandCoverMapPage();
+  QWizardPage*               createZonesPage();
+  
   QSplitter*                 mySplitter;
-
+  
   QGroupBox*                 myObjectNameGroup;
   QLineEdit*                 myObjectName;
   HYDROGUI_NameValidator*    myValidator;
 
   QComboBox*                 myPolylineName;
+  QComboBox*                 myLandCoverMapName;
+  QComboBox*                 myStricklerTableName;
 
   QButtonGroup*              myModeButtons;
 
   QListWidget*               myAvailableGeomObjects;
   HYDROGUI_OrderedListWidget* myGeomObjects;
 
+  QListWidget*               myAlreadyAddedGeomObjects;
+
+
   HYDROGUI_PriorityWidget*   myPriorityWidget;
 
   QListWidget*               myAvailableGroups;
   QListWidget*               myGroups;
 
+  QListWidget*               myAvailableBoundaryPolygons;
+  QListWidget*               myBoundaryPolygons;
+  QListWidget*               myISBoundaryPolygons;
+
+
   HYDROGUI_DataBrowser*      myBrowser;
   Handle(HYDROData_CalculationCase) myEditedObject;
   QComboBox*                 myBathymetryChoice;
   QLabel*                    myBathymetryLabel;
   HYDROGUI_Zone*             myCurrentZone;
+
+  bool                       myIsComplete;
 };
 
 #endif