Dashboards
Dashboards are screens of your own design for data and controls: speed and power in large digits for the bike, a heart rate display, an inclinometer, or buttons to control the recording. They are written in QML, the language the app’s own screens are made in, so you can build almost anything.
There are two types:
- Overlay dashboards are transparent and lie on top of the map. They stay loaded after a restart of the app.
- Fullscreen dashboards cover the whole screen, including the map. Close returns to the map.
Open a dashboard
- Tap the DASH button (Dashboards). Add it to a sidebar first if you don’t have it, see Sidebar buttons.
- Choose a dashboard from the list.
Only one overlay dashboard is shown at a time. The trash button in the list removes the current overlay dashboard from the map. Opening a fullscreen dashboard also removes it.
The ⋮ menu has Show built-in dashboards (hide the dashboards that come with the app) and Info (this page). Press and hold one of your own dashboards to delete its file.
Built-in dashboards
| Dashboard | Type |
|---|---|
| Bicycle dashboard | fullscreen |
| Inclinometer | fullscreen (tilt of the device) |
| Pedal balance | fullscreen (left/right balance of a power meter) |
| Example: All sensor and map data table | fullscreen |
| Example: Track recording controls | fullscreen |
| Example: Map controls | overlay |
| Example: Speed and Power overlay | overlay |
Sensor values come from the sensor manager: connect your Bluetooth sensors (or set Bluetooth connect to On app start) to see them.
Install dashboards
Your own dashboards are .qml files in the app’s Dashboards folder. To add one:
- open a
.qmlfile or a ZIP file of them with Cartograph Maps (share it to the app, “Open with”, or drag it onto the window), or - tap a
cartograph://orcartograph-s://link to a.qmlor.dashboard.zipfile on a website.
The built-in dashboards as files to start from: ZIP file, or install them directly in the app.
Write your own dashboard
A dashboard is a QML file whose first two lines are:
//Name=the name shown in the list,//Type=eitheroverlayorfullscreen.
The rest is ordinary Qt Quick code. import com.mobwheel
gives access to the app through AppInstance.cartographApplicationManager. This overlay shows
speed and power:
//Name=Example: Speed and Power overlay
//Type=overlay
/**
* This example shows how to overlay sensor data on top
* of the map using an "overlay" dashboard.
**/
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import com.mobwheel // this is necessary for accessing data from Cartograph Maps
Item {
ColumnLayout {
id: col
anchors.top: parent.top
anchors.topMargin: 100
anchors.horizontalCenter: parent.horizontalCenter
property var unitsHandler: AppInstance.cartographApplicationManager.unitsHandler
property var sensorManager: AppInstance.cartographApplicationManager.sensorManager
// Speed
Label {
font.bold: true
font.pointSize: 20
Layout.fillWidth: true
horizontalAlignment: Label.AlignHCenter
text: col.unitsHandler.getStringForSpeed(col.sensorManager.speed)
background: Rectangle {
color: "black"
opacity: 0.5
radius: 4
}
}
// Power
Label {
font.bold: true
font.pointSize: 20
Layout.fillWidth: true
horizontalAlignment: Label.AlignHCenter
text: col.sensorManager.power.toFixed() + " W"
background: Rectangle {
color: "black"
opacity: 0.5
radius: 4
}
}
}
}
What the built-in dashboards use:
| Object | Properties and functions |
|---|---|
sensorManager | speed (m/s), heartRate, cadence, power, powerPercentageLeftPedal, altitude, compassBearing, currentLocation, gpsHorizontalAccuracy, gpsVerticalAccuracy, gpsState |
unitsHandler | getStringForSpeed(), getStringForDistance(), getStringForAltitude() (values in the user’s units) |
mapManager | mapCenter, zoomLevel, bearing, tilt, visibleRegion; updateZoomLevel(), updateBearing(), updateTilt(), updateMapCenterLatLng() |
trackManager | getPtrTrackRecorder() (its getTrack() and recordingState), startOrContinueTrackRecording(), pauseTrackRecording(), stopTrackRecording(), addWaypointToRecordingTrack(), addTrackSegmentToRecordingTrack() |
These are the app’s internal objects, not a stable interface: they can change between versions. The sources of the built-in dashboards (the ZIP file above) show them in use.
