DtkGui
DTK Gui module
载入中...
搜索中...
未找到
Dtk::Gui::DXCBPlatformWindowInterface类 参考
类 Dtk::Gui::DXCBPlatformWindowInterface 继承关系图:
Dtk::Gui::DXCBPlatformWindowInterface 的协作图:

Public 成员函数

 DXCBPlatformWindowInterface (QWindow *window, DPlatformHandle *platformHandle, QObject *parent=nullptr)
 
void enableDXcb (bool redirectContent)
 
bool setWindowBlurArea (const QVector< DPlatformHandle::WMBlurArea > &area)
 DXCBPlatformWindowInterface::setWindowBlurAreaByWM 设置窗口背景的模糊区域,示例:
 
bool setWindowBlurArea (const QList< QPainterPath > &paths)
 
bool setWindowWallpaperPara (const QRect &area, DPlatformHandle::WallpaperScaleMode sMode, DPlatformHandle::WallpaperFillMode fMode)
 
bool autoInputMaskByClipPath () const
 
void setAutoInputMaskByClipPath (bool autoInputMaskByClipPath)
 
WId realWindowId () const
 
void setEnabled (bool enabled) override
 
bool isEnabled () const override
 
void setDisableWindowOverrideCursor (bool disable) override
 
bool isEnabledNoTitlebar () const override
 
bool setEnabledNoTitlebar (bool enable) override
 
int windowRadius () const override
 
void setWindowRadius (int windowRadius) override
 
int borderWidth () const override
 
void setBorderWidth (int borderWidth) override
 
QColor borderColor () const override
 
void setBorderColor (const QColor &borderColor) override
 
int shadowRadius () const override
 
void setShadowRadius (int shadowRadius) override
 
QPoint shadowOffset () const override
 
void setShadowOffset (const QPoint &shadowOffset) override
 
QColor shadowColor () const override
 
void setShadowColor (const QColor &shadowColor) override
 
DPlatformHandle::EffectScene windowEffect () override
 
void setWindowEffect (DPlatformHandle::EffectScenes effectScene) override
 
DPlatformHandle::EffectType windowStartUpEffect () override
 
void setWindowStartUpEffect (DPlatformHandle::EffectTypes effectType) override
 
QPainterPath clipPath () const override
 
void setClipPath (const QPainterPath &clipPath) override
 
QRegion frameMask () const override
 
void setFrameMask (const QRegion &frameMask) override
 
QMargins frameMargins () const override
 
bool translucentBackground () const override
 
void setTranslucentBackground (bool translucentBackground) override
 
bool enableSystemResize () const override
 
void setEnableSystemResize (bool enableSystemResize) override
 
bool enableSystemMove () const override
 
void setEnableSystemMove (bool enableSystemMove) override
 
bool enableBlurWindow () const override
 
void setEnableBlurWindow (bool enableBlurWindow) override
 
- Public 成员函数 继承自 Dtk::Gui::DPlatformWindowInterface
 DPlatformWindowInterface (QWindow *window, DPlatformHandle *platformHandle)
 
QWindow * window () const
 

静态 Public 成员函数

static QString pluginVersion ()
 
static bool isDXcbPlatform ()
 
static bool connectWindowManagerChangedSignal (QObject *object, std::function< void()> slot)
 
static bool connectHasBlurWindowChanged (QObject *object, std::function< void()> slot)
 
static WId windowLeader ()
 

Protected 成员函数

bool eventFilter (QObject *watched, QEvent *event) override
 

额外继承的成员函数

- Protected 属性 继承自 Dtk::Gui::DPlatformWindowInterface
QPointer< QWindow > m_window
 
QPointer< DPlatformHandlem_platformHandle
 

成员函数说明

◆ borderColor()

QColor Dtk::Gui::DXCBPlatformWindowInterface::borderColor ( ) const
overridevirtual

◆ borderWidth()

int Dtk::Gui::DXCBPlatformWindowInterface::borderWidth ( ) const
overridevirtual

◆ clipPath()

QPainterPath Dtk::Gui::DXCBPlatformWindowInterface::clipPath ( ) const
overridevirtual

◆ enableBlurWindow()

bool Dtk::Gui::DXCBPlatformWindowInterface::enableBlurWindow ( ) const
overridevirtual

◆ enableSystemMove()

bool Dtk::Gui::DXCBPlatformWindowInterface::enableSystemMove ( ) const
overridevirtual

◆ enableSystemResize()

bool Dtk::Gui::DXCBPlatformWindowInterface::enableSystemResize ( ) const
overridevirtual

◆ frameMargins()

QMargins Dtk::Gui::DXCBPlatformWindowInterface::frameMargins ( ) const
overridevirtual

◆ frameMask()

QRegion Dtk::Gui::DXCBPlatformWindowInterface::frameMask ( ) const
overridevirtual

◆ isEnabled()

bool Dtk::Gui::DXCBPlatformWindowInterface::isEnabled ( ) const
overridevirtual

◆ isEnabledNoTitlebar()

bool Dtk::Gui::DXCBPlatformWindowInterface::isEnabledNoTitlebar ( ) const
overridevirtual

◆ setBorderColor()

void Dtk::Gui::DXCBPlatformWindowInterface::setBorderColor ( const QColor &  borderColor)
overridevirtual

◆ setBorderWidth()

void Dtk::Gui::DXCBPlatformWindowInterface::setBorderWidth ( int  borderWidth)
overridevirtual

◆ setClipPath()

void Dtk::Gui::DXCBPlatformWindowInterface::setClipPath ( const QPainterPath &  clipPath)
overridevirtual

◆ setDisableWindowOverrideCursor()

void Dtk::Gui::DXCBPlatformWindowInterface::setDisableWindowOverrideCursor ( bool  disable)
overridevirtual

◆ setEnableBlurWindow()

void Dtk::Gui::DXCBPlatformWindowInterface::setEnableBlurWindow ( bool  enableBlurWindow)
overridevirtual

◆ setEnabled()

void Dtk::Gui::DXCBPlatformWindowInterface::setEnabled ( bool  enabled)
overridevirtual

◆ setEnabledNoTitlebar()

bool Dtk::Gui::DXCBPlatformWindowInterface::setEnabledNoTitlebar ( bool  enable)
overridevirtual

◆ setEnableSystemMove()

void Dtk::Gui::DXCBPlatformWindowInterface::setEnableSystemMove ( bool  enableSystemMove)
overridevirtual

◆ setEnableSystemResize()

void Dtk::Gui::DXCBPlatformWindowInterface::setEnableSystemResize ( bool  enableSystemResize)
overridevirtual

◆ setFrameMask()

void Dtk::Gui::DXCBPlatformWindowInterface::setFrameMask ( const QRegion &  frameMask)
overridevirtual

◆ setShadowColor()

void Dtk::Gui::DXCBPlatformWindowInterface::setShadowColor ( const QColor &  shadowColor)
overridevirtual

◆ setShadowOffset()

void Dtk::Gui::DXCBPlatformWindowInterface::setShadowOffset ( const QPoint &  shadowOffset)
overridevirtual

◆ setShadowRadius()

void Dtk::Gui::DXCBPlatformWindowInterface::setShadowRadius ( int  shadowRadius)
overridevirtual

◆ setTranslucentBackground()

void Dtk::Gui::DXCBPlatformWindowInterface::setTranslucentBackground ( bool  translucentBackground)
overridevirtual

◆ setWindowBlurArea()

bool Dtk::Gui::DXCBPlatformWindowInterface::setWindowBlurArea ( const QVector< DPlatformHandle::WMBlurArea > &  area)

DXCBPlatformWindowInterface::setWindowBlurAreaByWM 设置窗口背景的模糊区域,示例:

QWindow w;
QVector<DXCBPlatformWindowInterface::WMBlurArea> area_list;
DXCBPlatformWindowInterface::WMBlurArea area;
area.x = 50;
area.y = 50;
area.width = 200;
area.height = 200;
area.xRadius = 10;
area.yRaduis = 10;
area_list.append(area);
DXCBPlatformWindowInterface::setWindowBlurAreaByWM(&w, area_list);
QSurfaceFormat format = w.format();
format.setAlphaBufferSize(8);
w.setFormat(format);
w.resize(300, 300);
w.show();

window 目标窗口对象 area 模糊区域,此区域范围内的窗口背景将填充为窗口后面内容模糊之后的图像

返回
如果设置成功则返回 true,否则返回 false
注解
对于需要显示模糊背景的窗口,需要将其 QSurfaceFormat 的 alpha 通道设置为8
调用此接口设置窗口背景模糊区域后将覆盖之前所设置的区域,包括调用 setWindowBlurAreaByWM(QWindow *, const QList<QPainterPath> &) 所设置的区域
建议使用 DBlurEffectWidget 实现窗口背景模糊效果
此功能依赖于窗口管理器的实现,目前仅支持 deepin-wm 和 kwin 这两个窗口管理器
参见
Dtk::Widget::DBlurEffectWidget
QSurfaceFormat::setAlphaBufferSize
QWindow::setFormat
DWindowManagerHelper::hasBlurWindow
DXCBPlatformWindowInterface::setWindowBlurAreaByWM(QWindow *, const QList<QPainterPath> &)

◆ setWindowEffect()

void Dtk::Gui::DXCBPlatformWindowInterface::setWindowEffect ( DPlatformHandle::EffectScenes  effectScene)
overridevirtual

◆ setWindowRadius()

void Dtk::Gui::DXCBPlatformWindowInterface::setWindowRadius ( int  windowRadius)
overridevirtual

◆ setWindowStartUpEffect()

void Dtk::Gui::DXCBPlatformWindowInterface::setWindowStartUpEffect ( DPlatformHandle::EffectTypes  effectType)
overridevirtual

◆ shadowColor()

QColor Dtk::Gui::DXCBPlatformWindowInterface::shadowColor ( ) const
overridevirtual

◆ shadowOffset()

QPoint Dtk::Gui::DXCBPlatformWindowInterface::shadowOffset ( ) const
overridevirtual

◆ shadowRadius()

int Dtk::Gui::DXCBPlatformWindowInterface::shadowRadius ( ) const
overridevirtual

◆ translucentBackground()

bool Dtk::Gui::DXCBPlatformWindowInterface::translucentBackground ( ) const
overridevirtual

◆ windowEffect()

DPlatformHandle::EffectScene Dtk::Gui::DXCBPlatformWindowInterface::windowEffect ( )
overridevirtual

◆ windowRadius()

int Dtk::Gui::DXCBPlatformWindowInterface::windowRadius ( ) const
overridevirtual

◆ windowStartUpEffect()

DPlatformHandle::EffectType Dtk::Gui::DXCBPlatformWindowInterface::windowStartUpEffect ( )
overridevirtual

该类的文档由以下文件生成: