ADTF Qt5
Loading...
Searching...
No Matches
adtf::ui Namespace Reference

Namespace for the ADTF UI SDK. More...

Namespaces

namespace  ant
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.0.
 
namespace  giant
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.6.
 
namespace  osborn
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.14.
 
namespace  riddler
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.17.
 
namespace  spider
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.18.
 
namespace  testing
 Namespace for all provided testing functionality helper.
 
namespace  thor
 Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3.19.
 
namespace  v0
 Namespace for all ui classes and interfaces provided since v1.0.0.
 
namespace  v1
 Namespace for further developed interfaces and implementation revisions of the ADTF UI SDK.
 
namespace  v2
 Namespace for all functionality provided since v1.2.
 
namespace  widget
 Namespace for all provided widget functionality helper.
 

Classes

class  cCustomCursors
 
class  cQtWindow
 
class  cThemedIconColorMapping
 
class  IQtShared
 
class  IQtXSystem
 Interface definition for the ADTF XSystem based on Qt. Use this interface to create your own displays within the Qt5 ADTF XSystem UI Service. More...
 
class  qt_ui_filter
 
class  qt_ui_service
 

Typedefs

using cQtUIDynamicFilter
 
using cQtUIFilter
 
using cQtUIService
 

Enumerations

enum class  eThemedIcon
 

Functions

std::pair< QString, QString > split_result (tResult oResult)
 
QMessageBox::StandardButton result_message_box (QWidget *pParent, const QString &strTitle, tResult oResult, const QString &strInformativeText={}, QMessageBox::StandardButtons eButtons=QMessageBox::Ok, QMessageBox::StandardButton eDefaultButton=QMessageBox::NoButton)
 
QString get_window_state_folder_name (const QString &strSessionDataDir, const QString &strShortPathName)
 Get the default window state folder name.
 
QColor get_color (size_t maxColors, size_t colorIndex)
 Get tableau 10 colors. If maxColors is greater or equal to 20 it uses tableau 20 colors.
 
QIcon create_themed_icon (QString file, cThemedIconColorMapping themedIconColorMapping=cThemedIconColorMapping::GetDefaultColorMapping())
 Creates a themed icon from given svg file with color mapping.
 

Detailed Description

Namespace for the ADTF UI SDK.

Within this namespace all interfaces, classes and functions always refer to their last revised implementation. When using types defined within this namespace it is guaranteed to always use the latest version of the types.

The ADTF UI SDK defines basic implementation for an ADTF UI Service or an ADTF UI Filter.

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>

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

Interface Definition
Develop UI Filters
Develop UI Services

Please have a look at our 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.

Note
You need to install a Qt Developer Package to be able to implement own components! The Qt libraries within the 3rdparty folder of this delivery are only for runtime purpose. You will find the required Qt Developer Package also in the digitalwerk artifactory.
Warning
It is highly recommended to use the delivered version of Qt. Only the delivered version of Qt is released, tested and supported!

Typedef Documentation

◆ cQtUIDynamicFilter

Basic UI Filter implementation.

See also
adtf::filter::hollow::cFilter, adtf::ui::v1::IQtXSystem, v1::cQtWindow
Remarks
This class is defined for backward compatibility only.

◆ cQtUIFilter

Basic UI Filter implementation.

See also
adtf::filter::hollow::cFilter, adtf::ui::v1::IQtXSystem, v1::cQtWindow

◆ cQtUIService

UI Service basic implementation for cADTFService.

See also
adtf::system::ant::cADTFService, adtf::ui::v1::IQtXSystem, adtf::ui::v1::cQtWindow

Enumeration Type Documentation

◆ eThemedIcon

enum class adtf::ui::thor::eThemedIcon
strong

Enum for accessing various icons already delivered in XSystem.

Function Documentation

◆ create_themed_icon()

QIcon adtf::ui::thor::create_themed_icon ( QString file,
cThemedIconColorMapping themedIconColorMapping = cThemedIconColorMapping::GetDefaultColorMapping() )

Creates a themed icon from given svg file with color mapping.

Remarks
Create an icon with a custom color mapping for light/dark mode (SVG Icons only!).
Parameters
fileThe icon file
themedIconColorMappingThe color mapping for the icon, emtpy for default color mapping.
Returns
The created Icon.

◆ get_color()

QColor adtf::ui::thor::get_color ( size_t maxColors,
size_t colorIndex )

Get tableau 10 colors. If maxColors is greater or equal to 20 it uses tableau 20 colors.

Remarks
Get a color from maxColors that are easily distinguishable.
Parameters
maxColorsNumber of distinguishable colors.
colorIndexIndex of the color.
Returns
The color from the index

◆ get_window_state_folder_name()

QString adtf::ui::riddler::get_window_state_folder_name ( const QString & strSessionDataDir,
const QString & strShortPathName )

Get the default window state folder name.

Parameters
strSessionDataDirThe session data directory (if session manager is used this should be adtf::services::macro::ADTF_SESSION_DATA_DIR)
strShortPathNameThe short path for the state identifier (see adtf::ui::riddler::IQtXSystem::IWindowState::GetStateIdentifier)
Returns
QString The default folder name of the window state folder used by adtf::ui::riddler::IQtXSystem.

◆ result_message_box()

QMessageBox::StandardButton adtf::ui::mega::result_message_box ( QWidget * pParent,
const QString & strTitle,
tResult oResult,
const QString & strInformativeText = {},
QMessageBox::StandardButtons eButtons = QMessageBox::Ok,
QMessageBox::StandardButton eDefaultButton = QMessageBox::NoButton )

Display a message box showing the given tResult.

Parameters
[in]pParentThe parent of the messagebox.
[in]strTitleThe title of the messagebox.
[in]oResultThe result to show.
[in]strInformativeTextAn optional informative text, i.e. a question on how to continue.
[in]eButtonsThe buttons that should be shown.
[in]eDefaultButtonThe default button.
Returns
The button that was clicked.

◆ split_result()

std::pair< QString, QString > adtf::ui::mega::split_result ( tResult oResult)

Splits the result into the main error message and a detailed error description.

Parameters
[in]oResultThe Result that should be split up.
Returns
A pair containing the main error message and the details.