TiePointsLocatorDialog.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 #ifndef __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATORDIALOG_H
21 #define __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATORDIALOG_H
22 
23 // TerraLib
24 #ifndef Q_MOC_RUN
25  #include "../../dataaccess/datasource/DataSourceInfo.h"
26  #include "../../maptools/AbstractLayer.h"
27 #endif
28 #include "../Config.h"
29 #include "../TiePointsLocator.h"
30 
31 // STL
32 #include <list>
33 #include <map>
34 #include <memory>
35 
36 // Qt
37 #include <QDialog>
38 
39 namespace Ui { class TiePointsLocatorDialogForm; }
40 
41 // Forward declarations
42 class QListWidgetItem;
43 class QModelIndex;
44 
45 namespace te
46 {
47  namespace vp
48  {
49 // Forward declarations
50  class LayerTreeModel;
51 
52  class TEVPEXPORT TiePointsLocatorDialog : public QDialog
53  {
54  Q_OBJECT
55 
56  public:
57 
58  TiePointsLocatorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
59 
61 
62  /*!
63  \brief Set the layer that can be used
64 
65  \param layers List of AbstractLayerPtr
66  */
67  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
68 
70 
72 
73  /*!
74  \brief Return the current tie-points.
75  \param tiePoints The current tie-points.
76  \note Tie poit type definition [ SRID_adj, x2_adj, y2_adj, SRID_ref, x1_ref, y2_ref ].
77  */
78  void getTiePoints( std::vector< te::vp::TiePointsLocator::TiePointT >& tiePoints ) const;
79 
80  protected slots:
81 
82  void onRefLayerComboBoxChanged(int index);
83 
84  void onAdjLayerComboBoxChanged(int index);
85 
87 
89 
91 
93 
95 
96  private:
97 
98  std::unique_ptr<Ui::TiePointsLocatorDialogForm> m_ui;
99  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
102  std::vector< te::vp::TiePointsLocator::TiePointT > m_tiePoints;
103  };
104  } // end namespace vp
105 } // end namespace te
106 
107 #endif // __TERRALIB_VP_INTERNAL_TIEPOINTSLOCATORDIALOG_H
te::map::AbstractLayerPtr m_selectedRefLayer
void getTiePoints(std::vector< te::vp::TiePointsLocator::TiePointT > &tiePoints) const
Return the current tie-points.
void onAdjLayerComboBoxChanged(int index)
te::map::AbstractLayerPtr m_selectedAdjLayer
std::vector< te::vp::TiePointsLocator::TiePointT > m_tiePoints
void onRefLayerComboBoxChanged(int index)
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
void setRefLayer(te::map::AbstractLayerPtr newReflayer)
TiePointsLocatorDialog(QWidget *parent=0, Qt::WindowFlags f=0)
void setAdjLayer(te::map::AbstractLayerPtr newAdjlayer)
std::unique_ptr< Ui::TiePointsLocatorDialogForm > m_ui
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61