All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
30 te::qt::widgets::SymbolInfoDialog::SymbolInfoDialog(QWidget* parent, Qt::WindowFlags f)
31  : QDialog(parent, f),
32  m_ui(new Ui::SymbolInfoDialogForm)
33 {
34  m_ui->setupUi(this);
35 }
36 
38 {
39 }
40 
42 {
43  return m_symbolInfo;
44 }
45 
47 {
48  m_symbolInfo = info;
49  updateUi();
50 }
51 
53 {
54  m_ui->m_nameLineEdit->setReadOnly(enable);
55  m_ui->m_authorLineEdit->setReadOnly(enable);
56  m_ui->m_tagsLineEdit->setReadOnly(enable);
57  m_ui->m_descriptionTextEdit->setReadOnly(enable);
58 }
59 
61 {
62  m_ui->m_idLineEdit->setText(m_symbolInfo.m_id.c_str());
63  m_ui->m_nameLineEdit->setText(m_symbolInfo.m_name.c_str());
64  m_ui->m_authorLineEdit->setText(m_symbolInfo.m_author.c_str());
65  m_ui->m_tagsLineEdit->setText(m_symbolInfo.m_tags.c_str());
66  m_ui->m_descriptionTextEdit->setText(m_symbolInfo.m_description.c_str());
67 }
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
std::auto_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.