Skip to content

Commit

Permalink
Address GPS map issue (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-spataru committed Apr 1, 2024
1 parent b2d06dc commit d4f7fbc
Show file tree
Hide file tree
Showing 310 changed files with 5,726 additions and 40,266 deletions.
57 changes: 18 additions & 39 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ env:
QML_DIR_WIN: "assets\\qml"
PUBLISHER: "Alex Spataru"
REPO_DIR: "/home/runner/work/Serial-Studio"
QT_VERSION: 6.5.3
QT_MODULES: qtserialport qtconnectivity qt5compat
QT_VERSION: 6.6.2
QT_MODULES: qtserialport qtconnectivity qt5compat qtpositioning qtlocation
QMAKE: qmake6
CORES: 16

Expand All @@ -45,24 +45,17 @@ jobs:
steps:

- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: '⚙️ Cache Qt'
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{runner.os}}-qtcachedir-${{env.QT_VERSION}}

- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
aqtversion: '==2.0.0'
cached: ${{steps.cache-qt.outputs.cache-hit}}
cache: true
install-deps: 'true'

- name: '⚙️ Install dependencies'
run: |
Expand Down Expand Up @@ -101,29 +94,22 @@ jobs:
# macOS build
#
build-mac:
runs-on: macos-12
name: '🍎 macOS Monterey'
runs-on: macos-latest
name: '🍎 macOS'
steps:

- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

- name: '⚙️ Cache Qt'
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{runner.os}}-qtcachedir-${{env.QT_VERSION}}

- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
aqtversion: '==2.0.0'
cached: ${{steps.cache-qt.outputs.cache-hit}}
cache: true
install-deps: 'true'

- name: '🚧 Compile application'
run: |
Expand All @@ -146,12 +132,12 @@ jobs:
# Windows build
#
build-windows:
runs-on: windows-2022
name: '🧊 Windows Server 2022'
runs-on: windows-latest
name: '🧊 Windows'
steps:

- name: '🧰 Checkout'
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -161,20 +147,13 @@ jobs:
arch: x64
spectre: true

- name: '⚙️ Cache Qt'
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{runner.os}}-qtcachedir-${{env.QT_VERSION}}

- name: '⚙️ Install Qt'
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
modules: ${{env.QT_MODULES}}
aqtversion: '==2.0.0'
cached: ${{steps.cache-qt.outputs.cache-hit}}
cache: true
install-deps: 'true'

- name: '🚧 Compile application'
run: |
Expand Down
3 changes: 3 additions & 0 deletions Serial-Studio.pro
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ QT += svg
QT += core
QT += quick
QT += widgets
QT += location
QT += bluetooth
QT += serialport
QT += positioning
QT += printsupport

QT += quickcontrols2

equals(QT_MAJOR_VERSION, 6) {
Expand Down
1 change: 1 addition & 0 deletions assets/Resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,6 @@
<file>window-border/unmaximize.svg</file>
<file>icons/paste.svg</file>
<file>scripts/frame-parser.js</file>
<file>qml/Widgets/GpsMap.qml</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion assets/qml/Dashboard/DashboardTitle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
* THE SOFTWARE.
*/

import QtCore
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.settings

import "../Widgets" as Widgets

Expand Down
2 changes: 1 addition & 1 deletion assets/qml/Dashboard/ViewOptions.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
* THE SOFTWARE.
*/

import QtCore
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.settings

import "../Widgets" as Widgets

Expand Down
27 changes: 27 additions & 0 deletions assets/qml/Dashboard/WidgetDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ Item {
rightMargin: window.borderWidth
bottomMargin: window.borderWidth
}

//
// Hack: render a GPS map using QML code instead of QtWidgets
//
Loader {
anchors.fill: parent
asynchronous: true
active: widget.isGpsMap
visible: widget.isGpsMap && status == Loader.Ready
sourceComponent: Widgets.GpsMap {
altitude: widget.gpsAltitude
latitude: widget.gpsLatitude
longitude: widget.gpsLongitude
}
}
}
}

Expand Down Expand Up @@ -114,6 +129,18 @@ Item {
widgetIndex: root.widgetIndex
widgetVisible: _window.visible
anchors.margins: _window.radius

Loader {
anchors.fill: parent
asynchronous: true
active: externalWidget.isGpsMap
visible: externalWidget.isGpsMap && status == Loader.Ready
sourceComponent: Widgets.GpsMap {
altitude: externalWidget.gpsAltitude
latitude: externalWidget.gpsLatitude
longitude: externalWidget.gpsLongitude
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/qml/Panes/Setup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
* THE SOFTWARE.
*/

import QtCore
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.settings

import "../Widgets" as Widgets
import "SetupPanes" as SetupPanes
Expand Down
2 changes: 1 addition & 1 deletion assets/qml/Panes/SetupPanes/Hardware.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import Qt.labs.settings as QtSettings
import QtCore as QtSettings

import "Devices" as Devices
import "../../Windows" as Windows
Expand Down

0 comments on commit d4f7fbc

Please sign in to comment.