ProjectInfoWidget.cpp
Go to the documentation of this file.
1 #include "ui_ProjectInfoWidgetForm.h"
2 #include "ProjectInfoWidget.h"
3 #include "Project.h"
4 
6  QWidget(parent),
7  m_proj(nullptr),
8  m_ui(new Ui::ProjectInfoWidgetForm)
9 {
10  m_ui->setupUi(this);
11  m_ui->m_description->setEnabled(false);
12 }
13 
15 
17 {
18  m_proj = project;
19 
20  if(m_proj != nullptr)
21  {
22  m_ui->m_author->setText(m_proj->m_author);
23  m_ui->m_title->setText(m_proj->m_title);
24  m_ui->m_location->setText(m_proj->m_fileName);
25  }
26 }
27 
29 {
30  if(m_proj != nullptr)
31  {
32  m_proj->m_title = m_ui->m_title->text();
33  m_proj->m_author = m_ui->m_author->text();
34  m_proj->m_changed = true;
35  }
36 }
Contains a widget for define Project informations.
This class models the concept of a project for the TerraView.
void setProject(ProjectMetadata *proj)
Updates the te::qt::af::Project being visualized.
bool m_changed
Flag indicating that the project needs to be saved.
Definition: Project.h:43
QString m_fileName
The project file.
Definition: Project.h:44
void updateProjectInfo()
Updates the te::qt::af::Project informations.
ProjectInfoWidget(QWidget *parent=0)
Constructor.
QString m_author
The author of the project.
Definition: Project.h:42
ProjectMetadata * m_proj
te::qt::af::Project being presented.
Ui::ProjectInfoWidgetForm * m_ui
Pointer to the form.
QString m_title
The title of the project.
Definition: Project.h:41
~ProjectInfoWidget()
Destructor.