Loading...
Searching...
No Matches
SensorManagerDialog.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/rp/SensorManagerDialog.h
22
23 \brief A dialog used to manage Spectral Sensors.
24 */
25
26#ifndef __TERRALIB_SRS_INTERNAL_QT_SENSORMANAGERDIALOG_H
27#define __TERRALIB_SRS_INTERNAL_QT_SENSORMANAGERDIALOG_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../rp/Functions.h"
32#endif
33#include "../Config.h"
34
35// Qt
36#include <QDialog>
37#include <QStringList>
38#include <QTableWidgetItem>
39#include <QTreeWidgetItem>
40
41//STL
42#include <string>
43
44// Forward declaraion
45namespace Ui { class SensorManagerDialogForm; }
46
47namespace te
48{
49 namespace qt
50 {
51 namespace widgets
52 {
53
54 /*!
55 \class SensorManagerDialog
56
57 \brief A dialog used to build a SensorManagerDialog element.
58
59 \ingroup widgets
60 */
62 {
63 Q_OBJECT
64
65 public:
66
67 /*!
68 \brief Constructs a basic dialog which is a child of parent, with widget flags set to f.
69 \param parent Pointer to the dialog parent.
70 \param f The dialog flags.
71 */
72 SensorManagerDialog( QWidget* parent = 0, Qt::WindowFlags f = 0);
73
74 /*!
75 \brief Destructor.
76 */
78
79 /*!
80 \brief Returns the selected sensor name.
81 */
82 const QString& getSelectedSensor() const;
83
84 ///*!
85 //\brief Returns the selected sensor paramters.
86 //*/
87 //const te::rp::SpectralSensorParams& getSelectedSensorParams() const;
88
89 bool isModified() { return m_modified; }
90
91 void updateSensorParams();
92
93 protected slots:
94
95 void onSensorTableWidgetItemClicked(QTableWidgetItem*);
96 void onSensorTableWidgetItemChanged(QTableWidgetItem*);
97 void onSavePushButtonClicked();
98 void onOkPushButtonClicked();
99 void onCancelPushButtonClicked();
100 void onHelpPushButtonClicked();
101 void onSearchLineEditTextChanged(const QString& text);
102 void onAddToolButtonClicked();
103
104 private:
105 void filter(const QList<QTableWidgetItem*>& items);
106
107 Ui::SensorManagerDialogForm* m_ui; //!< Dialog form.
108
109 QString m_sensorselected; //!< Selected sensor name
110 bool m_edited; //!< Flag to indicate if sensors were edited
111 bool m_modified;
112 std::map<std::string, te::rp::SpectralSensorParams > m_Params;
113 };
114 } // end namespace widgets
115 } // end namespace qt
116} // end namespace te
117
118#endif // __TERRALIB_SRS_INTERNAL_QT_SENSORMANAGERDIALOG_H
A dialog used to build a SensorManagerDialog element.
const QString & getSelectedSensor() const
Returns the selected sensor name.
SensorManagerDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a basic dialog which is a child of parent, with widget flags set to f.
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