Qt 4.8
Public Functions | Properties | List of all members
QOpenKODEEventLoopIntegration Class Reference

#include <qopenkodeeventloopintegration.h>

Inheritance diagram for QOpenKODEEventLoopIntegration:
QPlatformEventLoopIntegration

Public Functions

void processInputEvent (const KDEvent *event)
 
 QOpenKODEEventLoopIntegration ()
 
void qtNeedsToProcessEvents ()
 
void quitEventLoop ()
 
void startEventLoop ()
 
- Public Functions inherited from QPlatformEventLoopIntegration
qint64 nextTimerEvent () const
 
 QPlatformEventLoopIntegration ()
 
void setNextTimerEvent (qint64 nextTimerEvent)
 
virtual ~QPlatformEventLoopIntegration ()
 

Properties

KDThread * m_kdThread
 
bool m_quit
 

Additional Inherited Members

- Static Public Functions inherited from QPlatformEventLoopIntegration
static void processEvents ()
 
- Protected Variables inherited from QPlatformEventLoopIntegration
QScopedPointer< QPlatformEventLoopIntegrationPrivated_ptr
 

Detailed Description

Definition at line 53 of file qopenkodeeventloopintegration.h.

Constructors and Destructors

◆ QOpenKODEEventLoopIntegration()

QOpenKODEEventLoopIntegration::QOpenKODEEventLoopIntegration ( )

Definition at line 92 of file qopenkodeeventloopintegration.cpp.

93  : m_quit(false)
94 {
95  m_kdThread = kdThreadSelf();
96  kdInstallCallback(&kdprocessevent,QT_EVENT_WAKEUP_EVENTLOOP,this);
97 }
static const int QT_EVENT_WAKEUP_EVENTLOOP
void kdprocessevent(const KDEvent *event)

Functions

◆ processInputEvent()

void QOpenKODEEventLoopIntegration::processInputEvent ( const KDEvent *  event)

◆ qtNeedsToProcessEvents()

void QOpenKODEEventLoopIntegration::qtNeedsToProcessEvents ( )
virtual

Implements QPlatformEventLoopIntegration.

Definition at line 120 of file qopenkodeeventloopintegration.cpp.

121 {
122  KDEvent *event = kdCreateEvent();
123  event->type = QT_EVENT_WAKEUP_EVENTLOOP;
124  event->userptr = this;
125  kdPostThreadEvent(event,m_kdThread);
126 }
EventRef event
static const int QT_EVENT_WAKEUP_EVENTLOOP

◆ quitEventLoop()

void QOpenKODEEventLoopIntegration::quitEventLoop ( )
virtual

Implements QPlatformEventLoopIntegration.

Definition at line 115 of file qopenkodeeventloopintegration.cpp.

116 {
117  m_quit = true;
118 }

◆ startEventLoop()

void QOpenKODEEventLoopIntegration::startEventLoop ( )
virtual

Implements QPlatformEventLoopIntegration.

Definition at line 99 of file qopenkodeeventloopintegration.cpp.

100 {
101 
102  while(!m_quit) {
103  qint64 msec = nextTimerEvent();
104  const KDEvent *event = kdWaitEvent(msec);
105  if (event) {
106  kdDefaultEvent(event);
107  while ((event = kdWaitEvent(0)) != 0) {
108  kdDefaultEvent(event);
109  }
110  }
112  }
113 }
EventRef event
__int64 qint64
Definition: qglobal.h:942

Properties

◆ m_kdThread

KDThread* QOpenKODEEventLoopIntegration::m_kdThread
private

◆ m_quit

bool QOpenKODEEventLoopIntegration::m_quit
private

Definition at line 64 of file qopenkodeeventloopintegration.h.

Referenced by quitEventLoop(), and startEventLoop().


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