SymbolInfoDialog.cpp
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/SymbolInfoDialog.cpp
22 
23  \brief A dialog used to configure informations about a symbol.
24 */
25 
26 // TerraLib
27 #include "SymbolInfoDialog.h"
28 #include "ui_SymbolInfoDialogForm.h"
29 
31  : QDialog(parent, f),
32  m_ui(new Ui::SymbolInfoDialogForm)
33 {
34  m_ui->setupUi(this);
35 }
36 
38 
40 {
41  return m_symbolInfo;
42 }
43 
45 {
46  m_symbolInfo = info;
47  updateUi();
48 }
49 
51 {
52  m_ui->m_nameLineEdit->setReadOnly(enable);
53  m_ui->m_authorLineEdit->setReadOnly(enable);
54  m_ui->m_tagsLineEdit->setReadOnly(enable);
55  m_ui->m_descriptionTextEdit->setReadOnly(enable);
56 }
57 
59 {
60  m_ui->m_idLineEdit->setText(m_symbolInfo.m_id.c_str());
61  m_ui->m_nameLineEdit->setText(m_symbolInfo.m_name.c_str());
62  m_ui->m_authorLineEdit->setText(m_symbolInfo.m_author.c_str());
63  m_ui->m_tagsLineEdit->setText(m_symbolInfo.m_tags.c_str());
64  m_ui->m_descriptionTextEdit->setText(m_symbolInfo.m_description.c_str());
65 }
void setReadMode(bool enable=true)
SymbolInfoDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a symbol info dialog which is a child of parent, with widget flags set to f...
void updateUi()
Updates the dialog form based on internal symbol info object.
A dialog used to configure informations about a symbol.
Information about a given Symbol.
Definition: SymbolInfo.h:60
SymbolInfo m_symbolInfo
Symbol information that will be configured by the dialog.
std::unique_ptr< Ui::SymbolInfoDialogForm > m_ui
Dialog form.
SymbolInfo getSymbolInfo() const
Gets the configured symbol information.
void setSymbolInfo(const SymbolInfo &info)
Sets the symbol information to this dialog.