16#include <adtf_utils.h>
17#include <adtfucom3/adtf_ucom3.h>
18#include <adtfstreaming3/graph_element_editors.h>
19#include <adtfsystemsdk/adtf_service.h>
33template<
typename SERVICEBASECLASS>
37 adtf::ucom::object_ptr<adtf::ui::ant::IQtXSystem> m_pXSystem;
44 m_strTitle.SetDescription(
"Window title which will be used at runtime within Qt5 ADTF XSystem UI Service.");
45 SERVICEBASECLASS::RegisterPropertyVariable(
"title",
m_strTitle);
56 RETURN_IF_FAILED(_runtime->GetObject(m_pXSystem));
58 if (strTitle.IsEmpty())
60 strTitle = SERVICEBASECLASS::GetOID();
63 return m_pXSystem->CreateWindow(*
this);
72 RETURN_IF_POINTER_NULL(m_pXSystem);
73 return m_pXSystem->DestroyWindow(*
this);
94template<
typename SERVICEBASECLASS>
102 m_strTitle.SetDescription(
"Window title which will be used at runtime within Qt5 ADTF XSystem UI Service.");
103 SERVICEBASECLASS::RegisterPropertyVariable(
"title",
m_strTitle);
115 RETURN_IF_FAILED(_runtime->GetObject(m_pXSystem));
116 if ((*m_strTitle).IsEmpty())
124 return m_pXSystem->CreateWindow(*
this, ui32Flags);
131 RETURN_IF_POINTER_NULL(m_pXSystem);
132 return m_pXSystem->DestroyWindow(*
this);
144 return SERVICEBASECLASS::GetOID();
151 void OnLoadState([[maybe_unused]]
const QString& strStateFolder)
override
159 void OnSaveState([[maybe_unused]]
const QString& strStateFolder)
const override
172 m_bWindowStateEnabled =
true;
177 adtf::ucom::object_ptr<adtf::ui::riddler::IQtXSystem> m_pXSystem;
179 bool m_bWindowStateEnabled =
false;
209template<
typename SERVICEBASECLASS,
typename QTWINDOWBASECLASS = sp
ider::cQtWindow>
217 QTWINDOWBASECLASS::m_strTitle.SetDescription(
218 "Window title which will be used at runtime within Qt5 ADTF XSystem UI Service.");
219 SERVICEBASECLASS::RegisterPropertyVariable(
"title", QTWINDOWBASECLASS::m_strTitle);
231 RETURN_IF_FAILED(_runtime->GetObject(m_pXSystem));
232 if ((*QTWINDOWBASECLASS::m_strTitle).IsEmpty())
234 QTWINDOWBASECLASS::m_strTitle = SERVICEBASECLASS::GetOID();
236 uint32_t ui32CreationFlags = 0;
237 if constexpr (std::is_base_of_v<adtf::ui::v0::cQtWindow, QTWINDOWBASECLASS>)
239 ui32CreationFlags = QTWINDOWBASECLASS::IsWindowStateEnabled() ?
245 ui32CreationFlags = QTWINDOWBASECLASS::GetWindowCreationFlags();
248 return m_pXSystem->CreateWindow(*
this, ui32CreationFlags);
255 RETURN_IF_POINTER_NULL(m_pXSystem);
256 return m_pXSystem->DestroyWindow(*
this);
268 return SERVICEBASECLASS::GetOID();
277 return adtf::streaming::spider::get_help_link((base::ant::IConfiguration&) *
this).c_str();
282 adtf::ucom::object_ptr<adtf::ui::spider::IQtXSystem> m_pXSystem;
Definition xsystem_qtwindow.h:40
cQtWindow()=default
default CTOR
adtf::base::property_variable< adtf::util::cString > m_strTitle
title property variable will be set while window creating
Definition xsystem_qtwindow.h:94
Definition qt_ui_service.h:35
qt_ui_service()
Definition qt_ui_service.h:42
tResult ServiceShutdown() override
Definition qt_ui_service.h:70
~qt_ui_service()=default
DTOR.
tResult ServiceInit() override
Definition qt_ui_service.h:54
@ WCF_None
no flag set.
Definition qtxsystem_intf.h:176
@ WCF_HasWindowState
Enable the window state calls for IQtXSystem::IWindowState.
Definition qtxsystem_intf.h:185
qt_ui_service()
Definition qt_ui_service.h:215
Definition qtxsystem_intf.h:252
tResult ServiceInit() override
Definition qt_ui_service.h:113
void OnLoadState(const QString &strStateFolder) override
Definition qt_ui_service.h:151
tResult ServiceShutdown() override
Definition qt_ui_service.h:129
qt_ui_service()
Definition qt_ui_service.h:100
void OnSaveState(const QString &strStateFolder) const override
Definition qt_ui_service.h:159
~qt_ui_service() override=default
DTOR.
void EnableWindowState()
Enables the Window state callbacks. We recommend to use this only within your services CTOR.
Definition qt_ui_service.h:170
QString GetStateIdentifier() const override
Get the State Identifier for the Window State callbacks "OnLoadState" and "OnSaveState".
Definition qt_ui_service.h:142
Definition qt_ui_service.h:211
tResult ServiceShutdown() override
Definition qt_ui_service.h:253
tResult ServiceInit() override
Definition qt_ui_service.h:229
qt_ui_service()
Definition qt_ui_service.h:215
QString GetHelpLink() const
Definition qt_ui_service.h:275
QString GetStateIdentifier() const
Get the State Identifier for the Window State callbacks "OnLoadState" and "OnSaveState".
Definition qt_ui_service.h:266
~qt_ui_service() override=default
DTOR.
Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3....
Definition qt_ui_filter.h:27
qt_ui_service< adtf::system::ant::cADTFService > cQtUIService
Definition qt_ui_service.h:80
Legacy version namespace for all functionality of the ADTF UI SDK taken over from ADTF v3....
Definition qt_ui_filter.h:119
qt_ui_service< adtf::system::ant::cADTFService, spider::cQtWindow > cQtUIService
Definition qt_ui_service.h:289
Namespace for all ui classes and interfaces provided since v1.0.0.
Definition adtfui_pkg.h:13
v0::qt_ui_service< adtf::system::ant::cADTFService, v1::cQtWindow > cQtUIService
Definition qt_ui_service.h:309
Namespace for the ADTF UI SDK.
Definition adtfui_pkg.h:13
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtfui_pkg.h:13