22 using namespace KParts;
25 #define KPARTS_EVENT_MAGIC 42
27 class KParts::EventPrivate
30 EventPrivate(
const char *eventName ) :
31 m_eventName(eventName)
34 const char* m_eventName;
39 , d( new EventPrivate(eventName) )
50 return d->m_eventName;
72 class KParts::GUIActivateEventPrivate
75 GUIActivateEventPrivate(
bool activated )
76 : m_bActivated( activated )
79 static const char *s_strGUIActivateEvent;
83 const char *GUIActivateEventPrivate::s_strGUIActivateEvent =
"KParts/GUIActivate";
86 Event( GUIActivateEventPrivate::s_strGUIActivateEvent ),
87 d( new GUIActivateEventPrivate(activated) )
98 return d->m_bActivated;
103 return Event::test( event, GUIActivateEventPrivate::s_strGUIActivateEvent );
109 class KParts::PartActivateEventPrivate
112 PartActivateEventPrivate(
bool activated,
115 m_bActivated( activated ),
120 static const char *s_strPartActivateEvent;
126 const char *PartActivateEventPrivate::s_strPartActivateEvent =
"KParts/PartActivateEvent";
131 Event( PartActivateEventPrivate::s_strPartActivateEvent ),
132 d( new PartActivateEventPrivate(activated,part,widget) )
143 return d->m_bActivated;
158 return Event::test( event, PartActivateEventPrivate::s_strPartActivateEvent );
164 class KParts::PartSelectEventPrivate
167 PartSelectEventPrivate(
bool selected,
170 m_bSelected( selected ),
175 static const char *s_strPartSelectEvent;
181 const char *PartSelectEventPrivate::s_strPartSelectEvent =
182 "KParts/PartSelectEvent";
187 Event( PartSelectEventPrivate::s_strPartSelectEvent ),
188 d( new PartSelectEventPrivate(selected,part,widget) )
199 return d->m_bSelected;
214 return Event::test( event, PartSelectEventPrivate::s_strPartSelectEvent );
static bool test(const QEvent *event)
Event(const char *eventName)
PartSelectEvent(bool selected, Part *part, QWidget *widget)
virtual ~PartActivateEvent()
#define KPARTS_EVENT_MAGIC
static bool test(const QEvent *event)
virtual ~PartSelectEvent()
GUIActivateEvent(bool activated)
PartActivateEvent(bool activated, Part *part, QWidget *widget)
virtual const char * eventName() const
virtual ~GUIActivateEvent()
Base class for all KParts events.
static bool test(const QEvent *event)
static bool test(const QEvent *event)