Building and Running Neptune UI

Typically, Neptune UI works out-of-the-box after your have installed Qt Automotive Suite and launched Qt Creator. You can run your applications with Neptune UI on a Qt Automotive emulator or a target device.

You can also use Neptune UI as a stand-alone UI without any Qt application. The following topics describe how you can run Neptune UI in the emulator or without installing Qt.

Running Neptune UI in Emulator

When you include an emulator in your Qt Automotive Suite installation, the Qt online installer automatically creates a virtual machine setup for the installed emulator image.

Note: You need to install VirtualBox before installing the emulator. See Emulator Requirements for Linux/x11 and Emulator Requirements for Windows.

Run the following command in a terminal to launch the emulator:

cd <Qt installation path>/Tools/emulator2
emulator --vbox QtAutomotive-10

<Qt installation path>/Tools/emulator2 is the emulator installation path. The emulator is a tool that is shipped with Qt Automotive Suite, and QtAutomotive-10 is the name of the virtual machine setup.

After running the command, the emulator is launched:

Running Neptune UI without Installing Qt

If you are interested in exploring Neptune UI without installing Qt Automotive Suite, follow these instructions to run Neptune UI on your Linux desktop:

  1. Clone the Qt Application Manager and Neptune-UI Git repositories.
  2. Build Qt Application Manager against Qt 5.6 or later that is installed on your desktop. See Qt Applicaton Manager Installation for more detailed build instructions.
  3. Build Neptune UI and install it by running the following command in a terminal:
    qmake -r INSTALL_PREFIX=<choose a loation> neptune-ui.pro
    make && make install
  4. Run the following command in a terminal under the neptune-ui installation directory:
    appman -r -c am-config.yaml

    appman is an utility that is installed while building Qt Application Manager. AM_CONFIG_FILE points to the Application Manager's config.yaml file.

    Note: You can edit am-config.yaml by commenting out parts that are not relevant (for example, an SD card installation directory under the "installationLocations:" section).

    Note: Add -I <neptune-ui git clone>/dummyimport to the appman command, if you have not installed Qt IVI.

Development with Neptune UI

To avoid running the make install command, use a plugins.yaml file generated by qmake. The file contains all the settings you need for running the Neptune UI also without installing Qt. Run the following command in a terminal:

appman -r -c am-config.yaml -c <build-folder>/plugins.yaml

In Qt Creator, run the following command:

appman --recreate-database -c am-config.yaml -c %{buildDir}/plugins.yaml

Configuring Neptune UI

To improve the maintenance, the UI configuration is split into several .yaml files. The UI configuration files are listed and described in the following table:

FileDescription
config.yamlDefines generic parameters, such as an installation location for applications installed from the APP STORE or a database.
am-config.yamlDefines the head unit and cluster-specific configurations. For example, built-in applications and their runtime (native or QML), import paths, UI-specific configurations such as a full-screen mode and a main QML file (if runtime is QML).
info.yamlDefines an application-specific configuration. For example, a main QML file and its imports.

The following code defines an example of the am-config.yaml file:

formatVersion: 1
formatType: am-configuration

# basic AM functionality - the built-in apps are in 'apps'.

applications:
  builtinAppsManifestDir: "apps"

# QML apps will be able to import from modules...

runtimes:
  qml:
    importPaths: [ "imports/shared" ]

# ... as well as the SystemUI

ui:
  fullscreen: yes
  style: "${CONFIG_PWD}/styles/neptune"
  mainQml: "Main.qml"
  importPaths: [ "imports/shared", "imports/system" ]
  windowIcon: "imports/shared/assets/icons/active/apps@96.png"

systemProperties:
  public:
    showCluster: yes
  private:
    appStoreServerUrl: 'http://chaos.pelagicore.net:8080'

# development setup: no security

flags:
  noSecurity: yes
  noUiWatchdog: yes

These options are also configurable from the command line as a parameter to the appman utility.

Note: You must regenerate the Yocto image for your target after you have changed the yaml files. See Building Embedded Linux Image.

Configuring Style

Neptune UI supports different style configurations. They can be used to adapt the style to the current target device needs. Neptune UI supports the following resolutions:

  • 1920x1080 (a default resolution)
  • 1280x800
  • 1080x1920
  • 768x1024

To change the Neptune UI resolution, you need to add the location of the QtQuickControls 2 configuration file to the QT_QUICK_CONTROLS_CONF environment variable. You find the configuration files under the styles folder. See Qt QuickControls 2 Environment Variables.

For example, you can define a 1080x1920 potrait resolution with the following configuration file:

[Controls]
Style=Material
[Material]
Theme=Dark

[Neptune]
Theme=Dark
FontSize=28
FontFactor=1.0
FontFamily="Source Sans Pro"
WindowWidth=1080
WindowHeight=1920
Dark/BrightColor=#FEFEFE
Light/BrightColor=#3E3E3E

© 2017 Pelagicore AG. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.