X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ImportImageDlg.h;h=3473fdfb89352a94fb21dcf89266895067b08430;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=18e8b54c66b0f7d44808754e352ea606b9c20ad6;hpb=859543b7cf29f1d56c1dc1aaf4811b22b7b0bf16;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h index 18e8b54c..3473fdfb 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageDlg.h +++ b/src/HYDROGUI/HYDROGUI_ImportImageDlg.h @@ -32,6 +32,7 @@ class QComboBox; class QGroupBox; class QLabel; class QLineEdit; +class QCheckBox; class QtxDoubleSpinBox; class QtxIntSpinBox; @@ -41,10 +42,24 @@ class HYDROGUI_ImportImageDlg : public HYDROGUI_InputPanel Q_OBJECT public: - enum TransformationMode { Manual = 0, RefImage }; - -public: - typedef QPair< QPoint, QPointF > TransformationData; + struct TransformationData + { + QPoint ImagePoint; + QPointF LambertPoint; + QPointF CartesianPoint; + + TransformationData() {} + + TransformationData( const QPoint& theImagePoint ) : + ImagePoint( theImagePoint ) {} + + TransformationData( const QPoint& theImagePoint, + const QPointF& theLambertPoint, + const QPointF& theCartesianPoint ) : + ImagePoint( theImagePoint ), + LambertPoint( theLambertPoint ), + CartesianPoint( theCartesianPoint ) {} + }; typedef QMap< int, TransformationData > TransformationDataMap; typedef QPair< QString, TransformationDataMap > PrsPointData; @@ -61,11 +76,20 @@ 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, const bool theIsRefImage = false ); + 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 ); @@ -76,6 +100,12 @@ public: void initializePointSelection(); +public: + + static TransformationData ComputeTrsfData( const int theMode, + const QPoint& theLocalPoint, + const QPointF& theGlobalPoint ); + protected slots: void onBrowse(); void onModeActivated( int ); @@ -83,6 +113,16 @@ protected slots: void onPointBtnToggled( bool ); void onPointCoordChanged( int ); + void onLambertCoordChanged(); + void onLambertCoordChanged( const int thePointType ); + + void onCartesianCoordChanged(); + void onCartesianCoordChanged( const int thePointType ); + +private: + void blockSignalsLambert( const bool theState ); + void blockSignalsCartesian( const bool theState ); + signals: void createPreview( QImage ); void activatePointSelection( int ); @@ -90,6 +130,7 @@ signals: int thePointType, bool theIsY, int theValue ); + void modeActivated( int ); void refImageActivated( const QString& ); private: @@ -100,9 +141,8 @@ private: QLineEdit* myImageName; QGroupBox* myTransformGroup; - QButtonGroup* myModeGroup; - QWidget* myRefImageWg; + QButtonGroup* myModeGroup; QComboBox* myRefImage; QList myLambertLabels; @@ -117,10 +157,17 @@ private: QMap myPointXSecMap; QMap myPointYSecMap; + QMap myCartPointXMap; + QMap myCartPointYMap; + QMap myRefPointXMap; QMap myRefPointYMap; + QCheckBox* myPointCEnabler; + PrsPointDataList myPrsPointDataList; + + bool myIsInitialized; }; #endif