X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_CalculationOp.h;h=729db62eb18ef1f585fe153a3fa8e3a68ac63ea2;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=0ca60d2ffeb791d7a7ea5b3a4552729a1af35b36;hpb=2e1739ce97c68eccf2cd6599c4440e0cb935abbc;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.h b/src/HYDROGUI/HYDROGUI_CalculationOp.h index 0ca60d2f..729db62e 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.h +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.h @@ -25,12 +25,47 @@ #include "HYDROGUI_Operation.h" -#include +#include "HYDROData_SplitToZonesTool.h" +#include "HYDROGUI_Shape.h" + +#include +#include + +class SUIT_ViewManager; +class OCCViewer_ViewManager; +class HYDROGUI_CalculationDlg; class HYDROGUI_CalculationOp : public HYDROGUI_Operation { Q_OBJECT + struct Region + { + QString RegionName; + QColor FillingColor; + QColor BorderColor; + HYDROData_SplitToZonesTool::SplitData SplitData; + HYDROGUI_Shape* Shape; + Handle(HYDROData_Region) DataRegion; + + Region() + : Shape( NULL ), + FillingColor( Qt::green ), + BorderColor( Qt::transparent ) + { } + + ~Region() + { + if ( Shape ) + { + delete Shape; + Shape = NULL; + } + } + }; + + typedef QList RegionsList; + public: HYDROGUI_CalculationOp( HYDROGUI_Module* theModule, bool theIsEdit ); virtual ~HYDROGUI_CalculationOp(); @@ -42,12 +77,38 @@ protected: virtual HYDROGUI_InputPanel* createInputPanel() const; + virtual void onApply(); virtual bool processApply( int& theUpdateFlags, QString& theErrorMsg ); +protected slots: + /** + * Add geometry objects selected in the module browser to the calculation case. + */ + void onAddObjects(); + /** + * Remove selected objects from the calculation case. + */ + void onRemoveObjects(); + /** + * Set the given bathymetry merge type to the current zone. + */ + void onSetMergeType( int theMergeType, QString theBathymetryName ); + void onSplitZones(); + void onLastViewClosed( SUIT_ViewManager* ); + +private: + void createPreview(); + void closePreview(); + void updateGeomObjectsList( HYDROGUI_CalculationDlg* thePanel ) const; + private: bool myIsEdit; - Handle(HYDROData_Calculation) myEditedObject; + Handle(HYDROData_CalculationCase) myEditedObject; + + SUIT_ViewManager* myActiveViewManager; + OCCViewer_ViewManager* myPreviewViewManager; + RegionsList myRegionsList; }; #endif