QGIS API Documentation  3.6.0-Noosa (5873452)
qgsdatumtransformdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdatumtransformdialog.h
3  -------------------------
4  begin : November 2013
5  copyright : (C) 2013 by Marco Hugentobler
6  email : marco.hugentobler at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSDATUMTRANSFORMDIALOG_H
19 #define QGSDATUMTRANSFORMDIALOG_H
20 
21 #include "ui_qgsdatumtransformdialogbase.h"
23 #include "qgscoordinatetransform.h"
24 #include "qgis_gui.h"
25 
26 #define SIP_NO_FILE
27 
33 class GUI_EXPORT QgsDatumTransformDialog : public QDialog, private Ui::QgsDatumTransformDialogBase
34 {
35  Q_OBJECT
36  public:
37 
43  QPair<int, int> selectedDatumTransforms = qMakePair( -1, -1 ),
44  QWidget *parent = nullptr,
45  Qt::WindowFlags f = nullptr );
46  ~QgsDatumTransformDialog() override;
47 
52  int availableTransformationCount();
53 
58  QPair< QPair<QgsCoordinateReferenceSystem, int>, QPair<QgsCoordinateReferenceSystem, int > > selectedDatumTransforms();
59 
60  private slots:
61  void mHideDeprecatedCheckBox_stateChanged( int state );
62  void tableCurrentItemChanged( QTableWidgetItem *, QTableWidgetItem * );
63  void setSourceCrs( const QgsCoordinateReferenceSystem &sourceCrs );
64  void setDestinationCrs( const QgsCoordinateReferenceSystem &destinationCrs );
65 
66  private:
67  bool gridShiftTransformation( const QString &itemText ) const;
69  bool testGridShiftFileAvailability( QTableWidgetItem *item ) const;
70  void load( const QPair<int, int> &selectedDatumTransforms = qMakePair( -1, -1 ) );
71  void setOKButtonEnabled();
72 
73 
74  QList< QgsDatumTransform::TransformPair > mDatumTransforms;
76  QgsCoordinateReferenceSystem mDestinationCrs;
77 };
78 
79 #endif // QGSDATUMTRANSFORMDIALOG_H
This class represents a coordinate reference system (CRS).