User Tools

Site Tools


homescreen

This is an old revision of the document!


Home Screen

The home screen application provides the User Interface (UI) to control the Infotainment System.

Requirements

The current requirements are listed in the AGL image spec v1.0.

Summary

This document contains the documentation for the following application:

  • HomeScreen
  • HomeScreenAppFrameworkBinderTizen
  • HomeScreenSimulator
  • InputEventManager
  • SampleAppTimeDate
  • WindowManager

The main focus is on the Home Screen application. The other applications were created to enable functionality that is provided by already existing components (like Tizen app framework) or that are not available by default (InputEventManager, WindowManager).

General Information

Development Environment

License

The License for the source code is Apache 2.0.

   Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
   
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
   
   http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and limitations under the License.

HomeScreen (old version)

Purpose

The Home Screen application is the main visual interface to the user. Its main functionalities:

  • Provide a control bar for quick commands
  • Provide a status bar to display information
  • Provide areas for application surfaces
  • Provide a popup mechanism
  • Provide a list of applications that can be launched by the user

Applications Design

Programming Language

All applications are written in C++, using Qt 5.5.1.

Software Architecture

Overview

This diagram shows which class is instantiated and who the owner is. It also shows the interfaces of the classes. The graphical representations of the classes (UI-files) are shown on the right side.

IPC

The current choice is D-Bus. HSA uses the Qt D-Bus binder. For system wide events like Day/Night Mode, signals are used, for direct communication like popup requests, methods are used. To generate the D-Bus adapter and proxy source code, qdbusxml2cpp is used.

Multiple instances

To only allow one instance, uncomment this in the main.cpp:

  // allow only one instance of this application
  QSharedMemory appInstance;
  appInstance.setKey("AGLHomeScreenApp");
  if (!appInstance.create(1))
  {
      qDebug("Only one instance of the Home Screen App allowed!");
      exit(-1);
  }

StatusBarWidget

The status bar has 5 status bar placeholder. They are placed as shown here:

ControlBarWidget

The control bar has thee entries right now.

  • The “Home” button
    • This will show the app launcher widget. A list of applications that can be launched by clicking the app name.
  • The “Settings” button
    • This will bring up the settings widget (see settings chapter)
  • The “Navigation” button
    • This is an example for a soft “Hard Key”. It will use the InputEventManager to emit a key press signal.

PopupWidget

This widget is shown as soon as a showPopup request in incoming. Right now, only text can be displayed.

SettingsWidget

This widget is used to set up HomeScreen settings. Right now, the language and the color scheme can be configured.

English language selected:

Japanese language selected:

Internationalization

HSA uses the QTranslator class to support multiple languages.

Application Settings

Applications settings that are needed for the development are stored via QSettings. Therefore some QCoreApplication values are set:

  // used for application settings (QSettings)
  QCoreApplication::setOrganizationDomain("LinuxFoundation");
  QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
  QCoreApplication::setApplicationName("HomeScreen");
  QCoreApplication::setApplicationVersion("0.x.x");

These are stored on the developer OS in the file ~/.config/AutomotiveGradeLinux/HomeScreen.conf

HomeScreenAppFrameworkBinderTizen

Purpose

The binder is used to access the systems application framework functionalities, like

  • Receive a list of applications that can be launched by the user
  • Launch applications

The binder can be used as blueprint for other app framework binders.

Tizen

This binder uses AUL and the pkgmgr-info API of the Tizen application framework.

Receiving the list of launchable applications:

pkgmgr_info::pkgmgrinfo_pkginfo_get_list(…)

Launch application

AUL:: aul_launch_app(…)

D-Bus interface

The binder implements the org.agl.appframework interface.

<node>
  <interface name="org.agl.appframework">
      <method name="getAvailableAppNames">
        <arg name="names" type="as" direction="out"/>
      </method>
      <method name="launchApp">
        <arg name="name" type="s" direction="in"/>
        <arg name="pid" type="i" direction="out"/>
      </method>
  </interface>
</node>

HomeScreenSimulator

Purpose

This application is meant to run on the developer PC to inject events into the HomeScreen application. For example, to use D-Bus interfaces exposed by the HomeScreen app.

Status Bar

The Simulator app uses the D-Bus interface org.agl.statusbar to get and set the status bar info. The status bar is the green bar at the very top of the app.

The Simulator app uses the D-Bus interface org.agl.popup to display a popup.

<node>
  <interface name="org.agl.popup">
    <method name="showPopup">
      <arg name="type" type="i" direction="in"/>
      <arg name="text" type="s" direction="in"/>
    </method>
  </interface>
</node>

Day/Night Mode

The Simulator app uses the D-Bus interface org.agl.daynightmode to switch the color schemes between day and night.

<node>
  <interface name="org.agl.daynightmode">
    <signal name="dayNightMode">
      <arg name="mode" type="i" direction="out"/>
    </signal>
  </interface>
</node>

Day mode:

Night mode:

Future features

These will be implemented as soon as the features are available.

InputEventManager

Purpose

The event manager can receive high level events, like hard key presses and distributes them to the corresponding component.

Interfaces

Therefore it implements org.agl.inputevent

<node>
  <interface name="org.agl.inputevent">
    <method name="hardKeyPressed">
      <arg name="key" type="i" direction="in"/>
    </method>
  </interface>
</node>

Right now it uses the org.agl.homescreen interface to distribute keys to the HSA:

<node>
  <interface name="org.agl.homescreen">
    <method name="hardKeyPressed">
      <arg name="key" type="i" direction="in"/> <!-- using the inputevent.hpp InputEvent::HardKey type -->
    </method>
  </interface>
</node>

SampleAppTimeDate

Purpose

This app demonstrates how to use the org.agl.statusbar interface. ==== Functionality It shows the current time in the first available status bar placeholder.

WindowManager

Purpose

The WindowManager is the interface to the wayland compositor. It will use the IVI-shell to receive information about the display and the available surfaces.

Functionality

The Window Manager will implement a logic to decide between different app surface render layouts. Therefore it will access the app framework to receive information like preferred app resolutions and so on.

Application Design

Programming Language

The Home Screen application is written in C++, using Qt 5.5.1.

Simulation on Developer PC

System Settings Simulator

The x86 build includes a simulator for system settings and events like day/night mode, clamp 15 (ignition) and reverse gear.

Infrastructure

Source Code

Bitbake Recipes

homescreen.1536119067.txt.gz · Last modified: 2018/09/05 03:44 by hoshina0406