#include <QMap>
+#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;
class QLabel;
class QLineEdit;
+class QCheckBox;
class QtxDoubleSpinBox;
class QtxIntSpinBox;
{
Q_OBJECT
-public:
- enum TransformationMode { ManualLambert = 0, ManualCartesian, RefImage };
-
public:
struct TransformationData
{
QPoint ImagePoint;
- QPointF LambertPoint;
+ QPointF GeodesicPoint;
QPointF CartesianPoint;
TransformationData() {}
- TransformationData( const QPoint& theImagePoint,
- const QPointF& theLambertPoint,
+ TransformationData( const QPoint& theImagePoint ) :
+ ImagePoint( theImagePoint ) {}
+
+ TransformationData( const QPoint& theImagePoint,
+ const QPointF& theGeodesicPoint,
const QPointF& theCartesianPoint ) :
ImagePoint( theImagePoint ),
- LambertPoint( theLambertPoint ),
+ GeodesicPoint( theGeodesicPoint ),
CartesianPoint( theCartesianPoint ) {}
};
typedef QMap< int, TransformationData > TransformationDataMap;
void setImageName( const QString& theName );
QString getImageName() const;
+ void setRefImageName( const QString& theName );
+ QString getRefImageName() const;
+
QString getFileName() const;
void setImageSize( const QSize& theSize,
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 );
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 blockSignalsGeodesic( const bool theState );
void blockSignalsCartesian( const bool theState );
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;
+ QList<QLabel*> myGeodesicLabels; //!< Labels for geodesic coords input fields
- QList<QLabel*> myLambertLabels;
+ QMap<int, QPushButton*> myPointBtnMap; //!< A,B,C points selection modes activators
+ QMap<int, QtxIntSpinBox*> myPointXMap; //!< X coord on the image
+ QMap<int, QtxIntSpinBox*> myPointYMap; //!< Y coord on the image
+ QMap<int, QtxIntSpinBox*> myPointXDegMap; //!< Longitude degrees
+ QMap<int, QtxIntSpinBox*> myPointYDegMap; //!< Latitude degrees
+ QMap<int, QtxIntSpinBox*> myPointXMinMap; //!< Longitude minutes
+ QMap<int, QtxIntSpinBox*> myPointYMinMap; //!< Latitude minutes
+ QMap<int, QtxDoubleSpinBox*> myPointXSecMap; //!< Longitude seconds
+ QMap<int, QtxDoubleSpinBox*> myPointYSecMap; //!< Latitude seconds
- QMap<int, QPushButton*> myPointBtnMap;
- 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, QtxDoubleSpinBox*> myCartPointXMap; //!< Lambert93 (cartesian) X coord (m)
+ QMap<int, QtxDoubleSpinBox*> myCartPointYMap; //!< Lambert93 (cartesian) Y coord (m)
- QMap<int, QtxDoubleSpinBox*> myCartPointXMap;
- QMap<int, QtxDoubleSpinBox*> myCartPointYMap;
+ QMap<int, QtxIntSpinBox*> myRefPointXMap; //!< X coord on the reference image
+ QMap<int, QtxIntSpinBox*> myRefPointYMap; //!< Y coord on the reference image
- QMap<int, QtxIntSpinBox*> myRefPointXMap;
- QMap<int, QtxIntSpinBox*> myRefPointYMap;
+ 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