Salome HOME
Image positioning by two points.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageDlg.h
index 8823389061318ba782c955bbc0b022c5d158648c..3473fdfb89352a94fb21dcf89266895067b08430 100644 (file)
@@ -41,9 +41,6 @@ class HYDROGUI_ImportImageDlg : public HYDROGUI_InputPanel
 {
   Q_OBJECT
 
-public:
-  enum TransformationMode { ManualLambert = 0, ManualCartesian, RefImage };
-
 public:
   struct TransformationData
   {
@@ -53,6 +50,9 @@ public:
 
     TransformationData() {}
 
+    TransformationData( const QPoint& theImagePoint ) :
+      ImagePoint( theImagePoint ) {}
+
     TransformationData( const QPoint& theImagePoint,
                         const QPointF& theLambertPoint,
                         const QPointF& theCartesianPoint ) :
@@ -76,6 +76,9 @@ public:
   void                       setImageName( const QString& theName );
   QString                    getImageName() const;
 
+  void                       setRefImageName( const QString& theName );
+  QString                    getRefImageName() const;
+
   QString                    getFileName() const;
 
   void                       setImageSize( const QSize& theSize,
@@ -84,18 +87,25 @@ public:
   void                       setTransformationMode( const int theMode );
   int                        getTransformationMode() const;
 
+  void                       setByTwoPoints( const bool theIsByTwoPoints );
+  bool                       isByTwoPoints() const;
+
   void                       setTransformationDataMap( const TransformationDataMap& theMap,
                                                        const bool theIsOnlyInput = false,
                                                        const bool theIsRefImage = false );
   bool                       getTransformationDataMap( TransformationDataMap& theMap,
                                                        const bool theIsRefImage = false ) const;
 
-  QString                    getRefImageName() const;
-
   void                       setPrsPointDataList( const PrsPointDataList& theList );
 
   void                       initializePointSelection();
 
+public:
+
+  static TransformationData  ComputeTrsfData( const int      theMode,
+                                              const QPoint&  theLocalPoint,
+                                              const QPointF& theGlobalPoint );
+
 protected slots:
   void                       onBrowse();
   void                       onModeActivated( int );