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 #include "../../maptools/AbstractLayer.h"
32 #include "../core/Config.h"
33 #include "../core/Enums.h"
34 
35 // STL
36 #include <list>
37 #include <map>
38 
39 // Qt
40 #include <QDialog>
41 #include <QList>
42 
43 namespace Ui { class LayerSearchDialogForm; }
44 
45 namespace te
46 {
47  namespace mnt
48  {
49  class TEMNTEXPORT LayerSearchDialog : public QDialog
50  {
51  Q_OBJECT
52 
53  public:
54  LayerSearchDialog(QWidget* parent = 0, Qt::WindowFlags f = 0, bool mnt = true);
55 
57 
58  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
59  void setActive(const QList<mntType> &types);
60 
61  te::map::AbstractLayerPtr getLayer();
62  int getLayerIndex() { return m_selectlayer_index; }
63 
64  const QString& GetGeometryName(te::gm::GeomType t);
65  void ApplyFilter();
66 
67  protected slots:
68 
69  void onstartsEnabled(bool);
70  void onendsEnabled(bool);
71  void oncontainsEnabled(bool);
72  void onequalsEnabled(bool);
73  void onnameLineEditEditingFinished();
74 
75  void onisolinesEnabled(bool);
76  void onsamplesEnabled(bool);
77  void ongridEnabled(bool);
78  void ontinEnabled(bool);
79  void onothersEnabled(bool);
80  void onallEnabled(bool);
81 
82  void onHelpPushButtonClicked();
83  void onOkPushButtonClicked();
84  void onCancelPushButtonClicked();
85 
86  private:
87 
88  std::auto_ptr<Ui::LayerSearchDialogForm> m_ui;
89 
90  std::list<te::map::AbstractLayerPtr> m_layers; //!< List of layers.
91  QStringList m_geom_name;
92  QString m_namefilter;
93  QString m_geomfilter;
94  Qt::MatchFlags m_matchflags;
95 
98 
99  }; //class LayerSearchDialog
100  } //mnt
101 } //te
102 
103 #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