68 tResult Create(
const char* strWindowID, QWidget& oParentWidget)
override
72 QLayout* pLayout = oParentWidget.layout();
73 if (pLayout ==
nullptr)
75 pLayout =
new QHBoxLayout(&oParentWidget);
76 pLayout->setMargin(0);
79 pLayout->addWidget(pView);
81 if (strTitle.IsEmpty())
83 strTitle = strWindowID;
85 QWidget* pDockedWindowParent = oParentWidget.parentWidget();
86 if (
nullptr != pDockedWindowParent)
88 pDockedWindowParent->setWindowTitle(QString(strTitle));
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
A common result class usable as return value throughout.
Property Variable template for the given T.
IWindow interface defintion for to.
Basic IWindow implementation.
virtual void ReleaseView()=0
Callback you have to implement to cleanup while destroying of the parents window.
tResult OnIdle() override
Callback for actions within a idle thread.
cQtWindow()=default
default CTOR
adtf::base::property_variable< adtf::util::cString > m_strTitle
title property variable will be set while window creating
virtual ~cQtWindow()=default
default DTOR
tResult Create(const char *strWindowID, QWidget &oParentWidget) override
Callback which in called within the applications main th thread to create a window.
tResult Destroy(QWidget &) override
Callback which in called within the applications main th thread to deliver a destroy message to the w...
virtual QWidget * CreateView()=0
Callback you have to implement and return a newly QWidget which will be embed to the oParentWidget of...
tResult OnTimer() override
Callback for actions within a steady timer.
Window state callback interface.
The window info interface to return a link to the windows documentation page.
Basic IWindow implementation.
void OnSaveState([[maybe_unused]] const QString &strStateFolder) const override
Callback function to save the internal window state to the given folder strStateFolder.
QString GetHelpLink() const override
Returns a filesystem help link to the windows documentation page.
bool m_bWindowStateEnabled
State for enabled window state.
QString GetStateIdentifier() const override
Returns The user defined window state identifier.
void OnLoadState([[maybe_unused]] const QString &strStateFolder) override
Callback function to load the internal window state from the given folder strStateFolder.
void EnableWindowState()
Enables the Window state callbacks.
bool IsWindowStateEnabled() const
Copyright © Audi Electronics Venture GmbH.
void maybe_unused(T &&)
Mimics C++17 attribute maybe_unused to silence compiler warnings on potentially unused enitities.
string_base< cStackString > cString
cString implementation for a stack string which works on stack if string is lower than A_UTILS_DEFAUL...
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.