Inial commit v1.0.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-06-10T16:57:45
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = AdvancedSettings
|
||||
TEMPLATE = app
|
||||
|
||||
|
||||
SOURCES += src/main.cpp\
|
||||
src/overlaywidget.cpp \
|
||||
src/overlaycontroller.cpp
|
||||
|
||||
HEADERS += src/overlaywidget.h \
|
||||
src/overlaycontroller.h
|
||||
src/logging.h
|
||||
|
||||
FORMS += ui/overlaywidget.ui
|
||||
|
||||
INCLUDEPATH += third-party/openvr/include \
|
||||
third-party/easylogging++
|
||||
|
||||
LIBS += -Lthird-party/openvr/lib/win64 -lopenvr_api
|
||||
|
||||
DESTDIR = bin/win64
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"source" : "builtin",
|
||||
"applications": [{
|
||||
"app_key": "matzman666.AdvancedSettings",
|
||||
"launch_type": "binary",
|
||||
"binary_path_windows": "AdvancedSettings.exe",
|
||||
"is_dashboard_overlay": true,
|
||||
|
||||
"strings": {
|
||||
"en_us": {
|
||||
"name": "Advanced Settings",
|
||||
"description": "OpenVR Advanced Settings Overlay"
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
// easylogging includes
|
||||
#define ELPP_THREAD_SAFE
|
||||
#define ELPP_QT_LOGGING
|
||||
#define ELPP_NO_DEFAULT_LOG_FILE
|
||||
#include <easylogging++.h>
|
||||
@@ -0,0 +1,71 @@
|
||||
#include "overlaywidget.h"
|
||||
#include "overlaycontroller.h"
|
||||
#include <QApplication>
|
||||
#include <iostream>
|
||||
#include "logging.h"
|
||||
|
||||
const char* logConfigFileName = "logging.conf";
|
||||
|
||||
const char* logConfigDefault =
|
||||
"* GLOBAL:\n"
|
||||
" FORMAT = \"[%level] %datetime{%Y-%M-%d %H:%m:%s}: %msg\"\n"
|
||||
" FILENAME = \"AdvancedSettings.log\"\n"
|
||||
" ENABLED = true\n"
|
||||
" TO_FILE = true\n"
|
||||
" TO_STANDARD_OUTPUT = true\n"
|
||||
" MAX_LOG_FILE_SIZE = 2097152 ## 2MB\n"
|
||||
"* TRACE:\n"
|
||||
" FORMAT = \"[%level] %datetime{%Y-%M-%d %H:%m:%s} %func: %msg\"\n";
|
||||
|
||||
INITIALIZE_EASYLOGGINGPP
|
||||
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
// Configure logger
|
||||
START_EASYLOGGINGPP(argc, argv);
|
||||
el::Loggers::addFlag(el::LoggingFlag::DisableApplicationAbortOnFatalLog);
|
||||
if (QFile::exists(logConfigFileName)) {
|
||||
el::Configurations conf(logConfigFileName);
|
||||
el::Loggers::reconfigureAllLoggers(conf);
|
||||
} else {
|
||||
el::Configurations conf;
|
||||
conf.parseFromText(logConfigDefault);
|
||||
el::Loggers::reconfigureAllLoggers(conf);
|
||||
}
|
||||
|
||||
LOG(INFO) << "Starting Application.";
|
||||
try {
|
||||
QApplication a(argc, argv);
|
||||
advsettings::OverlayWidget *pOverlayWidget = new advsettings::OverlayWidget;
|
||||
advsettings::OverlayController* controller = new advsettings::OverlayController();
|
||||
|
||||
controller->Init();
|
||||
controller->SetWidget(pOverlayWidget, advsettings::OverlayController::applicationName, advsettings::OverlayController::applicationKey);
|
||||
|
||||
std::string manifestPath = QApplication::applicationDirPath().toStdString() + "\\advancedsettings.vrmanifest";
|
||||
if (QFile::exists(QString::fromStdString(manifestPath))) {
|
||||
bool firstTime = false;
|
||||
if (!vr::VRApplications()->IsApplicationInstalled(advsettings::OverlayController::applicationKey)) {
|
||||
firstTime;
|
||||
}
|
||||
auto apperror = vr::VRApplications()->AddApplicationManifest(manifestPath.c_str());
|
||||
if (apperror != vr::VRApplicationError_None) {
|
||||
LOG(ERROR) << "Could not add application manifest: " << vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror);
|
||||
} else if (firstTime) {
|
||||
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(advsettings::OverlayController::applicationKey, true);
|
||||
if (apperror != vr::VRApplicationError_None) {
|
||||
LOG(ERROR) << "Could not set auto start: " << vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG(ERROR) << "Could not find application manifest: " << manifestPath;
|
||||
}
|
||||
|
||||
return a.exec();
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
LOG(FATAL) << e.what();
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,587 @@
|
||||
#include "overlaycontroller.h"
|
||||
#include "overlaywidget.h"
|
||||
#include "ui_overlaywidget.h"
|
||||
#include <QOpenGLFramebufferObjectFormat>
|
||||
#include <QOpenGLPaintDevice>
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QMouseEvent>
|
||||
#include <QtWidgets/QGraphicsSceneMouseEvent>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QGraphicsEllipseItem>
|
||||
#include <QOpenGLExtraFunctions>
|
||||
#include <QCursor>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <openvr.h>
|
||||
#include "logging.h"
|
||||
|
||||
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
OverlayController::~OverlayController() {
|
||||
m_pPumpEventsTimer.reset();
|
||||
vr::VR_Shutdown();
|
||||
m_pScene.reset();
|
||||
m_pFbo.reset();
|
||||
m_pOffscreenSurface.reset();
|
||||
m_pOpenGLContext.reset();
|
||||
}
|
||||
|
||||
void OverlayController::Init() {
|
||||
// Loading the OpenVR Runtime
|
||||
auto initError = vr::VRInitError_None;
|
||||
vr::VR_Init(&initError, vr::VRApplication_Overlay);
|
||||
if (initError != vr::VRInitError_None) {
|
||||
throw std::runtime_error(std::string("Failed to initialize OpenVR: " + std::string(vr::VR_GetVRInitErrorAsEnglishDescription(initError))));
|
||||
}
|
||||
|
||||
QSurfaceFormat format;
|
||||
format.setMajorVersion( 4 );
|
||||
format.setMinorVersion( 1 );
|
||||
format.setProfile( QSurfaceFormat::CompatibilityProfile );
|
||||
|
||||
m_pOpenGLContext.reset(new QOpenGLContext());
|
||||
m_pOpenGLContext->setFormat( format );
|
||||
if (!m_pOpenGLContext->create()) {
|
||||
throw std::runtime_error("Could not create OpenGL context");
|
||||
}
|
||||
|
||||
// create an offscreen surface to attach the context and FBO to
|
||||
m_pOffscreenSurface.reset(new QOffscreenSurface());
|
||||
m_pOffscreenSurface->create();
|
||||
m_pOpenGLContext->makeCurrent( m_pOffscreenSurface.get() );
|
||||
|
||||
m_pScene.reset(new QGraphicsScene());
|
||||
connect( m_pScene.get(), SIGNAL(changed(const QList<QRectF>&)), this, SLOT( OnSceneChanged(const QList<QRectF>&)) );
|
||||
}
|
||||
|
||||
|
||||
void OverlayController::SetWidget(OverlayWidget *pWidget, const std::string& name, const std::string& key) {
|
||||
// all of the mouse handling stuff requires that the widget be at 0,0
|
||||
pWidget->move(0, 0);
|
||||
m_pScene->addWidget(pWidget);
|
||||
m_pWidget = pWidget;
|
||||
|
||||
if (!vr::VROverlay()) {
|
||||
throw std::runtime_error(std::string("No Overlay interface"));
|
||||
}
|
||||
vr::VROverlayError overlayError = vr::VROverlay()->CreateDashboardOverlay(key.c_str(), name.c_str(), &m_ulOverlayHandle, &m_ulOverlayThumbnailHandle);
|
||||
if (overlayError != vr::VROverlayError_None) {
|
||||
throw std::runtime_error(std::string("Failed to create Overlay: " + std::string(vr::VROverlay()->GetOverlayErrorNameFromEnum(overlayError))));
|
||||
}
|
||||
vr::VROverlay()->SetOverlayWidthInMeters(m_ulOverlayHandle, 2.0f);
|
||||
vr::VROverlay()->SetOverlayInputMethod(m_ulOverlayHandle, vr::VROverlayInputMethod_Mouse);
|
||||
std::string thumbIconPath = QApplication::applicationDirPath().toStdString() + "\\res\\thumbicon.png";
|
||||
if (QFile::exists(QString::fromStdString(thumbIconPath))) {
|
||||
vr::VROverlay()->SetOverlayFromFile(m_ulOverlayThumbnailHandle, thumbIconPath.c_str());
|
||||
} else {
|
||||
LOG(ERROR) << "Could not find thumbnail icon \"" << thumbIconPath << "\"";
|
||||
}
|
||||
|
||||
m_pPumpEventsTimer.reset(new QTimer(this));
|
||||
connect(m_pPumpEventsTimer.get(), SIGNAL(timeout()), this, SLOT(OnTimeoutPumpEvents()));
|
||||
m_pPumpEventsTimer->setInterval(20);
|
||||
m_pPumpEventsTimer->start();
|
||||
|
||||
m_pFbo.reset(new QOpenGLFramebufferObject(pWidget->width(), pWidget->height(), GL_TEXTURE_2D));
|
||||
|
||||
vr::HmdVector2_t vecWindowSize = {
|
||||
(float)pWidget->width(),
|
||||
(float)pWidget->height()
|
||||
};
|
||||
vr::VROverlay()->SetOverlayMouseScale(m_ulOverlayHandle, &vecWindowSize);
|
||||
|
||||
chaperoneTabController.init(this, pWidget);
|
||||
moveCenterTabController.init(this, pWidget);
|
||||
fixFloorTabController.init(this, pWidget);
|
||||
settingsTabController.init(this, pWidget);
|
||||
}
|
||||
|
||||
|
||||
void OverlayController::OnSceneChanged( const QList<QRectF>& ) {
|
||||
// skip rendering if the overlay isn't visible
|
||||
if( !vr::VROverlay() || !vr::VROverlay()->IsOverlayVisible( m_ulOverlayHandle ) && !vr::VROverlay()->IsOverlayVisible( m_ulOverlayThumbnailHandle ) )
|
||||
return;
|
||||
|
||||
m_pOpenGLContext->makeCurrent( m_pOffscreenSurface.get() );
|
||||
m_pFbo->bind();
|
||||
|
||||
QOpenGLPaintDevice device( m_pFbo->size() );
|
||||
QPainter painter( &device );
|
||||
|
||||
m_pScene->render( &painter );
|
||||
|
||||
m_pFbo->release();
|
||||
|
||||
GLuint unTexture = m_pFbo->texture();
|
||||
if( unTexture != 0 ) {
|
||||
#if defined _WIN64 || defined _LP64
|
||||
// To avoid any compiler warning because of cast to a larger pointer type (warning C4312 on VC)
|
||||
vr::Texture_t texture = { (void*)((uint64_t)unTexture), vr::API_OpenGL, vr::ColorSpace_Auto };
|
||||
#else
|
||||
vr::Texture_t texture = { (void*)unTexture, vr::API_OpenGL, vr::ColorSpace_Auto };
|
||||
#endif
|
||||
vr::VROverlay()->SetOverlayTexture( m_ulOverlayHandle, &texture );
|
||||
}
|
||||
m_pOpenGLContext->functions()->glFlush(); // We need to flush otherwise the texture may be empty.
|
||||
}
|
||||
|
||||
|
||||
void OverlayController::OnTimeoutPumpEvents() {
|
||||
if( !vr::VRSystem() )
|
||||
return;
|
||||
|
||||
/*
|
||||
// tell OpenVR to make some events for us
|
||||
for( vr::TrackedDeviceIndex_t unDeviceId = 1; unDeviceId < vr::k_unControllerStateAxisCount; unDeviceId++ ) {
|
||||
if( vr::VROverlay()->HandleControllerOverlayInteractionAsMouse( m_ulOverlayHandle, unDeviceId ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
fixFloorTabController.eventLoopTick();
|
||||
|
||||
vr::VREvent_t vrEvent;
|
||||
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayHandle, &vrEvent, sizeof( vrEvent ) ) ) {
|
||||
switch( vrEvent.eventType ) {
|
||||
case vr::VREvent_MouseMove: {
|
||||
QPointF ptNewMouse( vrEvent.data.mouse.x, vrEvent.data.mouse.y );
|
||||
QPoint ptGlobal = ptNewMouse.toPoint();
|
||||
QGraphicsSceneMouseEvent mouseEvent( QEvent::GraphicsSceneMouseMove );
|
||||
mouseEvent.setWidget( NULL );
|
||||
mouseEvent.setPos( ptNewMouse );
|
||||
mouseEvent.setScenePos( ptGlobal );
|
||||
mouseEvent.setScreenPos( ptGlobal );
|
||||
mouseEvent.setLastPos( m_ptLastMouse );
|
||||
mouseEvent.setLastScenePos( m_pWidget->mapToGlobal( m_ptLastMouse.toPoint() ) );
|
||||
mouseEvent.setLastScreenPos( m_pWidget->mapToGlobal( m_ptLastMouse.toPoint() ) );
|
||||
mouseEvent.setButtons( m_lastMouseButtons );
|
||||
mouseEvent.setButton( Qt::NoButton );
|
||||
mouseEvent.setModifiers( 0 );
|
||||
mouseEvent.setAccepted( false );
|
||||
|
||||
m_ptLastMouse = ptNewMouse;
|
||||
QApplication::sendEvent( m_pScene.get(), &mouseEvent );
|
||||
|
||||
OnSceneChanged( QList<QRectF>() );
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_MouseButtonDown: {
|
||||
Qt::MouseButton button = vrEvent.data.mouse.button == vr::VRMouseButton_Right ? Qt::RightButton : Qt::LeftButton;
|
||||
|
||||
m_lastMouseButtons |= button;
|
||||
|
||||
QPoint ptGlobal = m_ptLastMouse.toPoint();
|
||||
QGraphicsSceneMouseEvent mouseEvent( QEvent::GraphicsSceneMousePress );
|
||||
mouseEvent.setWidget( NULL );
|
||||
mouseEvent.setPos( m_ptLastMouse );
|
||||
mouseEvent.setButtonDownPos( button, m_ptLastMouse );
|
||||
mouseEvent.setButtonDownScenePos( button, ptGlobal);
|
||||
mouseEvent.setButtonDownScreenPos( button, ptGlobal );
|
||||
mouseEvent.setScenePos( ptGlobal );
|
||||
mouseEvent.setScreenPos( ptGlobal );
|
||||
mouseEvent.setLastPos( m_ptLastMouse );
|
||||
mouseEvent.setLastScenePos( ptGlobal );
|
||||
mouseEvent.setLastScreenPos( ptGlobal );
|
||||
mouseEvent.setButtons( m_lastMouseButtons );
|
||||
mouseEvent.setButton( button );
|
||||
mouseEvent.setModifiers( 0 );
|
||||
mouseEvent.setAccepted( false );
|
||||
|
||||
QApplication::sendEvent( m_pScene.get(), &mouseEvent );
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_MouseButtonUp: {
|
||||
Qt::MouseButton button = vrEvent.data.mouse.button == vr::VRMouseButton_Right ? Qt::RightButton : Qt::LeftButton;
|
||||
m_lastMouseButtons &= ~button;
|
||||
|
||||
QPoint ptGlobal = m_ptLastMouse.toPoint();
|
||||
QGraphicsSceneMouseEvent mouseEvent( QEvent::GraphicsSceneMouseRelease );
|
||||
mouseEvent.setWidget( NULL );
|
||||
mouseEvent.setPos( m_ptLastMouse );
|
||||
mouseEvent.setScenePos( ptGlobal );
|
||||
mouseEvent.setScreenPos( ptGlobal );
|
||||
mouseEvent.setLastPos( m_ptLastMouse );
|
||||
mouseEvent.setLastScenePos( ptGlobal );
|
||||
mouseEvent.setLastScreenPos( ptGlobal );
|
||||
mouseEvent.setButtons( m_lastMouseButtons );
|
||||
mouseEvent.setButton( button );
|
||||
mouseEvent.setModifiers( 0 );
|
||||
mouseEvent.setAccepted( false );
|
||||
|
||||
QApplication::sendEvent( m_pScene.get(), &mouseEvent );
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_OverlayShown: {
|
||||
m_pWidget->repaint();
|
||||
UpdateWidget();
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_Quit:
|
||||
LOG(INFO) << "Received quit request.";
|
||||
vr::VRSystem()->AcknowledgeQuit_Exiting(); // Let us buy some time just in case
|
||||
moveCenterTabController.MoveCenterResetClicked();
|
||||
QApplication::exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid ) {
|
||||
while( vr::VROverlay()->PollNextOverlayEvent( m_ulOverlayThumbnailHandle, &vrEvent, sizeof( vrEvent) ) ) {
|
||||
switch( vrEvent.eventType ) {
|
||||
case vr::VREvent_OverlayShown: {
|
||||
m_pWidget->repaint();
|
||||
UpdateWidget();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayController::UpdateWidget() {
|
||||
chaperoneTabController.UpdateTab();
|
||||
moveCenterTabController.UpdateTab();
|
||||
fixFloorTabController.UpdateTab();
|
||||
settingsTabController.UpdateTab();
|
||||
}
|
||||
|
||||
void OverlayController::AddOffsetToStandingPosition(unsigned axisId, float offset) {
|
||||
vr::VRChaperoneSetup()->RevertWorkingCopy();
|
||||
vr::HmdMatrix34_t curPos;
|
||||
vr::VRChaperoneSetup()->GetWorkingStandingZeroPoseToRawTrackingPose(&curPos);
|
||||
curPos.m[0][3] += curPos.m[0][axisId] * offset;
|
||||
curPos.m[1][3] += curPos.m[1][axisId] * offset;
|
||||
curPos.m[2][3] += curPos.m[2][axisId] * offset;
|
||||
vr::VRChaperoneSetup()->SetWorkingStandingZeroPoseToRawTrackingPose(&curPos);
|
||||
vr::VRChaperoneSetup()->CommitWorkingCopy(vr::EChaperoneConfigFile_Live);
|
||||
}
|
||||
|
||||
void ChaperoneTabController::init(OverlayController * parent, OverlayWidget * widget) {
|
||||
this->parent = parent;
|
||||
this->widget = widget;
|
||||
|
||||
connect(widget->ui->CenterMarkerToggle, SIGNAL(toggled(bool)), this, SLOT(CenterMarkerToggled(bool)));
|
||||
connect(widget->ui->PlaySpaceToggle, SIGNAL(toggled(bool)), this, SLOT(PlaySpaceToggled(bool)));
|
||||
connect(widget->ui->ForceBoundsToggle, SIGNAL(toggled(bool)), this, SLOT(ForceBoundsToggled(bool)));
|
||||
connect(widget->ui->FadeDistanceSlider, SIGNAL(valueChanged(int)), this, SLOT(FadeDistanceChanged(int)));
|
||||
connect(widget->ui->ColorAlphaSlider, SIGNAL(valueChanged(int)), this, SLOT(ColorAlphaChanged(int)));
|
||||
connect(widget->ui->ResetDefaultsToggle, SIGNAL(clicked()), this, SLOT(ResetDefaultsClicked()));
|
||||
}
|
||||
|
||||
void ChaperoneTabController::UpdateTab() {
|
||||
if (widget && vr::VRSettings()) {
|
||||
widget->ui->CenterMarkerToggle->blockSignals(true);
|
||||
widget->ui->PlaySpaceToggle->blockSignals(true);
|
||||
widget->ui->ForceBoundsToggle->blockSignals(true);
|
||||
widget->ui->FadeDistanceSlider->blockSignals(true);
|
||||
widget->ui->ColorAlphaSlider->blockSignals(true);
|
||||
|
||||
auto centerMarkerOn = vr::VRSettings()->GetBool(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_CenterMarkerOn_Bool, false);
|
||||
widget->ui->CenterMarkerToggle->setChecked(centerMarkerOn);
|
||||
auto playSpaceOn = vr::VRSettings()->GetBool(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_PlaySpaceOn_Bool, false);
|
||||
widget->ui->PlaySpaceToggle->setChecked(playSpaceOn);
|
||||
widget->ui->ForceBoundsToggle->setChecked(forceBoundsFlag);
|
||||
auto fadeDistance = vr::VRSettings()->GetFloat(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_FadeDistance_Float, 0.7f);
|
||||
widget->ui->FadeDistanceSlider->setValue(fadeDistance*100);
|
||||
widget->ui->FadeDistanceLabel->setText(QString::asprintf("%.2f", fadeDistance));
|
||||
auto colorAlpha = vr::VRSettings()->GetInt32(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_ColorGammaA_Int32, 255);
|
||||
widget->ui->ColorAlphaSlider->setValue(colorAlpha*100/255);
|
||||
widget->ui->ColorAlphaLabel->setText(QString::asprintf("%i%%", colorAlpha*100/255));
|
||||
|
||||
widget->ui->CenterMarkerToggle->blockSignals(false);
|
||||
widget->ui->PlaySpaceToggle->blockSignals(false);
|
||||
widget->ui->ForceBoundsToggle->blockSignals(false);
|
||||
widget->ui->FadeDistanceSlider->blockSignals(false);
|
||||
widget->ui->ColorAlphaSlider->blockSignals(false);
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::CenterMarkerToggled(bool value) {
|
||||
if (vr::VRSettings()) {
|
||||
vr::VRSettings()->SetBool(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_CenterMarkerOn_Bool, value);
|
||||
vr::VRSettings()->Sync();
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::PlaySpaceToggled(bool value) {
|
||||
if (vr::VRSettings()) {
|
||||
vr::VRSettings()->SetBool(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_PlaySpaceOn_Bool, value);
|
||||
vr::VRSettings()->Sync();
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::ForceBoundsToggled(bool value) {
|
||||
if (vr::VRChaperone()) {
|
||||
forceBoundsFlag = value;
|
||||
vr::VRChaperone()->ForceBoundsVisible(value);
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::FadeDistanceChanged(int value) {
|
||||
if (vr::VRSettings()) {
|
||||
float fval= (float)value / 100;
|
||||
vr::VRSettings()->SetFloat(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_FadeDistance_Float, fval);
|
||||
vr::VRSettings()->Sync();
|
||||
widget->ui->FadeDistanceLabel->setText(QString::asprintf("%.2f", fval));
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::ColorAlphaChanged(int value) {
|
||||
if (vr::VRSettings()) {
|
||||
float fval = (float)value / 100;
|
||||
vr::VRSettings()->SetInt32(vr::k_pch_CollisionBounds_Section, vr::k_pch_CollisionBounds_ColorGammaA_Int32, 255*fval);
|
||||
vr::VRSettings()->Sync();
|
||||
widget->ui->ColorAlphaLabel->setText(QString::asprintf("%i%%", value));
|
||||
}
|
||||
}
|
||||
|
||||
void ChaperoneTabController::ResetDefaultsClicked() {
|
||||
widget->ui->CenterMarkerToggle->setChecked(false);
|
||||
widget->ui->PlaySpaceToggle->setChecked(false);
|
||||
widget->ui->ForceBoundsToggle->setChecked(false);
|
||||
widget->ui->FadeDistanceSlider->setValue(70);
|
||||
widget->ui->ColorAlphaSlider->setValue(100);
|
||||
}
|
||||
|
||||
void MoveCenterTabController::init(OverlayController * parent, OverlayWidget * widget) {
|
||||
this->parent = parent;
|
||||
this->widget = widget;
|
||||
xOffset = 0.0f;
|
||||
yOffset = 0.0f;
|
||||
zOffset = 0.0f;
|
||||
connect(widget->ui->XMinusButton, SIGNAL(clicked()), this, SLOT(XMinusClicked()));
|
||||
connect(widget->ui->XPlusButton, SIGNAL(clicked()), this, SLOT(XPlusClicked()));
|
||||
connect(widget->ui->YMinusButton, SIGNAL(clicked()), this, SLOT(YMinusClicked()));
|
||||
connect(widget->ui->YPlusButton, SIGNAL(clicked()), this, SLOT(YPlusClicked()));
|
||||
connect(widget->ui->ZMinusButton, SIGNAL(clicked()), this, SLOT(ZMinusClicked()));
|
||||
connect(widget->ui->ZPlusButton, SIGNAL(clicked()), this, SLOT(ZPlusClicked()));
|
||||
connect(widget->ui->MoveCenterResetButton, SIGNAL(clicked()), this, SLOT(MoveCenterResetClicked()));
|
||||
}
|
||||
|
||||
void MoveCenterTabController::UpdateTab() {
|
||||
if (widget) {
|
||||
widget->ui->XOffsetLabel->setText(QString::asprintf("%.1f", xOffset));
|
||||
widget->ui->YOffsetLabel->setText(QString::asprintf("%.1f", yOffset));
|
||||
widget->ui->ZOffsetLabel->setText(QString::asprintf("%.1f", zOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::XMinusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(0, -0.5f);
|
||||
xOffset -= 0.5f;
|
||||
widget->ui->XOffsetLabel->setText(QString::asprintf("%.1f", xOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::XPlusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(0, 0.5f);
|
||||
xOffset += 0.5f;
|
||||
widget->ui->XOffsetLabel->setText(QString::asprintf("%.1f", xOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::YMinusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(1, -0.5f);
|
||||
yOffset -= 0.5f;
|
||||
widget->ui->YOffsetLabel->setText(QString::asprintf("%.1f", yOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::YPlusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(1, 0.5f);
|
||||
yOffset += 0.5f;
|
||||
widget->ui->YOffsetLabel->setText(QString::asprintf("%.1f", yOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::ZMinusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(2, -0.5f);
|
||||
zOffset -= 0.5f;
|
||||
widget->ui->ZOffsetLabel->setText(QString::asprintf("%.1f", zOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::ZPlusClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(2, 0.5f);
|
||||
zOffset += 0.5f;
|
||||
widget->ui->ZOffsetLabel->setText(QString::asprintf("%.1f", zOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void MoveCenterTabController::MoveCenterResetClicked() {
|
||||
if (widget) {
|
||||
parent->AddOffsetToStandingPosition(0, -xOffset);
|
||||
parent->AddOffsetToStandingPosition(1, -yOffset);
|
||||
parent->AddOffsetToStandingPosition(2, -zOffset);
|
||||
xOffset = 0.0f;
|
||||
yOffset = 0.0f;
|
||||
zOffset = 0.0f;
|
||||
widget->ui->XOffsetLabel->setText(QString::asprintf("%.1f", xOffset));
|
||||
widget->ui->YOffsetLabel->setText(QString::asprintf("%.1f", yOffset));
|
||||
widget->ui->ZOffsetLabel->setText(QString::asprintf("%.1f", zOffset));
|
||||
}
|
||||
}
|
||||
|
||||
void FixFloorTabController::init(OverlayController * parent, OverlayWidget * widget) {
|
||||
this->parent = parent;
|
||||
this->widget = widget;
|
||||
connect(widget->ui->FixFloorButton, SIGNAL(clicked()), this, SLOT(FixFloorClicked()));
|
||||
connect(widget->ui->UndoFixFloorButton, SIGNAL(clicked()), this, SLOT(UndoFixFloorClicked()));
|
||||
}
|
||||
|
||||
void FixFloorTabController::UpdateTab() {
|
||||
if (widget) {
|
||||
if (state == 1) {
|
||||
widget->ui->FixFloorButton->setEnabled(false);
|
||||
} else {
|
||||
widget->ui->FixFloorButton->setEnabled(true);
|
||||
}
|
||||
if (floorOffset != 0.0f) {
|
||||
widget->ui->UndoFixFloorButton->setEnabled(true);
|
||||
} else {
|
||||
widget->ui->UndoFixFloorButton->setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FixFloorTabController::eventLoopTick() {
|
||||
if (state == 1) {
|
||||
if (measurementCount == 0) {
|
||||
// Get Controller ids for left/right hand
|
||||
auto leftId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole(vr::TrackedControllerRole_LeftHand);
|
||||
if (leftId == vr::k_unTrackedDeviceIndexInvalid) {
|
||||
widget->ui->FixFloorStatusLabel->setText("No left controller found.");
|
||||
statusMessageTimeout = 100;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
return;
|
||||
}
|
||||
auto rightId = vr::VRSystem()->GetTrackedDeviceIndexForControllerRole(vr::TrackedControllerRole_RightHand);
|
||||
if (rightId == vr::k_unTrackedDeviceIndexInvalid) {
|
||||
widget->ui->FixFloorStatusLabel->setText("No right controller found.");
|
||||
statusMessageTimeout = 100;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
return;
|
||||
}
|
||||
// Get poses
|
||||
vr::TrackedDevicePose_t devicePoses[vr::k_unMaxTrackedDeviceCount];
|
||||
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(vr::TrackingUniverseStanding, 0.0f, devicePoses, vr::k_unMaxTrackedDeviceCount);
|
||||
vr::TrackedDevicePose_t* leftPose = devicePoses + leftId;
|
||||
vr::TrackedDevicePose_t* rightPose = devicePoses + rightId;
|
||||
if (!leftPose->bPoseIsValid || !leftPose->bDeviceIsConnected || leftPose->eTrackingResult != vr::TrackingResult_Running_OK) {
|
||||
widget->ui->FixFloorStatusLabel->setText("Left controller tracking problems.");
|
||||
statusMessageTimeout = 100;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
return;
|
||||
} else if (!rightPose->bPoseIsValid || !rightPose->bDeviceIsConnected || rightPose->eTrackingResult != vr::TrackingResult_Running_OK) {
|
||||
widget->ui->FixFloorStatusLabel->setText("Right controller tracking problems.");
|
||||
statusMessageTimeout = 100;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
return;
|
||||
} else {
|
||||
// The controller with the lowest y-pos is the floor fix reference
|
||||
if (leftPose->mDeviceToAbsoluteTracking.m[1][3] < rightPose->mDeviceToAbsoluteTracking.m[1][3]) {
|
||||
referenceController = leftId;
|
||||
} else {
|
||||
referenceController = rightId;
|
||||
}
|
||||
tempOffset = (double)devicePoses[referenceController].mDeviceToAbsoluteTracking.m[1][3];
|
||||
measurementCount = 1;
|
||||
}
|
||||
|
||||
} else if (measurementCount >= 50) {
|
||||
floorOffset = -controllerUpOffsetCorrection + (float)(tempOffset / (double)measurementCount);
|
||||
LOG(INFO) << "Fix Floor: Floor Offset = " << floorOffset;
|
||||
parent->AddOffsetToStandingPosition(1, floorOffset);
|
||||
widget->ui->FixFloorStatusLabel->setText("Fixing ... OK");
|
||||
statusMessageTimeout = 50;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
} else {
|
||||
vr::TrackedDevicePose_t devicePoses[vr::k_unMaxTrackedDeviceCount];
|
||||
vr::VRSystem()->GetDeviceToAbsoluteTrackingPose(vr::TrackingUniverseStanding, 0.0f, devicePoses, vr::k_unMaxTrackedDeviceCount);
|
||||
tempOffset += (double)devicePoses[referenceController].mDeviceToAbsoluteTracking.m[1][3];
|
||||
measurementCount++;
|
||||
}
|
||||
} else if (state == 2) {
|
||||
if (statusMessageTimeout == 0) {
|
||||
if (widget) {
|
||||
widget->ui->FixFloorStatusLabel->setText("");
|
||||
}
|
||||
state = 0;
|
||||
UpdateTab();
|
||||
} else {
|
||||
statusMessageTimeout--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FixFloorTabController::FixFloorClicked() {
|
||||
if (widget) {
|
||||
widget->ui->FixFloorStatusLabel->setText("Fixing ...");
|
||||
widget->ui->FixFloorButton->setEnabled(false);
|
||||
widget->ui->UndoFixFloorButton->setEnabled(false);
|
||||
measurementCount = 0;
|
||||
state = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void FixFloorTabController::UndoFixFloorClicked() {
|
||||
parent->AddOffsetToStandingPosition(1, -floorOffset);
|
||||
LOG(INFO) << "Fix Floor: Undo Floor Offset = " << -floorOffset;
|
||||
floorOffset = 0.0f;
|
||||
widget->ui->FixFloorStatusLabel->setText("Undo ... OK");
|
||||
statusMessageTimeout = 100;
|
||||
state = 2;
|
||||
UpdateTab();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SettingsTabController::init(OverlayController * parent, OverlayWidget * widget) {
|
||||
this->parent = parent;
|
||||
this->widget = widget;
|
||||
connect(widget->ui->AutoStartToggle, SIGNAL(toggled(bool)), this, SLOT(AutoStartToggled(bool)));
|
||||
}
|
||||
|
||||
void SettingsTabController::UpdateTab() {
|
||||
if (widget) {
|
||||
widget->ui->AutoStartToggle->blockSignals(true);
|
||||
if (vr::VRApplications()->GetApplicationAutoLaunch(OverlayController::applicationKey)) {
|
||||
widget->ui->AutoStartToggle->setChecked(true);
|
||||
} else {
|
||||
widget->ui->AutoStartToggle->setChecked(false);
|
||||
}
|
||||
widget->ui->AutoStartToggle->blockSignals(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsTabController::AutoStartToggled(bool value) {
|
||||
LOG(INFO) << "Setting auto start: " << value;
|
||||
auto apperror = vr::VRApplications()->SetApplicationAutoLaunch(OverlayController::applicationKey, value);
|
||||
if (apperror != vr::VRApplicationError_None) {
|
||||
LOG(ERROR) << "Could not set auto start: " << vr::VRApplications()->GetApplicationsErrorNameFromEnum(apperror);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace advconfig
|
||||
@@ -0,0 +1,169 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "openvr.h"
|
||||
#include <QtCore/QtCore>
|
||||
// because of incompatibilities with QtOpenGL and GLEW we need to cherry pick includes
|
||||
#include <QVector2D>
|
||||
#include <QMatrix4x4>
|
||||
#include <QVector>
|
||||
#include <QVector2D>
|
||||
#include <QVector3D>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QtWidgets/QGraphicsScene>
|
||||
#include <QOffscreenSurface>
|
||||
#include <QOpenGLFramebufferObject>
|
||||
#include <memory>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
// forward declaration
|
||||
class OverlayWidget;
|
||||
class OverlayController;
|
||||
|
||||
|
||||
class ChaperoneTabController : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
OverlayWidget* widget;
|
||||
|
||||
bool forceBoundsFlag = false;
|
||||
|
||||
public:
|
||||
void init(OverlayController* parent, OverlayWidget* widget);
|
||||
|
||||
public slots:
|
||||
void UpdateTab();
|
||||
|
||||
void CenterMarkerToggled(bool value);
|
||||
void PlaySpaceToggled(bool value);
|
||||
void ForceBoundsToggled(bool value);
|
||||
void FadeDistanceChanged(int value);
|
||||
void ColorAlphaChanged(int value);
|
||||
void ResetDefaultsClicked();
|
||||
};
|
||||
|
||||
|
||||
class MoveCenterTabController : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
OverlayWidget* widget;
|
||||
|
||||
float xOffset = 0.0f;
|
||||
float yOffset = 0.0f;
|
||||
float zOffset = 0.0f;
|
||||
|
||||
public:
|
||||
void init(OverlayController* parent, OverlayWidget* widget);
|
||||
|
||||
public slots:
|
||||
void UpdateTab();
|
||||
|
||||
void XMinusClicked();
|
||||
void XPlusClicked();
|
||||
void YMinusClicked();
|
||||
void YPlusClicked();
|
||||
void ZMinusClicked();
|
||||
void ZPlusClicked();
|
||||
void MoveCenterResetClicked();
|
||||
};
|
||||
|
||||
|
||||
class FixFloorTabController : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
OverlayWidget* widget;
|
||||
|
||||
float controllerUpOffsetCorrection = 0.06f; // Controller touchpad facing upwards
|
||||
float controllerDownOffsetCorrection = 0.0f; // Controller touchpad facing downwards (not implemented yet)
|
||||
|
||||
int state = 0; // 0 .. idle, 1 .. measurement in progress, 2 .. waiting for status message timeout
|
||||
vr::TrackedDeviceIndex_t referenceController = vr::k_unTrackedDeviceIndexInvalid;
|
||||
unsigned measurementCount = 0;
|
||||
double tempOffset = 0.0;
|
||||
unsigned statusMessageTimeout = 0;
|
||||
float floorOffset = 0.0f;
|
||||
|
||||
public:
|
||||
void init(OverlayController* parent, OverlayWidget* widget);
|
||||
|
||||
public slots:
|
||||
void UpdateTab();
|
||||
void eventLoopTick();
|
||||
|
||||
void FixFloorClicked();
|
||||
void UndoFixFloorClicked();
|
||||
};
|
||||
|
||||
|
||||
class SettingsTabController : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
OverlayWidget* widget;
|
||||
|
||||
public:
|
||||
void init(OverlayController* parent, OverlayWidget* widget);
|
||||
|
||||
public slots:
|
||||
void UpdateTab();
|
||||
|
||||
void AutoStartToggled(bool value);
|
||||
};
|
||||
|
||||
|
||||
class OverlayController : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static constexpr const char* applicationKey = "matzman666.AdvancedSettings";
|
||||
static constexpr const char* applicationName = "Advanced Settings";
|
||||
|
||||
private:
|
||||
OverlayWidget *m_pWidget;
|
||||
|
||||
vr::VROverlayHandle_t m_ulOverlayHandle = vr::k_ulOverlayHandleInvalid;
|
||||
vr::VROverlayHandle_t m_ulOverlayThumbnailHandle = vr::k_ulOverlayHandleInvalid;
|
||||
|
||||
std::unique_ptr<QOpenGLContext> m_pOpenGLContext;
|
||||
std::unique_ptr<QGraphicsScene> m_pScene;
|
||||
std::unique_ptr<QOpenGLFramebufferObject> m_pFbo;
|
||||
std::unique_ptr<QOffscreenSurface> m_pOffscreenSurface;
|
||||
|
||||
std::unique_ptr<QTimer> m_pPumpEventsTimer;
|
||||
|
||||
QPointF m_ptLastMouse;
|
||||
Qt::MouseButtons m_lastMouseButtons = 0;
|
||||
|
||||
ChaperoneTabController chaperoneTabController;
|
||||
MoveCenterTabController moveCenterTabController;
|
||||
FixFloorTabController fixFloorTabController;
|
||||
SettingsTabController settingsTabController;
|
||||
|
||||
public:
|
||||
OverlayController() : QObject() {}
|
||||
virtual ~OverlayController();
|
||||
|
||||
void Init();
|
||||
|
||||
void SetWidget(OverlayWidget *pWidget, const std::string& name, const std::string& key = "");
|
||||
|
||||
void AddOffsetToStandingPosition(unsigned axisId, float offset);
|
||||
|
||||
public slots:
|
||||
void OnSceneChanged( const QList<QRectF>& );
|
||||
void OnTimeoutPumpEvents();
|
||||
|
||||
void UpdateWidget();
|
||||
|
||||
};
|
||||
|
||||
} // namespace advsettings
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "overlaywidget.h"
|
||||
#include "ui_overlaywidget.h"
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
OverlayWidget::OverlayWidget(QWidget *parent) :
|
||||
QWidget(parent), ui(new Ui::OverlayWidget) {
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
} // namespace advsettings
|
||||
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <QWidget>
|
||||
#include <memory>
|
||||
|
||||
|
||||
// forward declaration
|
||||
namespace Ui { class OverlayWidget; }
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
class OverlayWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
std::unique_ptr<Ui::OverlayWidget> ui;
|
||||
|
||||
explicit OverlayWidget(QWidget *parent = 0);
|
||||
|
||||
private slots:
|
||||
};
|
||||
|
||||
} // namespace advsettings
|
||||
|
||||
|
||||
+6695
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.libopenvr_api.dylib</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
+3352
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,961 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OverlayWidget</class>
|
||||
<widget class="QWidget" name="OverlayWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>529</width>
|
||||
<height>330</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Hello World Overlay</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">/* Default widget settings*/
|
||||
QWidget {
|
||||
background: rgb(27, 41, 57);
|
||||
color: rgb(255, 255, 255);
|
||||
font: 14pt;
|
||||
}
|
||||
|
||||
/* Default settings for TabWidget tabs */
|
||||
#TabWidget QTabBar::tab {
|
||||
background: rgb(27, 41, 57);
|
||||
color: rgb(255, 255, 255);
|
||||
margin: 2px 1px 0px 1px;
|
||||
border-style: solid;
|
||||
border-color: rgb(200, 200, 200);
|
||||
border-width: 1px 1px 0px 1px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/* Settings for selected/hovered TabWidget tabs */
|
||||
#TabWidget QTabBar::tab:selected, QTabBar::tab:hover {
|
||||
background: rgb(68, 111, 140);
|
||||
}
|
||||
|
||||
/* Settings for non-selected TabWidget tabs */
|
||||
#TabWidget QTabBar::tab:!selected {
|
||||
/*margin-top: 4px; make non-selected tabs look smaller */
|
||||
}
|
||||
|
||||
/* Default settings for TabWidget frame */
|
||||
#TabWidget::pane {
|
||||
border: 2px solid rgb(200, 200, 200);
|
||||
}
|
||||
|
||||
/* Default button settings */
|
||||
QPushButton {
|
||||
border: 1px solid rgb(200, 200, 200);
|
||||
border-radius: 6px;
|
||||
padding: 2px;
|
||||
/* min-width: 80px*/;
|
||||
}
|
||||
|
||||
/* Disabled button settings */
|
||||
QPushButton:!enabled {
|
||||
border: 1px solid rgb(100, 100, 100);
|
||||
color: rgb(150, 150, 150);
|
||||
}
|
||||
|
||||
/* Settings for hovered buttons */
|
||||
QPushButton:hover {
|
||||
background: rgb(68, 111, 140);
|
||||
}
|
||||
/* Settings for hovered and checked buttons */
|
||||
QPushButton:hover:checked {
|
||||
background: rgb(66, 131, 176);
|
||||
}
|
||||
|
||||
/* Settings for pressed buttons */
|
||||
QPushButton:pressed {
|
||||
background: rgb(44, 142, 210);
|
||||
}
|
||||
|
||||
/* Settings for checked buttons */
|
||||
QPushButton:checked {
|
||||
background: rgb(44, 142, 210);
|
||||
}
|
||||
|
||||
/* Default horizontal slider settings */
|
||||
QSlider::groove:horizontal {
|
||||
border: 1px solid #999999;
|
||||
height: 8px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
|
||||
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #B1B1B1, stop:1 #c4c4c4);
|
||||
margin: 2px 0;
|
||||
}
|
||||
QSlider::handle:horizontal {
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f);
|
||||
border: 1px solid #5c5c5c;
|
||||
width: 8px;
|
||||
margin: -4px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#FadeDistanceFrame, #ColorAlphaFrame {
|
||||
border: 1px solid rgb(200, 200, 200);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#ChaperoneHelpLabel {
|
||||
font: 12pt;
|
||||
}
|
||||
|
||||
#FixFloorStatusLabel {
|
||||
color: rgb(150, 150, 150);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="TabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="ChaperoneTab">
|
||||
<attribute name="title">
|
||||
<string>Chaperone</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="CenterMarkerToggle">
|
||||
<property name="text">
|
||||
<string>Center Marker*</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="PlaySpaceToggle">
|
||||
<property name="text">
|
||||
<string>Play Space*</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ForceBoundsToggle">
|
||||
<property name="text">
|
||||
<string>Force Bounds</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ResetDefaultsToggle">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="FadeDistanceFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Fade Distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_2" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSlider" name="FadeDistanceSlider">
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="FadeDistanceLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.01</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="ColorAlphaFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Chaperone Bounds Visibility</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSlider" name="ColorAlphaSlider">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ColorAlphaLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>100%</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ChaperoneHelpLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>* Sometimes not working in the SteamVR room.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="MoveTab">
|
||||
<attribute name="title">
|
||||
<string>Move Center</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>X-Axis (Left/Right):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="XMinusButton">
|
||||
<property name="text">
|
||||
<string><</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="XOffsetLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="XPlusButton">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_4">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Y-Axis (Down/Up):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_6">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="YMinusButton">
|
||||
<property name="text">
|
||||
<string><</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="YOffsetLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="YPlusButton">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_7">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Z-Axis (Forth/Back):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_8">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ZMinusButton">
|
||||
<property name="text">
|
||||
<string><</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ZOffsetLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ZPlusButton">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="MoveCenterResetButton">
|
||||
<property name="text">
|
||||
<string>Reset</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="FloorTab">
|
||||
<attribute name="title">
|
||||
<string>Fix Floor</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Place one controller on the ground and ensure good visibility to the base stations.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="FixFloorStatusLabel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="FixFloorButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix Floor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="UndoFixFloorButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Undo Fix</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="SettingsTab">
|
||||
<attribute name="title">
|
||||
<string>Settings</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QPushButton" name="AutoStartToggle">
|
||||
<property name="text">
|
||||
<string>Auto Start</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user