ADTF  3.18.2
cQtWindowabstract

Basic IWindow implementation. More...

Inheritance diagram for cQtWindow:
[legend]

Protected Member Functions

 cQtWindow ()=default
 default CTOR
 
virtual ~cQtWindow ()=default
 default DTOR
 
virtual QWidget * CreateView ()=0
 Callback you have to implement and return a newly QWidget which will be embed to the oParentWidget of the Create. More...
 
virtual void ReleaseView ()=0
 Callback you have to implement to cleanup while destroying of the parents window. More...
 
tResult Create (const char *strWindowID, QWidget &oParentWidget) override
 Callback which in called within the applications main th thread to create a window. More...
 
tResult Destroy (QWidget &) override
 Callback which in called within the applications main th thread to deliver a destroy message to the windows implementation. More...
 
tResult OnIdle () override
 Callback for actions within a idle thread. More...
 
tResult OnTimer () override
 Callback for actions within a steady timer. More...
 

Protected Attributes

adtf::base::property_variable< adtf::util::cString > m_strTitle
 title property variable will be set while window creating
 

Additional Inherited Members

Detailed Description

Basic IWindow implementation.

This implementation is used to provide callbacks on creation and destroying widget while IWindow::Create call.

The Create method will call the CreateView first and embed your created widget to the oParentWidget.

See also
adtf::ui::riddler::IQtXSystem, Qt5 Video Display Plugin

Definition at line 39 of file xsystem_qtwindow.h.

Member Function Documentation

◆ Create()

tResult Create ( const char *  strWindowID,
QWidget &  oParentWidget 
)
inlineoverrideprotectedvirtual

Callback which in called within the applications main th thread to create a window.

This Callback is a reaction on a IQtXSystem::CreateWindow call. You are able to initialize your own widget set to pParentWidget and create your display.

Parameters
[in]strWindowIDunique ID of the Window. The ID is to manage the different IWindow creations and has to be unique.
[in]oParentWidgetparent widget to add you own sub widgets to.
Returns
Return a standard result code. If an error is returned the creation of the window breaks and the return value is passed to the CreateWindow call.
See also
IQtXSystem::CreateWindow

Implements IQtXSystem::IWindow.

Definition at line 68 of file xsystem_qtwindow.h.

References cQtWindow::CreateView(), cQtWindow::m_strTitle, RETURN_IF_POINTER_NULL, and RETURN_NOERROR.

◆ CreateView()

virtual QWidget* CreateView ( )
protectedpure virtual

Callback you have to implement and return a newly QWidget which will be embed to the oParentWidget of the Create.

Returns
Your widget to create.
See also
adtf::ui::ant::IQtXSystem::CreateWindow, adtf::ui::ant::IQtXSystem::IWindow::Create

Referenced by cQtWindow::Create().

◆ Destroy()

tResult Destroy ( QWidget &  oParentWidget)
inlineoverrideprotectedvirtual

Callback which in called within the applications main th thread to deliver a destroy message to the windows implementation.

This Callback is a reaction on a IQtXSystem::DestroyWindow call or any quit of the XSystem and can be used to cleanup. Qt is using reference counting on widget. Added widgets to oParentWidget are invalid after functions return.

Parameters
[in]oParentWidgetparent widget about to destroy.
Returns
Return a standard result code. If an error is returned the return value is passed to the DestroyWindow call.
See also
IQtXSystem::DestroyWindow

Implements IQtXSystem::IWindow.

Definition at line 93 of file xsystem_qtwindow.h.

References cQtWindow::ReleaseView(), and RETURN_NOERROR.

◆ OnIdle()

tResult OnIdle ( )
inlineoverrideprotectedvirtual

Callback for actions within a idle thread.

Use this for low priority activity. The default xsystem calls this roughly at a 100ms interval. To update your UI based on input data prefer OnTimer().

Remarks
Make sure to return, otherwise the applications main thread will block.
Returns
Standard Result Code.
See also
cQtWindow

Implements IQtXSystem::IWindow.

Definition at line 99 of file xsystem_qtwindow.h.

References RETURN_NOERROR.

◆ OnTimer()

tResult OnTimer ( )
inlineoverrideprotectedvirtual

Callback for actions within a steady timer.

This function is called at a specific interval from within the GUI thread (default is 50ms).

Remarks
Make sure to return, otherwise the applications main thread will block.
Returns
Standard Result Code.
See also
cQtWindow

Implements IQtXSystem::IWindow.

Definition at line 104 of file xsystem_qtwindow.h.

References RETURN_NOERROR.

◆ ReleaseView()

virtual void ReleaseView ( )
protectedpure virtual

Callback you have to implement to cleanup while destroying of the parents window.

See also
IQtXSystem::DestroyWindow, IQtXSystem::IWindow::Destroy

Referenced by cQtWindow::Destroy().