#include <qt_ui_service.h>
Inherits SERVICEBASECLASS, adtf::ui::ant::cQtWindow, and adtf::ui::riddler::IQtXSystem::IWindowState.
|
| void | EnableWindowState () |
| | Enables the Window state callbacks. We recommend to use this only within your services CTOR.
|
| |
|
| cQtWindow ()=default |
| | default CTOR
|
| |
|
virtual | ~cQtWindow ()=default |
| | default DTOR
|
| |
| virtual QWidget * | CreateView ()=0 |
| |
| virtual void | ReleaseView ()=0 |
| |
| 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 windows implementation.
|
| |
| tResult | OnIdle () override |
| |
| tResult | OnTimer () override |
| |
|
| ~IWindowState ()=default |
| | protected DTOR
|
| |
|
|
adtf::base::property_variable< adtf::util::cString > | m_strTitle |
| | title property variable will be set while window creating
|
| |
template<typename SERVICEBASECLASS>
class adtf::ui::riddler::qt_ui_service< SERVICEBASECLASS >
Implementation template which implements a IQtXSystem::IWindow and a IQtXSystem::IWindowState interface and creates a window on the adtf::ui::riddler::IQtXSystem while initializing.
- Template Parameters
-
| SERVICEBASECLASS | a adtf::system::ant::cADTFService implementation. The ServiceInit and ServiceShutdown method will be override. |
◆ qt_ui_service()
template<typename SERVICEBASECLASS>
default CTOR This will register the common property "title" to the services IConfiguration
◆ EnableWindowState()
template<typename SERVICEBASECLASS>
◆ GetStateIdentifier()
template<typename SERVICEBASECLASS>
◆ OnLoadState()
template<typename SERVICEBASECLASS>
Callback function to load the internal window state from the given folder strStateFolder. We recommend to use QSettings to save and load a UI View Settings file.
void cMyFilter::OnLoadState(const QString& strStateFolder)
{
const auto strUISettingsFile = strStateFolder + "/my_ui_view.settings";
if (QFileInfo(strLayoutFile).exists())
{
QSettings oSettings(strUISettingsFile, QSettings::IniFormat);
oSettings.beginGroup("my_window");
oSettings.endGroup();
}
else
{
if (!is_window_state_folder_on_runlevel_change(strStateFolder))
{
THROW_ERROR_DESC(ERR_INVALID_FILE, "UI View Settings file not found: %s",
strLayoutFile.toStdString().c_str());
}
}
}
- Parameters
-
| [in] | strStateFolder | The folder to save the UI View Settings files to. |
Implements adtf::ui::riddler::IQtXSystem::IWindowState.
◆ OnSaveState()
template<typename SERVICEBASECLASS>
Callback function to save the internal window state to the given folder strStateFolder. We recommend to use QSettings to save and load a UI View Settings file.
void cMyFilter::OnSaveState(const QString& strStateFolder) const
{
QSettings oSettings(strStateFolder + "/my_ui_view.settings", QSettings::IniFormat);
oSettings.beginGroup("my_window");
oSettings.endGroup();
}
- Parameters
-
| [in] | strStateFolder | The folder to save the UI View Settings files to. |
Implements adtf::ui::riddler::IQtXSystem::IWindowState.
◆ ServiceInit()
template<typename SERVICEBASECLASS>
◆ ServiceShutdown()
template<typename SERVICEBASECLASS>
Override ServiceShutdown method of the service to destroy a window.
- Returns
- Standard Return Code. Error code will only be logged. Breaking shutdown is not possible.
The documentation for this class was generated from the following file: