1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-06 21:54:15 +01:00

OP-1453 - First pass at this: get version text on bottom of welcome

screen
This commit is contained in:
dwillis 2014-08-22 23:49:27 +01:00
parent 2015968911
commit 7a4964eb74
2 changed files with 19 additions and 0 deletions

View File

@ -22,6 +22,19 @@ Rectangle {
width: scale*sourceSize.width width: scale*sourceSize.width
height: scale*sourceSize.height height: scale*sourceSize.height
smooth: true smooth: true
Text {
id: textOpVersion
x: 258
y: 668
color: "#c4c0c0"
text: welcomePlugin.versionString
font.bold: true
styleColor: "#00000000"
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 14
}
} }

View File

@ -29,6 +29,7 @@
#ifndef WELCOMEMODE_H #ifndef WELCOMEMODE_H
#define WELCOMEMODE_H #define WELCOMEMODE_H
#include "version_info/version_info.h"
#include "welcome_global.h" #include "welcome_global.h"
#include <coreplugin/imode.h> #include <coreplugin/imode.h>
@ -44,6 +45,7 @@ struct WelcomeModePrivate;
class WELCOME_EXPORT WelcomeMode : public Core::IMode { class WELCOME_EXPORT WelcomeMode : public Core::IMode {
Q_OBJECT Q_OBJECT
Q_PROPERTY(QString versionString READ versionString)
public: public:
WelcomeMode(); WelcomeMode();
@ -65,6 +67,10 @@ public:
{ {
m_priority = priority; m_priority = priority;
} }
QString versionString() const
{
return tr("OpenPilot GCS Version: %1").arg(VersionInfo::revision().left(60));
}
public slots: public slots:
void openUrl(const QString &url); void openUrl(const QString &url);