LayerSearchDialog.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 /*!
21 
22 \file terralib/mnt/qt/LayerSearchDialog.h
23 
24 \brief A dialog Layer Search
25 */
26 
27 #ifndef __TERRALIB_MNT_INTERNAL_LAYERSEARCHDIALOG_H
28 #define __TERRALIB_MNT_INTERNAL_LAYERSEARCHDIALOG_H
29 
30 //terralib
31 #ifndef Q_MOC_RUN
32 #include "../../maptools/AbstractLayer.h"
33 #endif
34 #include "../core/Config.h"
35 #include "../core/Enums.h"
36 
37 // STL
38 #include <list>
39 #include <map>
40 
41 // Qt
42 #include <QDialog>
43 #include <QList>
44 
45 namespace Ui { class LayerSearchDialogForm; }
46 
47 namespace te
48 {
49  namespace mnt
50  {
51  class TEMNTEXPORT LayerSearchDialog : public QDialog
52  {
53  Q_OBJECT
54 
55  public:
56  LayerSearchDialog(QWidget* parent = 0, Qt::WindowFlags f = 0, bool mnt = true);
57 
59 
60  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
61  void setActive(const QList<mntType> &types);
62 
63  te::map::AbstractLayerPtr getLayer();
64  int getLayerIndex() { return m_selectlayer_index; }
65 
66  const QString& GetGeometryName(te::gm::GeomType t);
67  void ApplyFilter();
68 
69  protected slots:
70 
71  void onstartsEnabled(bool);
72  void onendsEnabled(bool);
73  void oncontainsEnabled(bool);
74  void onequalsEnabled(bool);
75  void onnameLineEditEditingFinished();
76 
77  void onisolinesEnabled(bool);
78  void onsamplesEnabled(bool);
79  void ongridEnabled(bool);
80  void ontinEnabled(bool);
81  void onothersEnabled(bool);
82  void onallEnabled(bool);
83 
84  void onOkPushButtonClicked();
85  void onCancelPushButtonClicked();
86 
87  private:
88 
89  std::auto_ptr<Ui::LayerSearchDialogForm> m_ui;
90 
91  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
92  QStringList m_geom_name;
93  QString m_namefilter;
94  QString m_geomfilter;
95  Qt::MatchFlags m_matchflags;
96 
99 
100  }; //class LayerSearchDialog
101  } //mnt
102 } //te
103 
104 #endif
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
const std::string & GetGeometryName(te::gm::GeomType t)
It returns the geometry OGC names.
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::map::AbstractLayerPtr m_selectLayer
Selected Layer.
URI C++ Library.
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
std::auto_ptr< Ui::LayerSearchDialogForm > m_ui
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr