Salome HOME
Drawing of zones in OCC view improved.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportImageDlg.h
index 752a520182bc83bf16e1b7bfd9a3579db9e932ae..284f2999cd649338745e31d370ac500c2df1aae9 100644 (file)
 
 #include <QMap>
 
+class QButtonGroup;
+class QComboBox;
 class QGroupBox;
+class QLabel;
 class QLineEdit;
 
+class QtxDoubleSpinBox;
+class QtxIntSpinBox;
+
 class HYDROGUI_ImportImageDlg : public HYDROGUI_InputPanel
 {
   Q_OBJECT
 
+public:
+  enum TransformationMode { Manual = 0, RefImage };
+
 public:
   typedef QPair< QPoint, QPointF >        TransformationData;
   typedef QMap< int, TransformationData > TransformationDataMap;
 
+  typedef QPair< QString, TransformationDataMap > PrsPointData;
+  typedef QList< PrsPointData >                   PrsPointDataList;
+  typedef QListIterator< PrsPointData >           PrsPointDataListIterator;
+
 public:
   HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, const QString& theTitle );
   virtual ~HYDROGUI_ImportImageDlg();
@@ -48,19 +61,38 @@ public:
   void                       setImageName( const QString& theName );
   QString                    getImageName() const;
 
+  QString                    getFileName() const;
+
+  void                       setImageSize( const QSize& theSize,
+                                           const bool theIsRefImage = false );
+
+  int                        getTransformationMode() const;
+
   void                       setTransformationDataMap( const TransformationDataMap& theMap,
-                                                       const bool theIsOnlyInput = false );
-  bool                       getTransformationDataMap( TransformationDataMap& theMap ) const;
+                                                       const bool theIsOnlyInput = false,
+                                                       const bool theIsRefImage = false );
+  bool                       getTransformationDataMap( TransformationDataMap& theMap,
+                                                       const bool theIsRefImage = false ) const;
+
+  void                       setPrsPointDataList( const PrsPointDataList& theList );
 
   void                       initializePointSelection();
 
 protected slots:
   void                       onBrowse();
+  void                       onModeActivated( int );
+  void                       onRefImageActivated( const QString& );
   void                       onPointBtnToggled( bool );
+  void                       onPointCoordChanged( int );
 
 signals:
   void                       createPreview( QImage );
   void                       activatePointSelection( int );
+  void                       pointCoordChanged( bool theIsRef,
+                                                int thePointType,
+                                                bool theIsY,
+                                                int theValue );
+  void                       refImageActivated( const QString& );
 
 private:
   QGroupBox*                 myFileNameGroup;
@@ -69,16 +101,28 @@ private:
   QGroupBox*                 myImageNameGroup;
   QLineEdit*                 myImageName;
 
-  QGroupBox*                 myMappingGroup;
+  QGroupBox*                 myTransformGroup;
+  QButtonGroup*              myModeGroup;
+
+  QWidget*                   myRefImageWg;
+  QComboBox*                 myRefImage;
+
+  QList<QLabel*>             myLambertLabels;
+
   QMap<int, QPushButton*>    myPointBtnMap;
-  QMap<int, QLineEdit*>      myPointXMap;
-  QMap<int, QLineEdit*>      myPointYMap;
-  QMap<int, QLineEdit*>      myPointXDegMap;
-  QMap<int, QLineEdit*>      myPointYDegMap;
-  QMap<int, QLineEdit*>      myPointXMinMap;
-  QMap<int, QLineEdit*>      myPointYMinMap;
-  QMap<int, QLineEdit*>      myPointXSecMap;
-  QMap<int, QLineEdit*>      myPointYSecMap;
+  QMap<int, QtxIntSpinBox*>  myPointXMap;
+  QMap<int, QtxIntSpinBox*>  myPointYMap;
+  QMap<int, QtxIntSpinBox*>  myPointXDegMap;
+  QMap<int, QtxIntSpinBox*>  myPointYDegMap;
+  QMap<int, QtxIntSpinBox*>  myPointXMinMap;
+  QMap<int, QtxIntSpinBox*>  myPointYMinMap;
+  QMap<int, QtxDoubleSpinBox*> myPointXSecMap;
+  QMap<int, QtxDoubleSpinBox*> myPointYSecMap;
+
+  QMap<int, QtxIntSpinBox*>  myRefPointXMap;
+  QMap<int, QtxIntSpinBox*>  myRefPointYMap;
+
+  PrsPointDataList           myPrsPointDataList;
 };
 
 #endif