mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:36:47 +02:00
Implemented backend for About dialog
This commit is contained in:
parent
58f04121b7
commit
fee3cc0aca
5 changed files with 19 additions and 24 deletions
|
@ -73,6 +73,8 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
add_definitions(-DDEV_BUILD)
|
add_definitions(-DDEV_BUILD)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
string(TIMESTAMP BUILD_TIME "%d/%m/%Y")
|
||||||
|
|
||||||
if (DEPLOY_PACKAGE)
|
if (DEPLOY_PACKAGE)
|
||||||
# for deployed packages always grab the serverless content
|
# for deployed packages always grab the serverless content
|
||||||
set(DOWNLOAD_SERVERLESS_CONTENT ON)
|
set(DOWNLOAD_SERVERLESS_CONTENT ON)
|
||||||
|
|
|
@ -26,4 +26,6 @@ namespace BuildInfo {
|
||||||
const QString VERSION = "@BUILD_VERSION@";
|
const QString VERSION = "@BUILD_VERSION@";
|
||||||
const QString BUILD_BRANCH = "@BUILD_BRANCH@";
|
const QString BUILD_BRANCH = "@BUILD_BRANCH@";
|
||||||
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
const QString BUILD_GLOBAL_SERVICES = "@BUILD_GLOBAL_SERVICES@";
|
||||||
|
const QString BUILD_TIME = "@BUILD_TIME@";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
|
||||||
import "../../styles-uit"
|
import "../../styles-uit"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -34,29 +33,15 @@ Rectangle {
|
||||||
id: buildColumm
|
id: buildColumm
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 70
|
anchors.leftMargin: 70
|
||||||
Row {
|
RalewayRegular {
|
||||||
RalewayRegular {
|
text: "Build " + HiFiAbout.buildVersion
|
||||||
text: "Build"
|
size: 16
|
||||||
size: 16
|
color: "white"
|
||||||
color: "white"
|
|
||||||
}
|
|
||||||
RalewayRegular {
|
|
||||||
id: build
|
|
||||||
size: 16
|
|
||||||
color: "white"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Row {
|
RalewayRegular {
|
||||||
RalewayRegular {
|
text: "Released " + HiFiAbout.buildDate
|
||||||
text: "Released"
|
size: 16
|
||||||
size: 16
|
color: "white"
|
||||||
color: "white"
|
|
||||||
}
|
|
||||||
RalewayRegular {
|
|
||||||
id: released
|
|
||||||
size: 16
|
|
||||||
color: "white"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item { height: 10; width: 1 }
|
Item { height: 10; width: 1 }
|
||||||
|
@ -82,7 +67,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
color: "white"
|
color: "white"
|
||||||
text: "Built using Qt 5.10.1"
|
text: "Built using Qt " + HiFiAbout.qtVersion
|
||||||
size: 12
|
size: 12
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,6 +220,8 @@
|
||||||
#include "webbrowser/WebBrowserSuggestionsEngine.h"
|
#include "webbrowser/WebBrowserSuggestionsEngine.h"
|
||||||
#include <DesktopPreviewProvider.h>
|
#include <DesktopPreviewProvider.h>
|
||||||
|
|
||||||
|
#include "AboutUtil.h"
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
#include <VersionHelpers.h>
|
#include <VersionHelpers.h>
|
||||||
|
|
||||||
|
@ -2968,6 +2970,7 @@ void Application::onDesktopRootContextCreated(QQmlContext* surfaceContext) {
|
||||||
surfaceContext->setContextProperty("Selection", DependencyManager::get<SelectionScriptingInterface>().data());
|
surfaceContext->setContextProperty("Selection", DependencyManager::get<SelectionScriptingInterface>().data());
|
||||||
surfaceContext->setContextProperty("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
|
surfaceContext->setContextProperty("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
|
||||||
surfaceContext->setContextProperty("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
|
surfaceContext->setContextProperty("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
|
||||||
|
surfaceContext->setContextProperty("HiFiAbout", AboutUtil::getInstance());
|
||||||
|
|
||||||
if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
|
if (auto steamClient = PluginManager::getInstance()->getSteamClientPlugin()) {
|
||||||
surfaceContext->setContextProperty("Steam", new SteamScriptingInterface(engine, steamClient.get()));
|
surfaceContext->setContextProperty("Steam", new SteamScriptingInterface(engine, steamClient.get()));
|
||||||
|
@ -6577,6 +6580,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
|
||||||
scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
|
scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get<ContextOverlayInterface>().data());
|
||||||
scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
|
scriptEngine->registerGlobalObject("Wallet", DependencyManager::get<WalletScriptingInterface>().data());
|
||||||
scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get<AddressManager>().data());
|
scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get<AddressManager>().data());
|
||||||
|
scriptEngine->registerGlobalObject("HifiAbout", AboutUtil::getInstance());
|
||||||
|
|
||||||
scriptEngine->registerGlobalObject("App", this);
|
scriptEngine->registerGlobalObject("App", this);
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#include "SoundCache.h"
|
#include "SoundCache.h"
|
||||||
#include "raypick/PointerScriptingInterface.h"
|
#include "raypick/PointerScriptingInterface.h"
|
||||||
#include <display-plugins/CompositorHelper.h>
|
#include <display-plugins/CompositorHelper.h>
|
||||||
|
#include "AboutUtil.h"
|
||||||
|
|
||||||
static int MAX_WINDOW_SIZE = 4096;
|
static int MAX_WINDOW_SIZE = 4096;
|
||||||
static const float METERS_TO_INCHES = 39.3701f;
|
static const float METERS_TO_INCHES = 39.3701f;
|
||||||
|
@ -259,6 +260,7 @@ void Web3DOverlay::setupQmlSurface() {
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data());
|
_webSurface->getSurfaceContext()->setContextProperty("Window", DependencyManager::get<WindowScriptingInterface>().data());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("Reticle", qApp->getApplicationCompositor().getReticleInterface());
|
_webSurface->getSurfaceContext()->setContextProperty("Reticle", qApp->getApplicationCompositor().getReticleInterface());
|
||||||
_webSurface->getSurfaceContext()->setContextProperty("desktop", DependencyManager::get<OffscreenUi>()->getDesktop());
|
_webSurface->getSurfaceContext()->setContextProperty("desktop", DependencyManager::get<OffscreenUi>()->getDesktop());
|
||||||
|
_webSurface->getSurfaceContext()->setContextProperty("HiFiAbout", AboutUtil::getInstance());
|
||||||
|
|
||||||
// Override min fps for tablet UI, for silky smooth scrolling
|
// Override min fps for tablet UI, for silky smooth scrolling
|
||||||
setMaxFPS(90);
|
setMaxFPS(90);
|
||||||
|
|
Loading…
Reference in a new issue