Enroute Flight Navigation
A navigation app for VFR pilots
DemoRunner Class Reference

Remote controls the app and takes screenshot images. More...

#include <DemoRunner.h>

Public Slots

void runSmokeTest ()
 Open every page and dialog once, then quit.

Signals

void requestClosePages ()
 Emitted to indicate that the GUI return to the main page.
void requestOpenDrawer (bool open)
 Emitted to request that the drawer with the main menu opens or closes.
void requestOpenDialog (QString url, QVariantMap properties)
 Emitted to request that a dialog is opened via Global.dialogLoader.
void requestOpenPage (QString url)
 Emitted to request that a page is pushed onto the main stack view.
void requestCloseWaypointDescription ()
 Emitted to indicate that the GUI close open the "Waypoint Description" dialog.
void requestFollowGPS (bool val)
 Emitted to set followGPS mode in the moving map.
void requestMapBearing (double bearing)
 Emitted to set bearing of the moving map.
void requestMapBearingPolicy (int bearing)
 Emitted to indicate that the GUI should set a map bearing.
void requestOpenAircraftPage ()
 Emitted to indicate that the GUI should open the "Aircraft" page.
void requestOpenFlightRouteAddWPDialog ()
 Emitted to indicate that the GUI should open the "Add Waypoint" dialog.
void requestOpenNearbyPage ()
 Emitted to indicate that the GUI should open the "Nearby" page.
void requestOpenRoutePage ()
 Emitted to indicate that the GUI should open the "Route & Wind" page.
void requestOpenWaypointDescription (GeoMaps::Waypoint waypoint)
 Emitted to indicate that the GUI should open the "Waypoint Description" dialog.
void requestOpenWeatherDialog (Weather::Observer *obs)
 Emitted to indicate that the GUI should open the "Weather" page.
void requestOpenWeatherPage ()
 Emitted to indicate that the GUI should open the "Weather" page.
void requestShowSideView (bool show)
 Emitted to indicate that the GUI should show the aircraft side view.
void requestShowWindTab ()
 Emitted to indicate that the GUI should show the "Wind" tab of the "Route & Wind" page.
void requestVAC (QString vacName)
 Emitted to indicate that the GUI should set a VAC.
void requestZoomLevel (double newZoom)
 Emitted to set a zoom level in the moving map.

Public Member Functions

 DemoRunner (QObject *parent=nullptr)
 Creates a new DemoRunner.
void setEngine (QQmlApplicationEngine *engine)
 Set pointer to QQmlApplicationEngine.

Detailed Description

Remote controls the app and takes screenshot images.

This class remote controls the app. It sets up a traffic data receiver simulator, feeds it with data and controls the GUI, in order to generate a sequence of screenshots, which can then be used in the manual and as propaganda material.

Definition at line 38 of file DemoRunner.h.

Constructor & Destructor Documentation

◆ DemoRunner()

DemoRunner::DemoRunner ( QObject * parent = nullptr)
explicit

Creates a new DemoRunner.

This constructor creates a new DemoRunner instance.

Parameters
parentThe standard QObject parent

Member Function Documentation

◆ requestMapBearingPolicy

void DemoRunner::requestMapBearingPolicy ( int bearing)
signal

Emitted to indicate that the GUI should set a map bearing.

Parameters
bearingNew bearing policy

◆ requestOpenDialog

void DemoRunner::requestOpenDialog ( QString url,
QVariantMap properties )
signal

Emitted to request that a dialog is opened via Global.dialogLoader.

Parameters
urlURL of the dialog, relative to main.qml
propertiesInitial property values for the dialog

◆ requestOpenDrawer

void DemoRunner::requestOpenDrawer ( bool open)
signal

Emitted to request that the drawer with the main menu opens or closes.

Parameters
openTrue to open the drawer, false to close it

◆ requestOpenPage

void DemoRunner::requestOpenPage ( QString url)
signal

Emitted to request that a page is pushed onto the main stack view.

All other pages are popped first.

Parameters
urlURL of the page, relative to main.qml

◆ requestShowSideView

void DemoRunner::requestShowSideView ( bool show)
signal

Emitted to indicate that the GUI should show the aircraft side view.

Parameters
showIndicator if the side view should be shown or hidden

◆ requestVAC

void DemoRunner::requestVAC ( QString vacName)
signal

Emitted to indicate that the GUI should set a VAC.

Parameters
vacNameName of the VAC

◆ runSmokeTest

void DemoRunner::runSmokeTest ( )
slot

Open every page and dialog once, then quit.

This is the implementation of the command line option '–smoke-test'. It seeds a little data, walks through all pages and dialogs of the user interface, collects the warnings and errors that the QML engine reports along the way (including run-time errors in bindings and signal handlers) and quits the app: with exit code 1 if there were any problems, with exit code 0 otherwise. The flight log page and dialog are not visited while the flight log is under development.

◆ setEngine()

void DemoRunner::setEngine ( QQmlApplicationEngine * engine)

Set pointer to QQmlApplicationEngine.

To work, the instance needs to know the QQmlApplicationEngine that runs the GUI.q

Parameters
enginePointer to QQmlApplicationEngine

The documentation for this class was generated from the following file: