X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportImageDlg.h;h=b4a2c950c54ec84103505ba488fcf97bf90b120d;hb=a300fde9adcb04f1d57269c2849e7337a6d3d4a3;hp=3473fdfb89352a94fb21dcf89266895067b08430;hpb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h index 3473fdfb..b4a2c950 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h @@ -27,6 +27,12 @@ #include +#define LAMBERT_X0 700000 +#define LAMBERT_Y0 6600000 +#define LAMBERT_LONG 3 +#define LAMBERT_LATT 46.5 +#define IMG_DELTA 500 + class QButtonGroup; class QComboBox; class QGroupBox; @@ -36,6 +42,7 @@ class QCheckBox; class QtxDoubleSpinBox; class QtxIntSpinBox; +class QAbstractSpinBox; class HYDROGUI_ImportImageDlg : public HYDROGUI_InputPanel { @@ -45,7 +52,7 @@ public: struct TransformationData { QPoint ImagePoint; - QPointF LambertPoint; + QPointF GeodesicPoint; QPointF CartesianPoint; TransformationData() {} @@ -53,11 +60,11 @@ public: TransformationData( const QPoint& theImagePoint ) : ImagePoint( theImagePoint ) {} - TransformationData( const QPoint& theImagePoint, - const QPointF& theLambertPoint, + TransformationData( const QPoint& theImagePoint, + const QPointF& theGeodesicPoint, const QPointF& theCartesianPoint ) : ImagePoint( theImagePoint ), - LambertPoint( theLambertPoint ), + GeodesicPoint( theGeodesicPoint ), CartesianPoint( theCartesianPoint ) {} }; typedef QMap< int, TransformationData > TransformationDataMap; @@ -80,6 +87,8 @@ public: QString getRefImageName() const; QString getFileName() const; + void setFileName( const QString& theName ); + QString getGeoreferencementFileName() const; void setImageSize( const QSize& theSize, const bool theIsRefImage = false ); @@ -108,20 +117,24 @@ public: protected slots: void onBrowse(); + void onGeoBrowse(); void onModeActivated( int ); void onRefImageActivated( const QString& ); void onPointBtnToggled( bool ); void onPointCoordChanged( int ); + void onSetCIsUsed( bool theCIsUsed ); - void onLambertCoordChanged(); - void onLambertCoordChanged( const int thePointType ); + void onGeodesicCoordChanged(); + void onGeodesicCoordChanged( const int thePointType ); void onCartesianCoordChanged(); void onCartesianCoordChanged( const int thePointType ); private: - void blockSignalsLambert( const bool theState ); - void blockSignalsCartesian( const bool theState ); + void clearSpins( QAbstractSpinBox* theSpin ); + bool blockSignalsPoints( const bool theState ); + bool blockSignalsGeodesic( const bool theState ); + bool blockSignalsCartesian( const bool theState ); signals: void createPreview( QImage ); @@ -132,42 +145,45 @@ signals: int theValue ); void modeActivated( int ); void refImageActivated( const QString& ); + void setCIsUsed( bool theIsByTwoPoints ); private: - QGroupBox* myFileNameGroup; - QLineEdit* myFileName; + QGroupBox* myFileNameGroup; //!< The group for the source image file selection + QLineEdit* myFileName; //!< Source image file name input field + + QGroupBox* myImageNameGroup; //!< The group for the image name input field + QLineEdit* myImageName; //!< The image name input field - QGroupBox* myImageNameGroup; - QLineEdit* myImageName; + QGroupBox* myTransformGroup; //!< The group of input contols for points definition - QGroupBox* myTransformGroup; + QButtonGroup* myModeGroup; //!< The group for the input mode selector + QComboBox* myRefImage; //!< Reference image selector - QButtonGroup* myModeGroup; - QComboBox* myRefImage; + QLineEdit* myGeoFileName; //!< Image georeferencement file name input field - QList myLambertLabels; + QList myGeodesicLabels; //!< Labels for geodesic coords input fields - QMap myPointBtnMap; - QMap myPointXMap; - QMap myPointYMap; - QMap myPointXDegMap; - QMap myPointYDegMap; - QMap myPointXMinMap; - QMap myPointYMinMap; - QMap myPointXSecMap; - QMap myPointYSecMap; + QMap myPointBtnMap; //!< A,B,C points selection modes activators + QMap myPointXMap; //!< X coord on the image + QMap myPointYMap; //!< Y coord on the image + QMap myPointXDegMap; //!< Longitude degrees + QMap myPointYDegMap; //!< Latitude degrees + QMap myPointXMinMap; //!< Longitude minutes + QMap myPointYMinMap; //!< Latitude minutes + QMap myPointXSecMap; //!< Longitude seconds + QMap myPointYSecMap; //!< Latitude seconds - QMap myCartPointXMap; - QMap myCartPointYMap; + QMap myCartPointXMap; //!< Lambert93 (cartesian) X coord (m) + QMap myCartPointYMap; //!< Lambert93 (cartesian) Y coord (m) - QMap myRefPointXMap; - QMap myRefPointYMap; + QMap myRefPointXMap; //!< X coord on the reference image + QMap myRefPointYMap; //!< Y coord on the reference image - QCheckBox* myPointCEnabler; + QCheckBox* myPointCEnabler; //!< Checkbox for enabling definition of the point C - PrsPointDataList myPrsPointDataList; + PrsPointDataList myPrsPointDataList; //!< Points presentations - bool myIsInitialized; + bool myIsInitialized; //!< True if a point selection is activated }; #endif