Krita Source Code Documentation
Loading...
Searching...
No Matches
PlatformWindowDetectionEventFilter Class Reference
+ Inheritance diagram for PlatformWindowDetectionEventFilter:

Signals

void sigPlatformWindowCreated ()
 
void sigPlatformWindowDestroyed ()
 

Public Member Functions

 PlatformWindowDetectionEventFilter (QObject *watched, QObject *parent=nullptr)
 

Private Member Functions

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

Private Attributes

QObject * m_watched = nullptr
 

Detailed Description

Definition at line 78 of file KisWaylandSurfaceColorManager.cpp.

Constructor & Destructor Documentation

◆ PlatformWindowDetectionEventFilter()

PlatformWindowDetectionEventFilter::PlatformWindowDetectionEventFilter ( QObject * watched,
QObject * parent = nullptr )
inline

Definition at line 82 of file KisWaylandSurfaceColorManager.cpp.

83 : QObject(parent)
84 , m_watched(watched)
85 {
86 }

Member Function Documentation

◆ eventFilter()

bool PlatformWindowDetectionEventFilter::eventFilter ( QObject * watched,
QEvent * event )
inlineoverrideprivate

Definition at line 93 of file KisWaylandSurfaceColorManager.cpp.

93 {
94 if (watched != m_watched) return false;
95
96 if (event->type() == QEvent::PlatformSurface) {
97 QPlatformSurfaceEvent *pevent = static_cast<QPlatformSurfaceEvent*>(event);
98 if (pevent->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) {
100 } else if (pevent->surfaceEventType() == QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed) {
102 }
103 }
104
105 return false;
106 }

References m_watched, sigPlatformWindowCreated(), and sigPlatformWindowDestroyed().

◆ sigPlatformWindowCreated

void PlatformWindowDetectionEventFilter::sigPlatformWindowCreated ( )
signal

◆ sigPlatformWindowDestroyed

void PlatformWindowDetectionEventFilter::sigPlatformWindowDestroyed ( )
signal

Member Data Documentation

◆ m_watched

QObject* PlatformWindowDetectionEventFilter::m_watched = nullptr
private

Definition at line 108 of file KisWaylandSurfaceColorManager.cpp.


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