All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AboutDialog.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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 "TerraLibConfig.h"
29 #include "TerraViewConfig.h"
30 #include "ui_AboutDialogForm.h"
31 
32 // TerraLib
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 = TVIEW_LARGE_LOGO_PIXMAP;
46  QPixmap pixmapTVLarge(logoTVLargeFileName.c_str());
47  m_ui->m_applicationLargeLogo->setPixmap(pixmapTVLarge);
48 
49  std::string logoTEFileName = TVIEW_TE_LOGO_PIXMAP;
50  QPixmap pixmapTE(logoTEFileName.c_str());
51 
52  pixmapTE = pixmapTE.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation);
53 
54  m_ui->m_terralibLogo->setPixmap(pixmapTE);
55 
56  std::string copyrightStr = tr("<p>Copyright &copy; 2010-2013 INPE<BR>").toStdString();
57  m_ui->m_copyrightLabel->setText(copyrightStr.c_str());
58 
59  std::string terraviewVersionStr = tr("TerraView Version: ").toStdString() + TERRALIB_STRING_VERSION;
60  m_ui->m_terraviewVersionLabel->setText(terraviewVersionStr.c_str());
61 
62  std::string terralibVersionStr = tr("TerraLib Version: ").toStdString() + TERRALIB_STRING_VERSION;
63  m_ui->m_terralibVersionLabel->setText(terralibVersionStr.c_str());
64 
65  std::string buildDateStr = tr("Build Date: ").toStdString() + te::common::Version::buildDate();
66  m_ui->m_buildDateLabel->setText(buildDateStr.c_str());
67 
68 }
69 
71 {
72 }
std::auto_ptr< Ui::AboutDialogForm > m_ui
Definition: AboutDialog.h:48
A singleton for managing application settings applied to the whole system (all users).
AboutDialog(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: AboutDialog.cpp:39
static std::string buildDate()
Definition: Version.cpp:53
A Qt dialog showing MGis about window.
Utility class for system versioning.