LP-03 slash name, win32 issue
[librepilot.git] / ground / openpilotgcs / src / app / gcssplashscreen.cpp
blob326d7d53593647191f13c2b23e65b7d672a46012
1 /**
2 ******************************************************************************
4 * @file gcssplashscreen.cpp
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
6 * @addtogroup [Group]
7 * @{
8 * @addtogroup GCSSplashScreen
9 * @{
10 * @brief [Brief]
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "gcssplashscreen.h"
29 #include "version_info/version_info.h"
30 #include <QDebug>
32 const QChar CopyrightSymbol(0x00a9);
34 GCSSplashScreen::GCSSplashScreen() :
35 QSplashScreen(), m_pixmap(0), m_painter(0)
37 setWindowFlags(windowFlags());
38 m_pixmap = new QPixmap(":/app/splash.png");
40 m_painter = new QPainter(m_pixmap);
41 m_painter->setPen(Qt::lightGray);
42 QFont font("Tahoma", 8);
43 m_painter->setFont(font);
44 m_painter->drawText(405, 170, QString(CopyrightSymbol) +
45 QString(" 2010-") + VersionInfo::year() +
46 QString(tr(" The LibrePilot Project - All Rights Reserved")));
48 m_painter->drawText(406, 173, 310, 100, Qt::TextWordWrap | Qt::AlignTop | Qt::AlignLeft,
49 QString(tr("GCS Revision - ")) + VersionInfo::revision());
50 setPixmap(*m_pixmap);
53 GCSSplashScreen::~GCSSplashScreen()
56 void GCSSplashScreen::drawMessageText(const QString &message)
58 QPixmap pix(*m_pixmap);
59 QPainter progressPainter(&pix);
61 progressPainter.setPen(Qt::lightGray);
62 QFont font("Tahoma", 13);
63 progressPainter.setFont(font);
64 progressPainter.drawText(170, 385, message);
65 setPixmap(pix);
68 void GCSSplashScreen::showPluginLoadingProgress(ExtensionSystem::PluginSpec *pluginSpec)
70 QString message(tr("Loading ") + pluginSpec->name() + " plugin...");
72 drawMessageText(message);