Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationDlg.h
index 742bbca9ca5817184b8cbd73aa0646ddd45bc218..e2791f2140a016fff88809ed9c9138cd7f81add0 100644 (file)
 #ifndef HYDROGUI_CALCULATIONDLG_H
 #define HYDROGUI_CALCULATIONDLG_H
 
-#include "HYDROGUI_InputPanel.h"
+#include "HYDROGUI_Wizard.h"
+#include <HYDROData_CalculationCase.h>
 
 class HYDROGUI_ObjSelector;
 class QGroupBox;
 class QLineEdit;
 class QListWidget;
-
-class HYDROGUI_CalculationDlg : public HYDROGUI_InputPanel
+class QComboBox;
+class QLabel;
+class QStringList;
+class HYDROGUI_DataBrowser;
+class HYDROGUI_NameValidator;
+class SUIT_DataObject;
+class HYDROGUI_Zone;
+
+class HYDROGUI_CalculationDlg : public HYDROGUI_Wizard
 {
   Q_OBJECT
 
@@ -43,31 +51,53 @@ public:
   void                       setObjectName( const QString& theName );
   QString                    getObjectName() const;
 
-  void                       setPolylineName( const QString& theName );
-  QString                    getPolylineName() const;
-
-  void                       setZones( const QStringList& theZones );
-  void                       setSelectedZones( const QStringList& theZones );
-  QStringList                getSelectedZones() const;
-
-  void                       setSplittedZones( const QStringList& theZones );
-  QStringList                getSplittedZones() const;
-
-  void                       setSplitZonesPrefix( const QString& theName );
-  QString                    getSplitZonesPrefix() const;
+  void                       setEditedObject( const Handle(HYDROData_CalculationCase) theCase );
+
+  void                       setGeomObjects( const QStringList& theObjects );
+  void                       setSelectedGeomObjects( const QStringList& theObjects );
+  QStringList                getSelectedGeomObjects() const;
+  HYDROGUI_Zone*             getCurrentZone() const;
+
+public slots:
+  void                       onEmptyName();
+  void                       onAlreadyExists( QString theName );
+  void                       refreshZonesBrowser();
+  /**
+   * Process items selection: hide/show bathymetry merge type selector.
+   */
+  void                       onSelected( SUIT_DataObject* theObject );
+  /**
+   * Process merge type selection: set the selected bathymetry merge type for the currently selected zone.
+   */
+  void                       onMergeTypeSelected( int theIndex );
+  /**
+   * Process zones moving. Create a new region with dropped zones or add to existing one.
+   */
+  void                       onZonesDropped( const QList<SUIT_DataObject*>& theList, 
+    SUIT_DataObject* theTargetParent, int theTargetRow, Qt::DropAction theDropAction );
 
 signals:
-  void                       SplitZones();
+  void                       addObjects();
+  void                       removeObjects();
+  void                       splitZones();
+  void                       setMergeType( int theMergeType, QString theBathymetryName );
 
 private:
+
+  QWizardPage*               createObjectsPage();
+  QWizardPage*               createZonesPage();
+
   QGroupBox*                 myObjectNameGroup;
   QLineEdit*                 myObjectName;
+  HYDROGUI_NameValidator*    myValidator;
 
-  HYDROGUI_ObjSelector*      myBndPolyline;
+  QListWidget*               myGeomObjects;
 
-  QListWidget*               myZones;
-  QListWidget*               mySplittedZones;
-  QLineEdit*                 mySplittedZonesPrefix;
+  HYDROGUI_DataBrowser*      myBrowser;
+  Handle(HYDROData_CalculationCase) myEditedObject;
+  QComboBox*                 myBathymetryChoice;
+  QLabel*                    myBatimetryLabel;
+  HYDROGUI_Zone*             myCurrentZone;
 };
 
 #endif