X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_CalculationDlg.h;h=eaf3aa26aa6a52a2e81a437d88753c6953b79619;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=c63fffa51aafe390f669b0a72d1941b621d7a110;hpb=11ec2af6a8049f50cdd7b8f53da49f813b5d2c8f;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_CalculationDlg.h b/src/HYDROGUI/HYDROGUI_CalculationDlg.h index c63fffa5..eaf3aa26 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationDlg.h +++ b/src/HYDROGUI/HYDROGUI_CalculationDlg.h @@ -23,14 +23,22 @@ #ifndef HYDROGUI_CALCULATIONDLG_H #define HYDROGUI_CALCULATIONDLG_H -#include "HYDROGUI_InputPanel.h" +#include "HYDROGUI_Wizard.h" +#include 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,84 @@ public: void setObjectName( const QString& theName ); QString getObjectName() const; - void setPolylineName( const QString& theName ); - QString getPolylineName() const; + void setEditedObject( const Handle(HYDROData_CalculationCase) theCase ); + + void setAllGeomObjects( const QStringList& theObjects, const QStringList& theObjectsEntries ); + void setPolylineNames( const QStringList& theObjects, const QStringList& theObjectsEntries ); + QStringList getSelectedGeomObjects() const; + QStringList getSelectedAvailableGeomObjects() const; + QStringList getSelectedGroups() const; + QStringList getSelectedAvailableGroups() const; + HYDROGUI_Zone* getCurrentZone() const; + + void setAvailableGroups( const QStringList& ); + +public slots: + 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 onEmptyName(); + void onAlreadyExists( QString theName ); + void refreshZonesBrowser(); + void onDataChanged(); + /** + * 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& theList, + SUIT_DataObject* theTargetParent, int theTargetRow, Qt::DropAction theDropAction ); + +signals: + void addObjects(); + void removeObjects(); + void objectsSelected(); - void setZones( const QStringList& theZones ); - void setSelectedZones( const QStringList& theZones ); - QStringList getSelectedZones() const; + void addGroups(); + void removeGroups(); + void groupsSelected(); - void setRegions( const QStringList& theRegions ); - QStringList getRegions() const; + void boundarySelected( const QString & theObjName ); + void setMergeType( int theMergeType, QString& theBathymetryName ); + void createRegion( const QList& theZonesList ); + void moveZones( SUIT_DataObject* theRegion, const QList& theZonesList ); + void clickedInZonesBrowser( SUIT_DataObject* ); - void setSplitZonesPrefix( const QString& theName ); - QString getSplitZonesPrefix() const; +protected: -signals: - void SplitZones(); + virtual bool acceptCurrent() const; private: + + QWizardPage* createObjectsPage(); + QWizardPage* createGroupsPage(); + QWizardPage* createZonesPage(); + QGroupBox* myObjectNameGroup; QLineEdit* myObjectName; + HYDROGUI_NameValidator* myValidator; + + QComboBox* myPolylineName; + + QListWidget* myAvailableGeomObjects; + QListWidget* myGeomObjects; - HYDROGUI_ObjSelector* myBndPolyline; + QListWidget* myAvailableGroups; + QListWidget* myGroups; - QListWidget* myZones; - QListWidget* myRegions; - QLineEdit* mySplittedZonesPrefix; + HYDROGUI_DataBrowser* myBrowser; + Handle(HYDROData_CalculationCase) myEditedObject; + QComboBox* myBathymetryChoice; + QLabel* myBatimetryLabel; + HYDROGUI_Zone* myCurrentZone; }; #endif