2014-08-24 01:50:11 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/evtloop.h
|
2014-08-29 03:37:46 +00:00
|
|
|
// Author: Peter Most, Javier Torres, Mariano Reingart, Sean D'Epagnier
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
2014-08-24 01:50:11 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_QT_EVTLOOP_H_
|
|
|
|
#define _WX_QT_EVTLOOP_H_
|
|
|
|
|
2019-01-24 08:08:12 +00:00
|
|
|
class wxQtIdleTimer;
|
2019-01-21 16:11:28 +00:00
|
|
|
class QEventLoop;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2018-09-25 17:52:58 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxQtEventLoopBase : public wxEventLoopBase
|
2014-08-24 01:50:11 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxQtEventLoopBase();
|
|
|
|
~wxQtEventLoopBase();
|
|
|
|
|
2019-01-21 14:48:37 +00:00
|
|
|
virtual int DoRun() wxOVERRIDE;
|
|
|
|
virtual void ScheduleExit(int rc = 0) wxOVERRIDE;
|
|
|
|
virtual bool Pending() const wxOVERRIDE;
|
|
|
|
virtual bool Dispatch() wxOVERRIDE;
|
|
|
|
virtual int DispatchTimeout(unsigned long timeout) wxOVERRIDE;
|
|
|
|
virtual void WakeUp() wxOVERRIDE;
|
|
|
|
virtual void DoYieldFor(long eventsToProcess) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-01-21 14:53:43 +00:00
|
|
|
void ScheduleIdleCheck();
|
|
|
|
|
2014-08-24 01:50:11 +00:00
|
|
|
private:
|
2019-01-21 16:11:28 +00:00
|
|
|
QEventLoop *m_qtEventLoop;
|
2019-01-24 08:08:12 +00:00
|
|
|
wxObjectDataPtr<wxQtIdleTimer> m_qtIdleTimer;
|
|
|
|
|
2014-08-24 01:50:11 +00:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxQtEventLoopBase);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#if wxUSE_GUI
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxQtEventLoopBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxGUIEventLoop();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
|
|
|
#endif // _WX_QT_EVTLOOP_H_
|