Main Page
Modules
Namespaces
Classes
Files
File List
File Members
ProjectInfoWidget.cpp
Go to the documentation of this file.
1
#include "ui_ProjectInfoWidgetForm.h"
2
#include "
ProjectInfoWidget.h
"
3
#include "
Project.h
"
4
5
ProjectInfoWidget::ProjectInfoWidget
(
QWidget
* parent) :
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
14
ProjectInfoWidget::~ProjectInfoWidget
() =
default
;
15
16
void
ProjectInfoWidget::setProject
(
ProjectMetadata
* project)
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
28
void
ProjectInfoWidget::updateProjectInfo
()
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
}
ProjectInfoWidget.h
Contains a widget for define Project informations.
QWidget
Ui
Definition:
attic/src/qt/plugins/datasource/wcs/WCSConnectorDialog.h:41
Project.h
This class models the concept of a project for the TerraView.
ProjectInfoWidget::setProject
void setProject(ProjectMetadata *proj)
Updates the te::qt::af::Project being visualized.
Definition:
ProjectInfoWidget.cpp:16
ProjectMetadata::m_changed
bool m_changed
Flag indicating that the project needs to be saved.
Definition:
Project.h:43
ProjectMetadata::m_fileName
QString m_fileName
The project file.
Definition:
Project.h:44
ProjectInfoWidget::updateProjectInfo
void updateProjectInfo()
Updates the te::qt::af::Project informations.
Definition:
ProjectInfoWidget.cpp:28
ProjectMetadata
Definition:
Project.h:39
ProjectInfoWidget::ProjectInfoWidget
ProjectInfoWidget(QWidget *parent=0)
Constructor.
Definition:
ProjectInfoWidget.cpp:5
ProjectMetadata::m_author
QString m_author
The author of the project.
Definition:
Project.h:42
ProjectInfoWidget::m_proj
ProjectMetadata * m_proj
te::qt::af::Project being presented.
Definition:
ProjectInfoWidget.h:75
ProjectInfoWidget::m_ui
Ui::ProjectInfoWidgetForm * m_ui
Pointer to the form.
Definition:
ProjectInfoWidget.h:79
ProjectMetadata::m_title
QString m_title
The title of the project.
Definition:
Project.h:41
ProjectInfoWidget::~ProjectInfoWidget
~ProjectInfoWidget()
Destructor.
terralib5_src
src
terraview
ProjectInfoWidget.cpp
Generated on Wed Jun 6 2018 12:16:11 for TerraLib by
1.8.11