Salome HOME
refs #568: use ordered list view with selection synchronized with object browser...
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationDlg.h
index e8e14ebc69f245e59d11ceac8d7683c765e61f74..f4ee385fd047cbee7db7f1c5bf57e309f9554612 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
@@ -26,6 +22,7 @@
 
 #include "HYDROGUI_Wizard.h"
 #include <HYDROData_CalculationCase.h>
+#include <HYDROData_LandCover.h>
 
 class HYDROGUI_ObjSelector;
 class HYDROGUI_DataBrowser;
@@ -57,6 +54,7 @@ public:
   void                       reset();
 
   int                        getMode() const;
+  int                        getLandCoverMode() const;
 
   void                       setObjectName( const QString& theName );
   QString                    getObjectName() const;
@@ -65,9 +63,14 @@ public:
 
   void                       setAllGeomObjects( const QStringList& theObjects, const QStringList& theObjectsEntries );
   QStringList                getAllGeomObjects() const;
+  void                       setAllLandCovers( const QStringList& theObjects, const QStringList& theObjectsEntries );
+  QStringList                getAllLandCovers() const;
   void                       setPolylineNames( const QStringList& theObjects, const QStringList& theObjectsEntries );
+  void                       setStricklerTableNames( const QStringList& theObjects, const QStringList& theObjectsEntries );
   QStringList                getSelectedGeomObjects() const;
+  QStringList                getSelectedLandCovers() const;
   QStringList                getSelectedAvailableGeomObjects() const;
+  QStringList                getSelectedAvailableLandCovers() const;
   QStringList                getSelectedGroups() const;
   QStringList                getSelectedAvailableGroups() const;
   HYDROGUI_Zone*             getCurrentZone() const;
@@ -75,10 +78,14 @@ public:
   void                       setAvailableGroups( const QStringList& );
 
   void                       setEditZonesEnabled( const bool theIsEnabled );
+  void                       setEditLandCoversEnabled( const bool theIsEnabled );
 
   HYDROData_ListOfRules      getRules() const;
   void                       setRules( const HYDROData_ListOfRules& theRules ) const;
 
+  HYDROData_ListOfRules      getLandCoverRules() const;
+  void                       setLandCoverRules( const HYDROData_ListOfRules& theRules ) const;
+
 public slots:
   void                       setMode( int theMode );
   void                       setBoundary( const QString& theObjName );
@@ -92,6 +99,12 @@ public slots:
   void                       onDataChanged();
   void                       onOrderChanged();
 
+  void                       setLandCoverMode( int theMode );
+  void                       setStricklerTable( const QString& theStricklerTableName, bool theBlockSignals = true );
+  void                       includeLandCovers( const QStringList& theLandCovers, bool theReset );
+  void                       excludeLandCovers( const QStringList& theLandCovers );
+  void                       onOrderLandCoverChanged();
+
   /**
    * Process items selection: hide/show bathymetry merge type selector.
    */
@@ -107,11 +120,12 @@ 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                       addGroups();
   void                       removeGroups();
@@ -123,40 +137,64 @@ signals:
   void                       moveZones( SUIT_DataObject* theRegion, const QList<SUIT_DataObject*>& theZonesList );
   void                       clickedInZonesBrowser( SUIT_DataObject* );
 
+  void                       changeLandCoverMode( int theMode );
+
+  void                       addLandCovers();
+  void                       removeLandCovers();
+  void                       landCoversSelected();
+  void                       orderLandCoverChanged( bool& isConfirmed );
+  
+  void                       StricklerTableSelected( const QString & theObjName );
+
 protected:
 
   virtual bool               acceptCurrent() const;
 
+protected slots:
+  void OnNewRegion();
+
 private:
-  QList<Handle(HYDROData_Object)> getGeometryObjects();
+  QList<Handle(HYDROData_Entity)> getGeometryObjects();
+  QList<Handle(HYDROData_Entity)> getLandCovers();
 
   QWizardPage*               createObjectsPage();
   QWizardPage*               createGroupsPage();
+  QWizardPage*               createLandCoversPage();
   QWizardPage*               createZonesPage();
+  QWizardPage*               createLandCoversPartitionPage();
 
   QSplitter*                 mySplitter;
+  QSplitter*                 myLandCoverSplitter;
 
   QGroupBox*                 myObjectNameGroup;
   QLineEdit*                 myObjectName;
   HYDROGUI_NameValidator*    myValidator;
 
   QComboBox*                 myPolylineName;
+  QComboBox*                 myStricklerTableName;
 
   QButtonGroup*              myModeButtons;
+  QButtonGroup*              myLandCoverModeButtons;
 
   QListWidget*               myAvailableGeomObjects;
   HYDROGUI_OrderedListWidget* myGeomObjects;
 
   HYDROGUI_PriorityWidget*   myPriorityWidget;
+  HYDROGUI_PriorityWidget*   myLandCoverPriorityWidget;
 
   QListWidget*               myAvailableGroups;
   QListWidget*               myGroups;
 
+  QListWidget*               myAvailableLandCovers;
+  HYDROGUI_OrderedListWidget* myLandCovers;
+
   HYDROGUI_DataBrowser*      myBrowser;
   Handle(HYDROData_CalculationCase) myEditedObject;
   QComboBox*                 myBathymetryChoice;
   QLabel*                    myBathymetryLabel;
   HYDROGUI_Zone*             myCurrentZone;
+
+  HYDROGUI_DataBrowser*      myLandCoverBrowser;
 };
 
 #endif