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 MNTLayerSearchDialogForm; }
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 
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);
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 
86 
87  private:
88 
89  std::unique_ptr<Ui::MNTLayerSearchDialogForm> 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
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::mnt::LayerSearchDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
Definition: LayerSearchDialog.h:91
te::mnt::LayerSearchDialog::m_matchflags
Qt::MatchFlags m_matchflags
Definition: LayerSearchDialog.h:95
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::mnt::LayerSearchDialog::onstartsEnabled
void onstartsEnabled(bool)
te::mnt::LayerSearchDialog::onCancelPushButtonClicked
void onCancelPushButtonClicked()
te::mnt::LayerSearchDialog::m_selectlayer_index
int m_selectlayer_index
Definition: LayerSearchDialog.h:98
te::mnt::LayerSearchDialog::m_selectLayer
te::map::AbstractLayerPtr m_selectLayer
Selected Layer.
Definition: LayerSearchDialog.h:97
te::mnt::LayerSearchDialog::onothersEnabled
void onothersEnabled(bool)
te::mnt::LayerSearchDialog::onallEnabled
void onallEnabled(bool)
te::mnt::LayerSearchDialog::onnameLineEditEditingFinished
void onnameLineEditEditingFinished()
te::mnt::LayerSearchDialog::LayerSearchDialog
LayerSearchDialog(QWidget *parent=0, Qt::WindowFlags f=0, bool mnt=true)
te::mnt::LayerSearchDialog::onequalsEnabled
void onequalsEnabled(bool)
te::mnt::LayerSearchDialog::onendsEnabled
void onendsEnabled(bool)
te::mnt::LayerSearchDialog::getLayerIndex
int getLayerIndex()
Definition: LayerSearchDialog.h:64
te::mnt::LayerSearchDialog::oncontainsEnabled
void oncontainsEnabled(bool)
te::mnt::LayerSearchDialog::ontinEnabled
void ontinEnabled(bool)
Ui
Definition: ConfigInputAddressDialog.h:44
te::mnt::LayerSearchDialog::setActive
void setActive(const QList< mntType > &types)
te::mnt::LayerSearchDialog::onisolinesEnabled
void onisolinesEnabled(bool)
slots
#define slots
Definition: VirtualMachine.h:48
te::mnt::LayerSearchDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
te::mnt::LayerSearchDialog::m_ui
std::unique_ptr< Ui::MNTLayerSearchDialogForm > m_ui
Definition: LayerSearchDialog.h:89
te::mnt::LayerSearchDialog::ApplyFilter
void ApplyFilter()
te::mnt::LayerSearchDialog
Definition: LayerSearchDialog.h:52
te::mnt::LayerSearchDialog::ongridEnabled
void ongridEnabled(bool)
te::mnt::LayerSearchDialog::m_geom_name
QStringList m_geom_name
Definition: LayerSearchDialog.h:92
te::mnt::LayerSearchDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::mnt::LayerSearchDialog::m_namefilter
QString m_namefilter
Definition: LayerSearchDialog.h:93
te::gm::GeomType
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:42
te::mnt::LayerSearchDialog::GetGeometryName
const QString & GetGeometryName(te::gm::GeomType t)
te::mnt::LayerSearchDialog::~LayerSearchDialog
~LayerSearchDialog()
TEMNTEXPORT
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::mnt::LayerSearchDialog::m_geomfilter
QString m_geomfilter
Definition: LayerSearchDialog.h:94
te::mnt::LayerSearchDialog::onsamplesEnabled
void onsamplesEnabled(bool)
te::mnt::LayerSearchDialog::getLayer
te::map::AbstractLayerPtr getLayer()