-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from opengisch/revert
Revert to old SDK
- Loading branch information
Showing
30 changed files
with
179 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*************************************************************************** | ||
coordinatetransform.cpp | ||
---------------------------------------------------- | ||
date : 26.2.2015 | ||
copyright : (C) 2015 by Matthias Kuhn | ||
email : matthias (at) opengis.ch | ||
*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "coordinatetransform.h" | ||
#include "qgspoint.h" | ||
|
||
CoordinateTransform::CoordinateTransform( QObject *parent ) : | ||
QObject( parent ) | ||
{ | ||
} | ||
|
||
QgsPointXY CoordinateTransform::transform( QgsPointXY pt ) const | ||
{ | ||
pt = mTransform.transform( pt ); | ||
return pt; | ||
} | ||
|
||
QgsCoordinateReferenceSystem CoordinateTransform::sourceCRS() const | ||
{ | ||
return mTransform.sourceCrs(); | ||
} | ||
|
||
QgsCoordinateReferenceSystem CoordinateTransform::destinationCRS() const | ||
{ | ||
return mTransform.destinationCrs(); | ||
} | ||
|
||
void CoordinateTransform::setSourceCRS( QgsCoordinateReferenceSystem sourceCRS ) | ||
{ | ||
if ( mTransform.sourceCrs() == sourceCRS ) | ||
return; | ||
|
||
mTransform.setSourceCrs( sourceCRS ); | ||
emit sourceCRSChanged(); | ||
} | ||
|
||
void CoordinateTransform::setDestinationCRS( QgsCoordinateReferenceSystem destCRS ) | ||
{ | ||
if ( mTransform.destinationCrs() == destCRS ) | ||
return; | ||
|
||
mTransform.setDestinationCrs( destCRS ); | ||
emit destinationCRSChanged(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/*************************************************************************** | ||
coordinatetransform.h | ||
---------------------------------------------------- | ||
date : 26.2.2015 | ||
copyright : (C) 2015 by Matthias Kuhn | ||
email : matthias (at) opengis.ch | ||
*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef COORDINATETRANSFORM_H | ||
#define COORDINATETRANSFORM_H | ||
|
||
#include <QObject> | ||
#include <QPointF> | ||
#include <qgspoint.h> | ||
|
||
#include <qgscoordinatetransform.h> | ||
|
||
class CoordinateTransform : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
Q_PROPERTY( QgsCoordinateReferenceSystem sourceCRS READ sourceCRS WRITE setSourceCRS NOTIFY sourceCRSChanged ) | ||
Q_PROPERTY( QgsCoordinateReferenceSystem destinationCRS READ destinationCRS WRITE setDestinationCRS NOTIFY destinationCRSChanged ) | ||
|
||
public: | ||
explicit CoordinateTransform( QObject *parent = nullptr ); | ||
|
||
Q_INVOKABLE QgsPointXY transform( QgsPointXY pt ) const; | ||
|
||
QgsCoordinateReferenceSystem sourceCRS() const; | ||
QgsCoordinateReferenceSystem destinationCRS() const; | ||
|
||
void setSourceCRS( QgsCoordinateReferenceSystem sourceCRS ); | ||
void setDestinationCRS( QgsCoordinateReferenceSystem destCRS ); | ||
|
||
signals: | ||
void destinationCRSChanged(); | ||
void sourceCRSChanged(); | ||
|
||
private: | ||
QgsCoordinateTransform mTransform; | ||
}; | ||
|
||
#endif // COORDINATETRANSFORM_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.