Loading...
Searching...
No Matches
Legend.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 Legend.h
22
23 \brief It provides an implementation for generating a legend for a layer.
24 */
25
26#ifndef __TERRALIB_QT_WIDGETS_INTERNAL_LEGEND_H
27#define __TERRALIB_QT_WIDGETS_INTERNAL_LEGEND_H
28
29// TerraLib
30#include "../Config.h"
33#include "../../../color/RGBAColor.h"
34
35// Qt
36#include <QtGui/QDialog>
37#include "ui/ui_Legend.h"
38
39
40namespace te
41{
42 namespace da
43 {
44 class DataSource;
45 class DataSourceTransactor;
46 class DataSetType;
47 }
48
49 namespace color { class ColorBar; }
50 namespace map { class LegendItem; }
51
52 namespace qt
53 {
54 namespace widgets
55 {
56 // Forward declarations
57 class LayerItem;
58
59 class TEQTWIDGETSEXPORT Legend : public QDialog, public Ui_LegendDialog
60 {
61 Q_OBJECT
62
63 public:
64 Legend(te::qt::widgets::LayerItem* layerItem, QWidget* parent = 0);
65
66 const std::vector<te::map::LegendItem*>& getLegend() const;
67
69
70 protected:
71 void closeEvent(QCloseEvent* e);
72
73 private slots:
74 void typeComboBoxActivated(int index);
76 void legendTableItemChanged(QTableWidgetItem*);
80
81 private:
83
84 private:
86
89
90 std::vector<te::map::LegendItem*> m_legend;
92 std::vector<te::color::RGBAColor> m_legendColors;
94
95 std::map<int, std::string> m_changedItemLabel;
96 };
97 } // end namespace widgets
98 } // end namespace qt
99} // endnamespace te
100
101#endif // __TERRALIB_QT_WIDGETS_INTERNAL_LEGEND_H
It models the concept of color bar.
Definition: ColorBar.h:50
A class that models the description of a dataset.
Definition: DataSetType.h:73
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
An item that contains a te::map::AbstractLayerPtr.
Definition: LayerItem.h:52
te::qt::widgets::LayerItem * m_layerItem
Definition: Legend.h:85
te::da::DataSourceTransactor * m_t
Definition: Legend.h:87
std::vector< te::color::RGBAColor > m_legendColors
Definition: Legend.h:92
Legend(te::qt::widgets::LayerItem *layerItem, QWidget *parent=0)
size_t getNumberOfValuesNotGrouped() const
te::da::DataSetType * m_dataSetType
Definition: Legend.h:88
const std::vector< te::map::LegendItem * > & getLegend() const
void typeComboBoxActivated(int index)
size_t m_numValuesNotGrouped
Definition: Legend.h:93
std::vector< te::map::LegendItem * > m_legend
Definition: Legend.h:90
void closeEvent(QCloseEvent *e)
void legendTableItemChanged(QTableWidgetItem *)
std::map< int, std::string > m_changedItemLabel
Definition: Legend.h:95
te::color::ColorBar * m_colorBar
Definition: Legend.h:91
The concept of color bar.
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