class QGroupBox;
class QLabel;
class QLineEdit;
+class QCheckBox;
class QtxDoubleSpinBox;
class QtxIntSpinBox;
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;
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 );
void initializePointSelection();
+public:
+
+ static TransformationData ComputeTrsfData( const int theMode,
+ const QPoint& theLocalPoint,
+ const QPointF& theGlobalPoint );
+
protected slots:
void onBrowse();
void onModeActivated( int );
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 );
int thePointType,
bool theIsY,
int theValue );
+ void modeActivated( int );
void refImageActivated( const QString& );
private:
QLineEdit* myImageName;
QGroupBox* myTransformGroup;
- QButtonGroup* myModeGroup;
- QWidget* myRefImageWg;
+ QButtonGroup* myModeGroup;
QComboBox* myRefImage;
QList<QLabel*> myLambertLabels;
QMap<int, QtxDoubleSpinBox*> myPointXSecMap;
QMap<int, QtxDoubleSpinBox*> myPointYSecMap;
+ QMap<int, QtxDoubleSpinBox*> myCartPointXMap;
+ QMap<int, QtxDoubleSpinBox*> myCartPointYMap;
+
QMap<int, QtxIntSpinBox*> myRefPointXMap;
QMap<int, QtxIntSpinBox*> myRefPointYMap;
+ QCheckBox* myPointCEnabler;
+
PrsPointDataList myPrsPointDataList;
+
+ bool myIsInitialized;
};
#endif