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::TitleBar Class Reference

Inherits QFrame.

Classes

struct  Config
 

Public Types

enum  TitleBarDrawMode { Main = 0 , Simple , Hidden }
 
typedef QList< DockBarButton::WindowDecorationButton > WindowDecorationButtons
 

Signals

void undockAction ()
 
void drawSideBordersChanged (bool drawSideBorders)
 
void drawSimpleChanged (bool drawSimple)
 
void forceInactiveChanged (bool forceInactive)
 
void tearEnabledChanged (bool tearEnabled)
 
void drawAsTabBarChanged (bool drawAsTabBar)
 
void windowTitleOverrideChanged (const QString &windowTitleOverride)
 

Public Member Functions

 TitleBar (QWidget *parent=nullptr)
 
bool drawSideBorders () const
 
void setDrawSideBorders (bool)
 
bool drawSimple () const
 
bool drawHidden () const
 
TitleBarDrawMode drawMode () const
 
void setDrawSimple (bool enable)
 
void setDrawMode (TitleBarDrawMode drawMode)
 
void setDragEnabled (bool)
 
void setIsShowingWindowControls (bool show)
 
bool tearEnabled () const
 
void setTearEnabled (bool)
 
bool drawAsTabBar () const
 
void setDrawAsTabBar (bool)
 
QSize sizeHint () const override
 
const QString & windowTitleOverride () const
 
void setWindowTitleOverride (const QString &)
 
void setButtons (WindowDecorationButtons)
 
void handleClose ()
 
void handleMaximize ()
 
void handleMinimize ()
 
bool hasButton (DockBarButton::WindowDecorationButton buttonType) const
 
bool buttonIsEnabled (DockBarButton::WindowDecorationButton buttonType) const
 
void handleMoveRequest ()
 
void handleSizeRequest ()
 
int numButtons () const
 
bool forceInactive () const
 
void setForceInactive (bool)
 
bool isTopResizeArea (const QPoint &globalPos) const
 
bool isLeftResizeArea (const QPoint &globalPos) const
 
bool isRightResizeArea (const QPoint &globalPos) const
 
QRect draggableRect () const
 
bool event (QEvent *event) override
 
void disableButton (DockBarButton::WindowDecorationButton buttonType)
 
void enableButton (DockBarButton::WindowDecorationButton buttonType)
 

Static Public Member Functions

static Config loadConfig (QSettings &settings)
 
static Config defaultConfig ()
 

Protected Slots

void handleButtonClicked (DockBarButton::WindowDecorationButton type)
 

Protected Member Functions

void mousePressEvent (QMouseEvent *ev) override
 
void mouseReleaseEvent (QMouseEvent *ev) override
 
void mouseMoveEvent (QMouseEvent *ev) override
 
void mouseDoubleClickEvent (QMouseEvent *ev) override
 
void timerEvent (QTimerEvent *ev) override
 
void contextMenuEvent (QContextMenuEvent *ev) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 

Properties

bool drawSideBorders
 
bool drawSimple
 
bool forceInactive
 
bool tearEnabled
 
bool drawAsTabBar
 
QString windowTitleOverride
 
QString title
 

Friends

class Style
 

Member Function Documentation

◆ defaultConfig()

static Config AzQtComponents::TitleBar::defaultConfig ( )
static

Returns default button config data.

◆ draggableRect()

QRect AzQtComponents::TitleBar::draggableRect ( ) const

The title rect width minus the buttons rect. In local coords.

◆ isLeftResizeArea()

bool AzQtComponents::TitleBar::isLeftResizeArea ( const QPoint &  globalPos) const

These will only return true ever for macOS.

◆ isTopResizeArea()

bool AzQtComponents::TitleBar::isTopResizeArea ( const QPoint &  globalPos) const

For left,right,bottom we use the native Windows border, but for top it's required we add the margin ourselves.

◆ loadConfig()

static Config AzQtComponents::TitleBar::loadConfig ( QSettings &  settings)
static

Loads the button config data from a settings object.

◆ setButtons()

void AzQtComponents::TitleBar::setButtons ( WindowDecorationButtons  )

Sets the titlebar buttons to show. By default shows: | Minimize | Maximize | Close

Example:

setButtons({ DockBarButton::DividerButton, DockBarButton::MinimizeButton, DockBarButton::DividerButton, DockBarButton::MaximizeButton, DockBarButton::DividerButton, DockBarButton::CloseButton});

Property Documentation

◆ title

QString AzQtComponents::TitleBar::title
read

Expose the title using a QT property so that test automation can read it


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