ADTF  3.18.2
IQtXSystem::IWindowStateabstract

Window state callback interface. More...

Inheritance diagram for IQtXSystem::IWindowState:
[legend]

Public Member Functions

virtual QString GetStateIdentifier () const =0
 Returns The user defined window state identifier. More...
 
virtual void OnLoadState (const QString &strStateFolder)=0
 Callback function to load the internal window state from the given folder strStateFolder. More...
 
virtual void OnSaveState (const QString &strStateFolder) const =0
 Callback function to save the internal window state to the given folder strStateFolder. More...
 

Protected Member Functions

 ~IWindowState ()=default
 protected DTOR
 

Detailed Description

Window state callback interface.

While registering a window with IQtXSystem::CreateWindow you are allowed to use the window creation flag WCF_HasWindowState. The implementation of parameter pWindow must derive by IWindow and IWindowState.

Remarks

Definition at line 230 of file qtxsystem_intf.h.

Member Function Documentation

◆ GetStateIdentifier()

◆ OnLoadState()

virtual void OnLoadState ( const QString &  strStateFolder)
pure virtual

Callback function to load the internal window state from the given folder strStateFolder.

We recommend to use QSettings to save and load a window state file.

void cMyFilter::OnLoadState(const QString& strStateFolder)
{
QSettings oSettings(strStateFolder + "/my_window_state.settings", QSettings::IniFormat);
oSettings.beginGroup("my_window");
// read your state from the settings file as created within OnSaveState
oSettings.endGroup();
}
Parameters
[in]strStateFolderThe folder to save the window state files to.

◆ OnSaveState()

virtual void OnSaveState ( const QString &  strStateFolder) const
pure virtual

Callback function to save the internal window state to the given folder strStateFolder.

We recommend to use QSettings to save and load a window state file.

void cMyFilter::OnSaveState(const QString& strStateFolder) const
{
QSettings oSettings(strStateFolder + "/my_window_state.settings", QSettings::IniFormat);
oSettings.beginGroup("my_window");
// save your window state to the settings file.
oSettings.endGroup();
}
Parameters
[in]strStateFolderThe folder to save the window state files to.