All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 logoTVLargeFileName = te::qt::af::ApplicationController::getInstance().getAboutLogo().toStdString();
46 
47  QPixmap pixmapTVLarge(logoTVLargeFileName.c_str());
48  m_ui->m_applicationLargeLogo->setPixmap(pixmapTVLarge);
49 
50  std::string logoTEFileName = te::qt::af::ApplicationController::getInstance().getTlibLogo().toStdString();
51  QPixmap pixmapTE(logoTEFileName.c_str());
52 
53  pixmapTE = pixmapTE.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation);
54 
55  m_ui->m_terralibLogo->setPixmap(pixmapTE);
56 
57  std::string copyrightStr = tr("<p>Copyright &copy; 2010-2015 INPE<BR>").toStdString();
58  m_ui->m_copyrightLabel->setText(copyrightStr.c_str());
59 
60  std::string terraviewVersionStr = tr("TerraView Version: ").toStdString() + TERRALIB_VERSION_STRING;
61  m_ui->m_terraviewVersionLabel->setText(terraviewVersionStr.c_str());
62 
63  std::string terralibVersionStr = tr("TerraLib Version: ").toStdString() + TERRALIB_VERSION_STRING;
64  m_ui->m_terralibVersionLabel->setText(terralibVersionStr.c_str());
65 
66  std::string buildDateStr = tr("Build Date: ").toStdString() + te::common::Version::buildDate();
67  m_ui->m_buildDateLabel->setText(buildDateStr.c_str());
68 
69 }
70 
72 {
73 }
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
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
This is a proxy file for the real terralib_version.h file.
std::auto_ptr< Ui::AboutDialogForm > m_ui
Definition: AboutDialog.h:48
A Qt dialog showing MGis about window.
Proxy configuration file for TerraView (see terraview_config.h).
The base API for controllers of TerraLib applications.