-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqgsgeorefdatapoint.h
64 lines (52 loc) · 2.09 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
/***************************************************************************
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$ */
#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() { return mId; }
void setId(int id);
bool contains(const QPoint &p);
QgsMapCanvas *srcCanvas() const { return mSrcCanvas; }
QgsMapCanvas *dstCanvas() const { return mDstCanvas; }
public slots:
void moveTo(const QPoint &);
void updateCoords();
private:
QgsMapCanvas *mSrcCanvas;
QgsMapCanvas *mDstCanvas;
QgsGCPCanvasItem *mGCPSourceItem;
QgsGCPCanvasItem *mGCPDestinationItem;
QgsPoint mPixelCoords;
QgsPoint mMapCoords;
int mId;
bool mEnabled;
};