QWindowKit  1.5.1.0
Cross-platform window customization framework
Loading...
Searching...
No Matches
WidgetWindowAgent Class Reference

WindowAgentBase is the window agent for QtWidgets. More...

Inheritance diagram for WidgetWindowAgent:
WindowAgentBase

Signals

void titleBarChanged (QWidget *w)
 
void systemButtonChanged (SystemButton button, QWidget *w)
 

Public Member Functions

 WidgetWindowAgent (QObject *parent=nullptr)
 
 ~WidgetWindowAgent () override
 
bool setup (QWidget *w)
 
QWidget * titleBar () const
 
void setTitleBar (QWidget *w)
 
QWidget * systemButton (SystemButton button) const
 
void setSystemButton (SystemButton button, QWidget *w)
 
bool isHitTestVisible (const QWidget *w) const
 
void setHitTestVisible (QWidget *w, bool visible=true)
 
- Public Member Functions inherited from WindowAgentBase
 ~WindowAgentBase () override
 
QVariant windowAttribute (const QString &key) const
 
bool setWindowAttribute (const QString &key, const QVariant &attribute)
 

Additional Inherited Members

- Public Slots inherited from WindowAgentBase
void showSystemMenu (const QPoint &pos)
 
void centralize ()
 
void raise ()
 

Detailed Description

WindowAgentBase is the window agent for QtWidgets.

It provides interfaces for QtWidgets and processes some Qt events related to the QWidget instance.

Constructor & Destructor Documentation

◆ WidgetWindowAgent()

WidgetWindowAgent ( QObject *  parent = nullptr)
explicit

Constructs a widget agent, it's better to set the widget to setup as parent.

◆ ~WidgetWindowAgent()

~WidgetWindowAgent ( )
overridedefault

Destructor.

Member Function Documentation

◆ isHitTestVisible()

bool isHitTestVisible ( const QWidget *  w) const

Returns true if the widget can receive mouse events on title bar.

◆ setHitTestVisible()

void setHitTestVisible ( QWidget *  w,
bool  visible = true 
)

Makes the widget able to receive mouse events on title bar if visible is true. You're supposed to make sure that the specified widget w is a child or descendant of the title bar widget.

◆ setSystemButton()

void setSystemButton ( SystemButton  button,
QWidget *  w 
)

Sets the system button of the given type, the system buttons always receive mouse events so you don't need to call setHitTestVisible for them.

◆ setTitleBar()

void setTitleBar ( QWidget *  w)

Sets the title bar widget, all system button and hit-test visible widget references that have been set will be removed.

◆ setup()

bool setup ( QWidget *  w)

Installs the window agent on the widget. The window agent will take over some of the window events, making the window look frameless.

◆ systemButton()

QWidget * systemButton ( SystemButton  button) const

Returns the system button of the given type.

◆ systemButtonChanged

void systemButtonChanged ( SystemButton  button,
QWidget *  w 
)
signal

This signal is emitted when a system button is replaced.

◆ titleBar()

QWidget * titleBar ( ) const

Returns the title bar widget.

◆ titleBarChanged

void titleBarChanged ( QWidget *  w)
signal

This signal is emitted when the title bar widget is replaced.


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