#include <xsystem_qtwindow.h>
Inherits adtf::ui::ant::cQtWindow, adtf::ui::v1::IQtXSystem::IWindowState, and adtf::ui::spider::IQtXSystem::IHelp.
|
| QString | GetStateIdentifier () const |
| |
| virtual void | OnLoadState (const QString &strStateFolder) |
| |
| void | OnLoadState (const QString &strStateFolder, uint32_t ui32LoadStateFlags) override |
| |
| virtual void | OnSaveState (const QString &strStateFolder) const |
| |
| void | OnSaveState (const QString &strStateFolder, uint32_t ui32SaveStateFlags) const override |
| |
| QString | GetHelpLink () const override |
| |
|
| void | EnableWindowState () |
| | Enables the Window state callbacks. We recommend to use this only within your filters CTOR.
|
| |
| void | SetWindowCreationFlags (uint32_t ui32WindowCreationFlags) |
| |
| void | SetWindowCreationFlag (v1::IQtXSystem::eWindowCreationFlags eWindowCreationFlag, bool bOn) |
| |
| uint32_t | GetWindowCreationFlags () const |
| |
|
| 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
|
| |
|
| ~IHelp ()=default |
| | protected DTOR
|
| |
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. Additionally it will implement the v1::IQtXSystem::IWindowState and the spider::IQtXSystem::IHelp interface.
- See also
- adtf::ui::v1::IQtXSystem, v1::IQtXSystem::IWindowState, Example Qt5 Video Display
◆ EnableWindowState()
| void adtf::ui::v1::cQtWindow::EnableWindowState |
( |
| ) |
|
|
inlineprotected |
◆ GetHelpLink()
| QString adtf::ui::v1::cQtWindow::GetHelpLink |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns a filesystem help link to the windows documentation page.
- Return values
-
| empty | The link will be ignored. |
| not-empty | The filesystem help link to the windows documentation page. |
Implements adtf::ui::spider::IQtXSystem::IHelp.
◆ GetStateIdentifier()
| QString adtf::ui::v1::cQtWindow::GetStateIdentifier |
( |
| ) |
const |
|
inlinevirtual |
◆ GetWindowCreationFlags()
| uint32_t adtf::ui::v1::cQtWindow::GetWindowCreationFlags |
( |
| ) |
const |
|
inlineprotected |
◆ OnLoadState() [1/2]
| virtual void adtf::ui::v1::cQtWindow::OnLoadState |
( |
const QString & | strStateFolder | ) |
|
|
inlinevirtual |
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. |
◆ OnLoadState() [2/2]
| void adtf::ui::v1::cQtWindow::OnLoadState |
( |
const QString & | strStateFolder, |
|
|
uint32_t | ui32LoadStateFlags ) |
|
inlineoverridevirtual |
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, uint32_t ui32LoadStateFlags)
{
const auto strUISettingsFile = strStateFolder + "/my_ui_view.settings";
if (QFileInfo(strUISettingsFile).exists())
{
QSettings oSettings(strUISettingsFile, QSettings::IniFormat);
oSettings.beginGroup("my_window");
oSettings.endGroup();
}
else
{
{
THROW_ERROR_DESC(ERR_INVALID_FILE, "UI View Settings file not found: %s",
strUISettingsFile.toStdString().c_str());
}
}
}
@ Interactive
State folder was created on export/import actions by user interaction.
Definition qtxsystem_intf.h:453
- Parameters
-
| [in] | strStateFolder | The folder to save the UI View Settings files to. |
| [in] | ui32LoadStateFlags | Flags indicating the reason of the call and folder location. Only the StateFlags::Interactive indicates an user interactions with the view. An exception during this interaction will result in a error message box, while all other calls will and only log the tResult error. |
- See also
- StateFlags
Implements adtf::ui::v1::IQtXSystem::IWindowState.
◆ OnSaveState() [1/2]
| virtual void adtf::ui::v1::cQtWindow::OnSaveState |
( |
const QString & | strStateFolder | ) |
const |
|
inlinevirtual |
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. |
◆ OnSaveState() [2/2]
| void adtf::ui::v1::cQtWindow::OnSaveState |
( |
const QString & | strStateFolder, |
|
|
uint32_t | ui32SaveStateFlags ) const |
|
inlineoverridevirtual |
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,[[maybe_unused]] uint32_t ui32SaveStateFlags) 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. |
| [in] | ui32SaveStateFlags | Flags indicating the reason of the call and folder location. |
- See also
- StateFlags
Implements adtf::ui::v1::IQtXSystem::IWindowState.
◆ SetWindowCreationFlag()
◆ SetWindowCreationFlags()
| void adtf::ui::v1::cQtWindow::SetWindowCreationFlags |
( |
uint32_t | ui32WindowCreationFlags | ) |
|
|
inlineprotected |
The documentation for this class was generated from the following file: