Initial commit

This commit is contained in:
Jonathan Schleifer 2017-04-02 22:51:55 +02:00
commit f38ff5fbc2
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
18 changed files with 1016 additions and 0 deletions

98
QtCore/QtThread.mm Normal file
View file

@ -0,0 +1,98 @@
#import "QtThread.h"
@implementation QtThread: QtObject
- initWithQObject: (QObject*)qObject
{
OF_INVALID_INIT_METHOD
}
- initWithQThread: (QThread*)qThread
{
return [super initWithQObject: qThread];
}
- (QThread*)qThread
{
return qobject_cast<QThread*>(_qObject);
}
- (QAbstractEventDispatcher*)eventDispatcher
{
return [self qThread]->eventDispatcher();
}
- (void)setEventDispatcher: (QAbstractEventDispatcher*)eventDispatcher
{
[self qThread]->setEventDispatcher(eventDispatcher);
}
- (void)exitWithReturnCode: (int)returnCode
{
[self qThread]->exit(returnCode);
}
- (bool)isFinished
{
return [self qThread]->isFinished();
}
- (bool)isInterruptionRequested
{
return [self qThread]->isInterruptionRequested();
}
- (bool)isRunning
{
return [self qThread]->isRunning();
}
- (int)loopLevel
{
return [self qThread]->loopLevel();
}
- (QThread::Priority)priority
{
return [self qThread]->priority();
}
- (void)setPriority: (QThread::Priority)priority
{
[self qThread]->setPriority(priority);
}
- (void)requestInterruption
{
[self qThread]->requestInterruption();
}
- (unsigned int)stackSize
{
return [self qThread]->stackSize();
}
- (void)setStackSize: (unsigned int)stackSize
{
[self qThread]->setStackSize(stackSize);
}
- (bool)waitForMilliseconds: (unsigned long)time
{
return [self qThread]->wait(time);
}
- (void)quit
{
[self qThread]->quit();
}
- (void)startWithPriority: (QThread::Priority)priority
{
[self qThread]->start(priority);
}
- (void)terminate
{
[self qThread]->terminate();
}
@end