/
qgsgeorefdatapoint.h
74 lines (58 loc) · 2.41 KB
/
qgsgeorefdatapoint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/***************************************************************************
qgsgeorefdatapoint.h
--------------------------------------
Date : Sun Sep 16 12:02:56 AKDT 2007
Copyright : (C) 2007 by Gary E. Sherman
Email : sherman at mrcc dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id$ */
#ifndef QGSGEOREFDATAPOINT_H
#define QGSGEOREFDATAPOINT_H
#include "qgsmapcanvasitem.h"
class QgsGCPCanvasItem;
class QgsGeorefDataPoint : public QObject
{
Q_OBJECT
public:
//! constructor
QgsGeorefDataPoint( QgsMapCanvas *srcCanvas, QgsMapCanvas *dstCanvas,
const QgsPoint& pixelCoords, const QgsPoint& mapCoords,
bool enable );
QgsGeorefDataPoint( const QgsGeorefDataPoint &p );
~QgsGeorefDataPoint();
//! returns coordinates of the point
QgsPoint pixelCoords() const { return mPixelCoords; }
void setPixelCoords( const QgsPoint &p );
QgsPoint mapCoords() const { return mMapCoords; }
void setMapCoords( const QgsPoint &p );
bool isEnabled() const { return mEnabled; };
void setEnabled( bool enabled );
int id() const { return mId; }
void setId( int id );
bool contains( const QPoint &p, bool isMapPlugin );
QgsMapCanvas *srcCanvas() const { return mSrcCanvas; }
QgsMapCanvas *dstCanvas() const { return mDstCanvas; }
QPointF residual() const { return mResidual; }
void setResidual( const QPointF& r );
public slots:
void moveTo( const QPoint &, bool isMapPlugin );
void updateCoords();
private:
QgsMapCanvas *mSrcCanvas;
QgsMapCanvas *mDstCanvas;
QgsGCPCanvasItem *mGCPSourceItem;
QgsGCPCanvasItem *mGCPDestinationItem;
QgsPoint mPixelCoords;
QgsPoint mMapCoords;
int mId;
bool mEnabled;
QPointF mResidual;
};
#endif //QGSGEOREFDATAPOINT_H