1// qeventloop.sip generated by MetaSIP 2// 3// This file is part of the QtCore Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QEventLoop : QObject 24{ 25%TypeHeaderCode 26#include <qeventloop.h> 27%End 28 29public: 30 explicit QEventLoop(QObject *parent /TransferThis/ = 0); 31 virtual ~QEventLoop(); 32 33 enum ProcessEventsFlag 34 { 35 AllEvents, 36 ExcludeUserInputEvents, 37 ExcludeSocketNotifiers, 38 WaitForMoreEvents, 39 X11ExcludeTimers, 40 }; 41 42 typedef QFlags<QEventLoop::ProcessEventsFlag> ProcessEventsFlags; 43 bool processEvents(QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents) /ReleaseGIL/; 44 void processEvents(QEventLoop::ProcessEventsFlags flags, int maximumTime) /ReleaseGIL/; 45 int exec(QFlags<QEventLoop::ProcessEventsFlag> flags = AllEvents) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,PyName=exec_,ReleaseGIL/; 46%If (Py_v3) 47 int exec(QFlags<QEventLoop::ProcessEventsFlag> flags = AllEvents) /PostHook=__pyQtPostEventLoopHook__,PreHook=__pyQtPreEventLoopHook__,ReleaseGIL/; 48%End 49 void exit(int returnCode = 0); 50 bool isRunning() const; 51 void wakeUp(); 52 53public slots: 54 void quit(); 55 56public: 57 virtual bool event(QEvent *event); 58}; 59 60QFlags<QEventLoop::ProcessEventsFlag> operator|(QEventLoop::ProcessEventsFlag f1, QFlags<QEventLoop::ProcessEventsFlag> f2); 61 62class QEventLoopLocker 63{ 64%TypeHeaderCode 65#include <qeventloop.h> 66%End 67 68public: 69 QEventLoopLocker() /ReleaseGIL/; 70 explicit QEventLoopLocker(QEventLoop *loop) /ReleaseGIL/; 71 explicit QEventLoopLocker(QThread *thread) /ReleaseGIL/; 72 ~QEventLoopLocker(); 73 74private: 75 QEventLoopLocker(const QEventLoopLocker &); 76}; 77