Salome HOME
refs #1327: debug of scaling operations
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_LandCoverMapOp.h
index 092af90e8c9245514fbc2a9692ca06675e393daa..b34d2f422b1c66e9c68bc7cbc73c27be63d2279f 100644 (file)
 
 #include <HYDROData_LandCoverMap.h>
 
+#include <AIS_InteractiveContext.hxx>
+
+class SUIT_ViewWindow;
+class QMouseEvent;
+
 class HYDROGUI_LandCoverMapOp : public HYDROGUI_Operation
 {
   Q_OBJECT
@@ -32,28 +37,45 @@ public:
   virtual ~HYDROGUI_LandCoverMapOp();
     
 protected:
-  virtual void                 startOperation();
-  virtual void                 abortOperation();
-  virtual void                 commitOperation();
+  virtual void                   startOperation();
+  virtual void                   abortOperation();
+  virtual void                   commitOperation();
+
+  virtual HYDROGUI_InputPanel*   createInputPanel() const;
 
-  virtual HYDROGUI_InputPanel* createInputPanel() const;
+  virtual bool                   processApply( int& theUpdateFlags, QString& theErrorMsg,
+                                               QStringList& theBrowseObjectsEntries );
 
-  virtual bool                 processApply( int& theUpdateFlags, QString& theErrorMsg,
-                                             QStringList& theBrowseObjectsEntries );
+  virtual HYDROGUI_Shape*        getPreviewShape() const { return myPreviewPrs; };
 
-  virtual HYDROGUI_Shape*      getPreviewShape() const { return myPreviewPrs; };
+signals:
+  void                           selectionChanged();
+  void                           deselection();
 
 protected slots:
-  void                         onCreatePreview( const QStringList& thePolylineNames );
+  void                           onLandCoverMapChanged( const QString& theName );
+  void                           onPolylineFaceChanged();
+  void                           onCreatePreview();
+  void                           onViewerSelectionChanged();
+  void                           onMousePress(SUIT_ViewWindow*, QMouseEvent*);
+  void                           onMouseRelease(SUIT_ViewWindow*, QMouseEvent*);
 
 private:
-  void                         closePreview();
+  void                           closePreview();
+
+  Handle(AIS_InteractiveContext) getInteractiveContext();
+  void                           getSelectedShapes( TopTools_ListOfShape& theSelectedShapes );
+  int                            getNbSelected();
+  void                           selectLandCoverInPreview();
 
 private:
   int                             myOperationId;
   Handle(HYDROData_LandCoverMap)  myEditedObject;
 
   HYDROGUI_Shape*                 myPreviewPrs;
+  HYDROGUI_Shape*                 myPolylineFacePreviewPrs;
+
+  QPoint                          myStartPnt, myEndPnt;
 };
 
 #endif