ADTF
ADTF UI SDK

ADTF UI SDK

The ADTF UI SDK defines basic implementation for an ADTF Service or an ADTF Filter. The main header to include is:

#include <adtf_ui.h>

It is a headers-only package. Additionally, you have to include the relevant SDK header required to develop a Filter or a System Service.

See also
ADTF Filter SDK
ADTF System SDK
Remarks
Make sure the include of the SDK package is done before a the ADTF UI SDK is included.
#include <adtf_filtersdk.h> // always before adtf_ui !!
#include <adtf_ui.h>
#include <adtf_systemsdk.h> // always before adtf_ui !!
#include <adtf_ui.h>

Introduction

The main focus of this package is to give you a short implementation to create a Qt based window (see IQtXSystem::IWindow) which can be part of the Qt5 ADTF XSystem UI Service.

Basics

Interface Definition
Develop UI Filters
Develop UI Services
  • Use adtf::ui::riddler::cQtUIService
Examples

Scaling

All widgets adjust theirs size to scaling changes automatically. Any metrics within a widget that should react to scale changes, have to calulate their size based on the widget font. A widget can react to scale changes by listening to the StyleChange-Event and recalulate sizes then:

bool myCustomWidget::event(QEvent* event)
{
if (event->type() == QEvent::StyleChange)
{
const QFontMetrics oFontMetrics(font());
int myCustomHeight = oFontMetrics.height() * 20; // this height is based on font height
// ...
}
return QWidget::event(event);
}

Due to a Qt bug, ComboBoxes need a workaround for the popup to adjust to scaling changes. So if the text in a ComboBox list appears to be too small, just add one line after creation of the ComboBox:

QComboBox* myComboBox = new QComboBox();
myComboBox->setView(new QListView()); // just add this extra line to your code

Dependency

The ADTF UI SDK depends on the ADTF Base SDK. It has a header only dependency to ADTF Filter SDK and/or ADTF System SDK as well as Qt.