AboutDialog.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 TerraView - A Free and Open Source GIS Application.
4 
5  TerraView is free software: you can redistribute it and/or modify
6  it under the terms of the GNU 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  TerraView 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 General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with TerraLib Code Editor. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@dpi.inpe.br>.
18  */
19 
20 /*!
21  \file terraview/AboutDialog.cpp
22 
23  \brief A Qt dialog showing TerraView about window.
24 */
25 
26 // TerraView
27 #include "AboutDialog.h"
28 #include "Config.h"
29 #include "ui_AboutDialogForm.h"
30 
31 // TerraLib
34 #include <terralib/Version.h>
35 
36 // Qt
37 #include <QtGui/QPixmap>
38 
39 AboutDialog::AboutDialog(QWidget* parent, Qt::WindowFlags f)
40  : QDialog(parent, f),
41  m_ui(new Ui::AboutDialogForm)
42 {
43  m_ui->setupUi(this);
44 
45  std::string copyrightStr = tr("<p>Copyright &copy; 2010 INPE<BR>").toUtf8().data();
46  m_ui->m_copyrightLabel->setText(copyrightStr.c_str());
47 
48  std::string terraviewVersionStr = std::string(tr("TerraView Version: ").toUtf8().data()) + TERRALIB_VERSION_STRING;
49  m_ui->m_terraviewVersionLabel->setText(terraviewVersionStr.c_str());
50 
51  std::string terralibVersionStr = std::string(tr("TerraLib Version: ").toUtf8().data()) + TERRALIB_VERSION_STRING;
52  m_ui->m_terralibVersionLabel->setText(terralibVersionStr.c_str());
53 
54  std::string buildDateStr = std::string(tr("Build Date: ").toUtf8().data()) + te::common::Version::buildDate();
55  m_ui->m_buildDateLabel->setText(buildDateStr.c_str());
56 }
57 
58 AboutDialog::~AboutDialog() = default;
59 
61 {
62  QPixmap pixmapTVLarge(path.c_str());
63 
64  m_ui->m_applicationLargeLogo->setPixmap(pixmapTVLarge);
65 }
66 
68 {
69  QPixmap pixmapTE(path.c_str());
70 
71  pixmapTE = pixmapTE.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation);
72 
73  m_ui->m_terralibLogo->setPixmap(pixmapTE);
74 }
static std::string buildDate()
Definition: Version.cpp:54
Utility class for system versioning.
AboutDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: AboutDialog.cpp:39
void setTerraViewLogoFilePath(std::string path)
Definition: AboutDialog.cpp:60
This is a proxy file for the real terralib_version.h file.
A Qt dialog showing MGis about window.
std::unique_ptr< Ui::AboutDialogForm > m_ui
Definition: AboutDialog.h:54
void setTerraLibLogoFilePath(std::string path)
Definition: AboutDialog.cpp:67
Proxy configuration file for TerraView (see terraview_config.h).
The base API for controllers of TerraLib applications.