Commit 7083b7a9 authored by Dorian Zedler's avatar Dorian Zedler

- some cleanup

- fullscreen is now working when starting with xinit
parent b281ab36
......@@ -7,11 +7,11 @@
#include <QDateTime>
#include <QTimer>
#include <QEventLoop>
#include <QSemaphore>
#include <QThread>
#include <QFuture>
#include <QtConcurrent/QtConcurrent>
#include <string.h>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>
class BaseConn : public QObject
{
......
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QCursor>
#include <QRect>
#include <QScreen>
......@@ -15,6 +16,11 @@ int main(int argc, char *argv[])
qmlRegisterType<BaseConn>("com.itsblue.speedclimbingstopwatch", 1, 0, "BaseStationConn");
QQmlApplicationEngine engine;
QSize size = app.screens()[0]->size();
engine.rootContext()->setContextProperty("XscreenHeight", size.height());
engine.rootContext()->setContextProperty("XscreenWidth", size.width());
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
......
import QtQuick 2.1
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.2
import QtGraphicalEffects 1.0
......@@ -9,11 +9,11 @@ import com.itsblue.speedclimbingstopwatch 1.0
Window {
id: window
visible: true
width: 1920 / 2
height: 1080 / 2
width: XscreenWidth
height: XscreenHeight
title: qsTr("ScStwMonitor")
//visibility: Window.FullScreen
visibility: Window.FullScreen
Page {
id: app
......
......@@ -4,15 +4,6 @@ CONFIG += c++11
TARGET = ScStwMonitor
CONFIG -= app_bundle
# for raspi set different target
contains(QMAKE_CXX, .*raspbian.*arm.*):{
message("this is raspi")
DEFINES += RASPI
LIBS += -lwiringPi
target.path = /home/pi/$${TARGET}/bin
INSTALLS += target
}
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
......@@ -39,7 +30,8 @@ QML_DESIGNER_IMPORT_PATH =
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
# target path for raspi
else: unix:!android: target.path = /home/pi/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
HEADERS += \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment