Krita Source Code Documentation
Loading...
Searching...
No Matches
AutoEnabler Struct Reference
+ Inheritance diagram for AutoEnabler:

Signals

void enableWidget (bool value)
 

Public Member Functions

 AutoEnabler (QObject *watched, KisMultinodePropertyInterface *property, QObject *parent)
 
bool eventFilter (QObject *watched, QEvent *event) override
 

Private Attributes

KisMultinodePropertyInterfacem_property
 
QObject * m_watched
 

Detailed Description

Definition at line 59 of file kis_multinode_property.cpp.

Constructor & Destructor Documentation

◆ AutoEnabler()

AutoEnabler::AutoEnabler ( QObject * watched,
KisMultinodePropertyInterface * property,
QObject * parent )
inline

Definition at line 62 of file kis_multinode_property.cpp.

63 : QObject(parent), m_watched(watched), m_property(property)
64 {
65 watched->installEventFilter(this);
66 }
KisMultinodePropertyInterface * m_property

Member Function Documentation

◆ enableWidget

void AutoEnabler::enableWidget ( bool value)
signal

◆ eventFilter()

bool AutoEnabler::eventFilter ( QObject * watched,
QEvent * event )
inlineoverride

Definition at line 68 of file kis_multinode_property.cpp.

68 {
69 if (watched != m_watched) return false;
70 if (!m_property->isIgnored()) return false;
71
72 if (event->type() == QEvent::MouseButtonPress ||
73 event->type() == QEvent::TabletPress) {
74
75 Q_EMIT enableWidget(true);
76 }
77
78 return false;
79 }
virtual bool isIgnored() const =0
void enableWidget(bool value)

References enableWidget(), KisMultinodePropertyInterface::isIgnored(), m_property, and m_watched.

Member Data Documentation

◆ m_property

KisMultinodePropertyInterface* AutoEnabler::m_property
private

Definition at line 85 of file kis_multinode_property.cpp.

◆ m_watched

QObject* AutoEnabler::m_watched
private

Definition at line 84 of file kis_multinode_property.cpp.


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