Loading...
Searching...
No Matches
SlicingColorMapWidget.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5TerraLib is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 3 of the License,
8or (at your option) any later version.
9
10TerraLib is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License
16along with TerraLib. See COPYING. If not, write to
17TerraLib Team at <terralib-team@terralib.org>.
18*/
19
20/*!
21\file terralib/qt/widgets/se/SlicingColorMapWidget.h
22
23\brief A widget used to adjust the color map with the minimal required parameters.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_SLICINGCOLORMAPWIDGET_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_SLICINGCOLORMAPWIDGET_H
28
29// TerraLib
30#include "../../../se/Enums.h"
31#include "../Config.h"
32
33// Qt
34#include <QWidget>
35#include <QTableWidgetItem>
36
37// STL
38#include <memory>
39#include <string>
40#include <vector>
41
42// Forward declaraion
43namespace Ui { class SlicingColorMapForm; }
44
45namespace te
46{
47 // Forward declarations
48 namespace color
49 {
50 class ColorBar;
51 }
52
53 namespace se
54 {
55 class ColorMap;
56 }
57
58 namespace rst
59 {
60 class Raster;
61 }
62
63 namespace qt
64 {
65 namespace widgets
66 {
67 // Forward declarations
68 class ColorCatalogWidget;
69
70 /*!
71 \class ColorMapWidget
72
73 \brief A dialog used to build a ColorMap element.
74 */
76 {
77 Q_OBJECT
78
79 public:
80
81 /** @name Initializer Methods
82 * Methods related to instantiation and destruction.
83 */
84 //@{
85
86 /*! \brief Constructs a SlicingColorMapWidget which is a child of parent, with widget flags set to f. */
87 SlicingColorMapWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
88
89 /*! \brief Destructor. */
91
92 //@}
93
94 public:
95
97
99
101
102 Ui::SlicingColorMapForm* getForm();
103
104 /*!
105 \brief Returns the output indexes values vector.
106 */
107 void getIndexes( std::vector< double >& indexesVector ) const;
108
109 protected:
110
111 /*! \brief Updates the widget form based on internal fill element. */
112 void updateUi(bool loadColorBar = false);
113
114 protected slots:
115
117
118 void onBandSelected(int band);
119
120 void onTableWidgetItemDoubleClicked(QTableWidgetItem* item);
121
122 signals:
123
125
126 private:
127
128 //No copy allowed
131
132 std::unique_ptr<Ui::SlicingColorMapForm> m_ui; //!< Dialog form.
133 te::qt::widgets::ColorCatalogWidget* m_colorBar; //!< Widget used to pick a color.
134 te::se::ColorMap* m_cm; //!< SE Color Map element.
135 te::color::ColorBar* m_cb; //!< Terralib color bar object
136 te::rst::Raster* m_raster; //!< TerraLib raster object
137 };
138
139 } // end namespace widgets
140 } // end namespace qt
141} // end namespace te
142
143#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_COLORMAPWIDGET_H
It models the concept of color bar.
Definition: ColorBar.h:50
SlicingColorMapWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a SlicingColorMapWidget which is a child of parent, with widget flags set to f.
SlicingColorMapWidget(const SlicingColorMapWidget &rhs)
SlicingColorMapWidget & operator=(const SlicingColorMapWidget &rhs)
te::se::ColorMap * m_cm
SE Color Map element.
te::rst::Raster * m_raster
TerraLib raster object.
te::color::ColorBar * m_cb
Terralib color bar object.
void setColorMap(te::se::ColorMap *cm)
void updateUi(bool loadColorBar=false)
Updates the widget form based on internal fill element.
Ui::SlicingColorMapForm * getForm()
void getIndexes(std::vector< double > &indexesVector) const
Returns the output indexes values vector.
std::unique_ptr< Ui::SlicingColorMapForm > m_ui
Dialog form.
te::qt::widgets::ColorCatalogWidget * m_colorBar
Widget used to pick a color.
void onTableWidgetItemDoubleClicked(QTableWidgetItem *item)
void setRaster(te::rst::Raster *r)
An abstract class for raster data strucutures.
Definition: Raster.h:72
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
Definition: ColorMap.h:62
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63