ContrastEnhancementWidget.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  \file terralib/qt/widgets/se/ContrastEnhancementWidget.h
22 
23  \brief A widget used to build ContrastEnhancement element.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_CONTRASTENHANCEMENTWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_CONTRASTENHANCEMENTWIDGET_H
28 
29 // TerraLib
30 #include "../Config.h"
31 #include "../../../se.h"
32 
33 // Qt
34 #include <QWidget>
35 
36 // STL
37 #include <memory>
38 #include <string>
39 #include <vector>
40 
41 // Forward declaraion
42 namespace Ui { class ContrastEnhancementWidgetForm; }
43 
44 namespace te
45 {
46 // Forward declarations
47  namespace se
48  {
49  class ContrastEnhancement;
50  }
51 
52  namespace qt
53  {
54  namespace widgets
55  {
56 
57  /*!
58  \class ContrastEnhancementWidget
59 
60  \brief A dialog used to build a ContrastEnhancementWidget element.
61  */
63  {
64  Q_OBJECT
65 
66  public:
67 
68  /** @name Initializer Methods
69  * Methods related to instantiation and destruction.
70  */
71  //@{
72 
73  /*! \brief Constructs a ContrastEnhancementWidget dialog which is a child of parent, with widget flags set to f. */
74  ContrastEnhancementWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
75 
76  /*! \brief Destructor. */
78 
79  //@}
80 
81  public:
82 
83  void setContrastEnhancement(te::se::ContrastEnhancement* ce);
84 
85  te::se::ContrastEnhancement* getContrastEnhancement() const;
86 
87  protected:
88 
89  /*! \brief Internal method to initialize the widget (e.g.: color, combos, icons, etc.) */
90  void initialize();
91 
92  /*! \brief Updates the widget form based on internal fill element. */
93  void updateUi();
94 
95  protected slots:
96 
97  void onGammaValueChanged(double value);
98 
99  void onTypeChanged(QString value);
100 
101 
102  signals:
103 
104  void contrastEnhancementChanged();
105 
106  private:
107 
108  std::auto_ptr<Ui::ContrastEnhancementWidgetForm> m_ui; //!< Dialog form.
109 
110  te::se::ContrastEnhancement* m_contrast; //!< SE Contrast element
111 
112  std::map<te::se::ContrastEnhancement::ContrastEnhancementType, QString> m_ceNames; //!< Contrast Types Names
113 
114  };
115 
116  } // end namespace widgets
117  } // end namespace qt
118 } // end namespace te
119 
120 #endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_CONTRASTENHANCEMENTWIDGET_H
std::auto_ptr< Ui::ContrastEnhancementWidgetForm > m_ui
Dialog form.
std::map< te::se::ContrastEnhancement::ContrastEnhancementType, QString > m_ceNames
Contrast Types Names.
URI C++ Library.
ContrastEnhancement defines the 'stretching' of contrast for a channel of a false-color image or for ...
A dialog used to build a ContrastEnhancementWidget element.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
te::se::ContrastEnhancement * m_contrast
SE Contrast element.