Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::WindowDecorationWrapper Class Reference

Inherits QFrame.

Public Types

enum  Option { OptionNone = 0 , OptionAutoAttach = 1 , OptionAutoTitleBarButtons = 2 , OptionDisabled = 4 }
 

Public Member Functions

 WindowDecorationWrapper (Options options=Option::OptionAutoTitleBarButtons, QWidget *parent=nullptr)
 
 ~WindowDecorationWrapper ()
 
void setGuest (QWidget *)
 
QWidget * guest () const
 
bool isAttached () const
 
TitleBartitleBar () const
 
void enableSaveRestoreGeometry (const QString &organization, const QString &app, const QString &key, bool autoRestoreOnShow=false)
 
void enableSaveRestoreGeometry (const QString &key, bool autoRestoreOnShow=false)
 
bool saveRestoreGeometryEnabled () const
 
bool restoreGeometryFromSettings ()
 
void showFromSettings ()
 
QMargins margins () const
 

Protected Member Functions

bool event (QEvent *ev) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
void resizeEvent (QResizeEvent *ev) override
 
void childEvent (QChildEvent *ev) override
 
void closeEvent (QCloseEvent *ev) override
 
void showEvent (QShowEvent *ev) override
 
void hideEvent (QHideEvent *ev) override
 
bool nativeEvent (const QByteArray &eventType, void *message, long *result) override
 
void changeEvent (QEvent *ev) override
 

Friends

class StyledDockWidget
 

Constructor & Destructor Documentation

◆ ~WindowDecorationWrapper()

AzQtComponents::WindowDecorationWrapper::~WindowDecorationWrapper ( )

Destroys the wrapper and the guest if it's still alive.

Member Function Documentation

◆ enableSaveRestoreGeometry() [1/2]

void AzQtComponents::WindowDecorationWrapper::enableSaveRestoreGeometry ( const QString &  key,
bool  autoRestoreOnShow = false 
)

Enables restoring/saving geometry on creation/destruction, using the default settings values for organization and application. If autoRestoreOnShow is set to true, the first time the window is shown, it will automatically restore the geometry.

◆ enableSaveRestoreGeometry() [2/2]

void AzQtComponents::WindowDecorationWrapper::enableSaveRestoreGeometry ( const QString &  organization,
const QString &  app,
const QString &  key,
bool  autoRestoreOnShow = false 
)

Enables restoring/saving geometry on creation/destruction. If autoRestoreOnShow is set to true, the first time the window is shown, it will automatically restore the geometry.

◆ isAttached()

bool AzQtComponents::WindowDecorationWrapper::isAttached ( ) const

Returns true if there's a guest widget, which means either one was set with setGuest() or we're using OptionAutoAttach and we got a ChildEvent.

◆ restoreGeometryFromSettings()

bool AzQtComponents::WindowDecorationWrapper::restoreGeometryFromSettings ( )

Restores geometry and shows window. Only shows window if there were saved settings, otherwise returns false.

◆ saveRestoreGeometryEnabled()

bool AzQtComponents::WindowDecorationWrapper::saveRestoreGeometryEnabled ( ) const

Returns true if restoring/saving geometry on creation/destruction is enabled. It's disabled by default.

◆ setGuest()

void AzQtComponents::WindowDecorationWrapper::setGuest ( QWidget *  )

Sets the widget which should get custom window decorations. You can only call this setter once.

◆ showFromSettings()

void AzQtComponents::WindowDecorationWrapper::showFromSettings ( )

Restores geometry if there are saved settings, and shows window (always).

◆ titleBar()

TitleBar * AzQtComponents::WindowDecorationWrapper::titleBar ( ) const

Returns the title bar widget.


The documentation for this class was generated from the following file: