Initial commit
This commit is contained in:
commit
f38ff5fbc2
18 changed files with 1016 additions and 0 deletions
15
QtCore/QtChildEvent.h
Normal file
15
QtCore/QtChildEvent.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#import "QtEvent.h"
|
||||
|
||||
@class QtObject;
|
||||
|
||||
@interface QtChildEvent: QtEvent
|
||||
@property (readonly) QChildEvent *qChildEvent;
|
||||
@property (readonly, getter=isAdded) bool added;
|
||||
@property (readonly, retain) QtObject *child;
|
||||
@property (readonly, getter=isPolished) bool polished;
|
||||
@property (readonly, getter=isRemoved) bool removed;
|
||||
|
||||
- initWithQChildEvent: (QChildEvent*)qChildEvent;
|
||||
- initWithType: (QChildEvent::Type)type
|
||||
child: (QtObject*)child;
|
||||
@end
|
53
QtCore/QtChildEvent.mm
Normal file
53
QtCore/QtChildEvent.mm
Normal file
|
@ -0,0 +1,53 @@
|
|||
#import "QtChildEvent.h"
|
||||
#import "QtObject.h"
|
||||
|
||||
@implementation QtChildEvent
|
||||
- initWithQEvent: (QEvent*)event
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- initWithQChildEvent: (QChildEvent*)event
|
||||
{
|
||||
return [super initWithQEvent: event];
|
||||
}
|
||||
|
||||
- initWithType: (QChildEvent::Type)type
|
||||
child: (QtObject*)child
|
||||
{
|
||||
try {
|
||||
return [self initWithQChildEvent:
|
||||
new QChildEvent(type, [child qObject])];
|
||||
} catch (const std::bad_alloc &e) {
|
||||
self = [super initWithQEvent: NULL];
|
||||
[self release];
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
- (QChildEvent*)qChildEvent
|
||||
{
|
||||
return dynamic_cast<QChildEvent*>(_qEvent);
|
||||
}
|
||||
|
||||
- (bool)isAdded
|
||||
{
|
||||
return [self qChildEvent]->added();
|
||||
}
|
||||
|
||||
- (QtObject*)child
|
||||
{
|
||||
return [[[QtObject alloc]
|
||||
initWithQObject: [self qChildEvent]->child()] autorelease];
|
||||
}
|
||||
|
||||
- (bool)isPolished
|
||||
{
|
||||
return [self qChildEvent]->polished();
|
||||
}
|
||||
|
||||
- (bool)isRemoved
|
||||
{
|
||||
return [self qChildEvent]->removed();
|
||||
}
|
||||
@end
|
17
QtCore/QtCoreApplication.h
Normal file
17
QtCore/QtCoreApplication.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#import "QtObject.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
@interface QtCoreApplication: QtObject
|
||||
@property (readonly) QCoreApplication *qCoreApplication;
|
||||
@property (copy) OFString *applicationName, *applicationVersion;
|
||||
@property (copy) OFString *organizationDomain, *organizationName;
|
||||
@property (getter=isQuitLockEnabled) bool quitLockEnabled;
|
||||
|
||||
- initWithQCoreApplication: (QCoreApplication*)qCoreApplication;
|
||||
- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject;
|
||||
- (void)quit;
|
||||
- (void)removeNativeEventFilter: (QAbstractNativeEventFilter*)filterObject;
|
||||
- (bool)sendEvent: (QtEvent*)event
|
||||
receiver: (QtObject*)receiver;
|
||||
@end
|
97
QtCore/QtCoreApplication.mm
Normal file
97
QtCore/QtCoreApplication.mm
Normal file
|
@ -0,0 +1,97 @@
|
|||
#import "QtCoreApplication.h"
|
||||
#import "QtEvent.h"
|
||||
|
||||
#import "helpers.h"
|
||||
|
||||
@implementation QtCoreApplication
|
||||
- initWithQObject: (QObject*)qObject
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- initWithQCoreApplication: (QCoreApplication*)qCoreApplication
|
||||
{
|
||||
return [super initWithQObject: qCoreApplication];
|
||||
}
|
||||
|
||||
- (QCoreApplication*)qCoreApplication
|
||||
{
|
||||
return qobject_cast<QCoreApplication*>(_qObject);
|
||||
}
|
||||
|
||||
- (OFString*)applicationName
|
||||
{
|
||||
return QToOFString([self qCoreApplication]->applicationName());
|
||||
}
|
||||
|
||||
- (void)setApplicationName: (OFString*)applicationName
|
||||
{
|
||||
[self qCoreApplication]->setApplicationName(
|
||||
OFToQString(applicationName));
|
||||
}
|
||||
|
||||
- (OFString*)applicationVersion
|
||||
{
|
||||
return QToOFString([self qCoreApplication]->applicationVersion());
|
||||
}
|
||||
|
||||
- (void)installNativeEventFilter: (QAbstractNativeEventFilter*)filterObject
|
||||
{
|
||||
[self qCoreApplication]->installNativeEventFilter(filterObject);
|
||||
}
|
||||
|
||||
- (void)setApplicationVersion: (OFString*)applicationVersion
|
||||
{
|
||||
[self qCoreApplication]->setApplicationVersion(
|
||||
OFToQString(applicationVersion));
|
||||
}
|
||||
|
||||
- (OFString*)organizationDomain
|
||||
{
|
||||
return QToOFString([self qCoreApplication]->organizationDomain());
|
||||
}
|
||||
|
||||
- (void)setOrganizationDomain: (OFString*)organizationDomain
|
||||
{
|
||||
[self qCoreApplication]->setOrganizationDomain(
|
||||
OFToQString(organizationDomain));
|
||||
}
|
||||
|
||||
- (OFString*)organizationName
|
||||
{
|
||||
return QToOFString([self qCoreApplication]->organizationName());
|
||||
}
|
||||
|
||||
- (void)setOrganizationName: (OFString*)organizationName
|
||||
{
|
||||
[self qCoreApplication]->setOrganizationName(
|
||||
OFToQString(organizationName));
|
||||
}
|
||||
|
||||
- (void)quit
|
||||
{
|
||||
[self qCoreApplication]->quit();
|
||||
}
|
||||
|
||||
- (bool)isQuitLockEnabled
|
||||
{
|
||||
return [self qCoreApplication]->isQuitLockEnabled();
|
||||
}
|
||||
|
||||
- (void)setQuitLockEnabled: (bool)quitLockEnabled
|
||||
{
|
||||
[self qCoreApplication]->setQuitLockEnabled(quitLockEnabled);
|
||||
}
|
||||
|
||||
- (void)removeNativeEventFilter: (QAbstractNativeEventFilter*)filterObject
|
||||
{
|
||||
[self qCoreApplication]->removeNativeEventFilter(filterObject);
|
||||
}
|
||||
|
||||
- (bool)sendEvent: (QtEvent*)event
|
||||
receiver: (QtObject*)receiver
|
||||
{
|
||||
return [self qCoreApplication]->notify(
|
||||
[receiver qObject], [event qEvent]);
|
||||
}
|
||||
@end
|
22
QtCore/QtEvent.h
Normal file
22
QtCore/QtEvent.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#import <ObjFW/ObjFW.h>
|
||||
|
||||
#import "QtOwnershipManaging.h"
|
||||
|
||||
#include <QEvent>
|
||||
|
||||
@interface QtEvent: OFObject <QtOwnershipManaging>
|
||||
{
|
||||
QEvent *_qEvent;
|
||||
bool _ownsEvent;
|
||||
}
|
||||
|
||||
@property (readonly) QEvent *qEvent;
|
||||
@property (getter=isAccepted) bool accepted;
|
||||
@property (readonly, getter=isSpontaneous) bool spontaneous;
|
||||
@property (readonly) QEvent::Type type;
|
||||
|
||||
+ (int)registerEventType: (int)hint;
|
||||
- initWithQEvent: (QEvent*)qEvent;
|
||||
- (void)accept;
|
||||
- (void)ignore;
|
||||
@end
|
74
QtCore/QtEvent.mm
Normal file
74
QtCore/QtEvent.mm
Normal file
|
@ -0,0 +1,74 @@
|
|||
#import "QtEvent.h"
|
||||
|
||||
@implementation QtEvent
|
||||
@synthesize qEvent = _eEvent;
|
||||
|
||||
+ (int)registerEventType: (int)hint
|
||||
{
|
||||
return QEvent::registerEventType(hint);
|
||||
}
|
||||
|
||||
- init
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- initWithQEvent: (QEvent*)qEvent
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
_qEvent = qEvent;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_ownsEvent)
|
||||
delete _qEvent;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)takeOwnership
|
||||
{
|
||||
OF_ENSURE(!_ownsEvent);
|
||||
_ownsEvent = true;
|
||||
}
|
||||
|
||||
- (void)giveUpOwnership
|
||||
{
|
||||
OF_ENSURE(_ownsEvent);
|
||||
_ownsEvent = false;
|
||||
}
|
||||
|
||||
- (void)accept
|
||||
{
|
||||
_qEvent->accept();
|
||||
}
|
||||
|
||||
- (void)ignore
|
||||
{
|
||||
_qEvent->ignore();
|
||||
}
|
||||
|
||||
- (bool)isAccepted
|
||||
{
|
||||
return _qEvent->isAccepted();
|
||||
}
|
||||
|
||||
- (void)setAccepted: (bool)accepted
|
||||
{
|
||||
_qEvent->setAccepted(accepted);
|
||||
}
|
||||
|
||||
- (bool)isSpontaneous
|
||||
{
|
||||
return _qEvent->spontaneous();
|
||||
}
|
||||
|
||||
- (QEvent::Type)type
|
||||
{
|
||||
return _qEvent->type();
|
||||
}
|
||||
@end
|
60
QtCore/QtObject.h
Normal file
60
QtCore/QtObject.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
#import <ObjFW/ObjFW.h>
|
||||
|
||||
#import "QtOwnershipManaging.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@class QtEvent;
|
||||
@class QtThread;
|
||||
|
||||
@interface QtObject: OFObject <QtOwnershipManaging>
|
||||
{
|
||||
QObject *_qObject;
|
||||
bool _ownsObject;
|
||||
}
|
||||
|
||||
@property (readonly) QObject *qObject;
|
||||
@property (readonly) const QMetaObject *metaObject;
|
||||
@property (retain) QtObject *parent;
|
||||
@property (copy) OFString *objectName;
|
||||
|
||||
- initWithQObject: (QObject*)qObject;
|
||||
- (bool)setBlockSignals: (bool)block;
|
||||
- (OFArray OF_GENERIC(QtObject*)*)children;
|
||||
- (QMetaObject::Connection)connectSignal: (OFString*)signal
|
||||
sender: (QtObject*)sender
|
||||
method: (OFString*)method
|
||||
type: (Qt::ConnectionType)type;
|
||||
- (bool)disconnectSignal: (OFString*)signal
|
||||
receiver: (QtObject*)receiver
|
||||
method: (OFString*)method;
|
||||
- (bool)disconnectAllSignalsForReceiver: (QtObject*)receiver
|
||||
method: (OFString*)method;
|
||||
- (void)dumpObjectInfo;
|
||||
- (void)dumpObjectTree;
|
||||
- (OFArray OF_GENERIC(OFDataArray*)*)dynamicPropertyNames;
|
||||
- (bool)handleEvent: (QtEvent*)event;
|
||||
- (bool)filterEvent: (QtEvent*)event
|
||||
forObject: (QtObject*)watched;
|
||||
// MISSING: T findChild(const QString &name = QString(),
|
||||
// Qt::FindChildOptions options = Qt::FindChildrenRecursively) const;
|
||||
// MISSING QList<T> findChildren(const QString &name = QString(),
|
||||
// Qt::FindChildOptions options = Qt::FindChildrenRecursively) const;
|
||||
// MISSING: QList<T> findChildren(const QRegExp ®Exp,
|
||||
// Qt::FindChildOptions options = Qt::FindChildrenRecursively) const;
|
||||
- (bool)inheritsClassWithName: (OFString*)className;
|
||||
- (void)installEventFilter: (QtObject*)filterObj;
|
||||
- (bool)isWidgetType;
|
||||
- (bool)isWindowType;
|
||||
- (void)killTimerWithID: (int)ID;
|
||||
- (void)moveToThread: (QtThread*)targetThread;
|
||||
- (QVariant)propertyForName: (OFString*)name;
|
||||
- (void)removeEventFilter: (QtObject*)obj;
|
||||
- (bool)setProperty: (QVariant&)value
|
||||
forName: (OFString*)name;
|
||||
- (bool)signalsBlocked;
|
||||
- (int)startTimerWithInterval: (int)interval
|
||||
type: (Qt::TimerType)type;
|
||||
- (QtThread*)thread;
|
||||
- (void)deleteLater;
|
||||
@end
|
225
QtCore/QtObject.mm
Normal file
225
QtCore/QtObject.mm
Normal file
|
@ -0,0 +1,225 @@
|
|||
#import "QtObject.h"
|
||||
#import "QtEvent.h"
|
||||
#import "QtThread.h"
|
||||
|
||||
#import "helpers.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
@implementation QtObject
|
||||
@synthesize qObject = _qObject;
|
||||
|
||||
- init
|
||||
{
|
||||
OF_INVALID_INIT_METHOD
|
||||
}
|
||||
|
||||
- initWithQObject: (QObject*)qObject
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
_qObject = qObject;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (_ownsObject)
|
||||
delete _qObject;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)takeOwnership
|
||||
{
|
||||
OF_ENSURE(!_ownsObject);
|
||||
_ownsObject = true;
|
||||
}
|
||||
|
||||
- (void)giveUpOwnership
|
||||
{
|
||||
OF_ENSURE(_ownsObject);
|
||||
_ownsObject = false;
|
||||
}
|
||||
|
||||
- (OFString*)objectName
|
||||
{
|
||||
return QToOFString(_qObject->objectName());
|
||||
}
|
||||
|
||||
- (void)setObjectName: (OFString*)objectName
|
||||
{
|
||||
_qObject->setObjectName(OFToQString(objectName));
|
||||
}
|
||||
|
||||
- (bool)setBlockSignals: (bool)block
|
||||
{
|
||||
return _qObject->blockSignals(block);
|
||||
}
|
||||
|
||||
- (OFArray OF_GENERIC(QtObject*)*)children
|
||||
{
|
||||
const QObjectList &qChildren = _qObject->children();
|
||||
OFMutableArray *children = [OFMutableArray arrayWithCapacity:
|
||||
qChildren.count()];
|
||||
void *pool = objc_autoreleasePoolPush();
|
||||
|
||||
for (QObject *qChild: qChildren)
|
||||
[children addObject:
|
||||
[[[QtObject alloc] initWithQObject: qChild] autorelease]];
|
||||
|
||||
objc_autoreleasePoolPop(pool);
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
- (QMetaObject::Connection)connectSignal: (OFString*)signal
|
||||
sender: (QtObject*)sender
|
||||
method: (OFString*)method
|
||||
type: (Qt::ConnectionType)type
|
||||
{
|
||||
return _qObject->connect([sender qObject],
|
||||
[signal UTF8String], [method UTF8String], type);
|
||||
}
|
||||
|
||||
- (bool)disconnectSignal: (OFString*)signal
|
||||
receiver: (QtObject*)receiver
|
||||
method: (OFString*)method
|
||||
{
|
||||
return _qObject->disconnect([signal UTF8String], [receiver qObject],
|
||||
[method UTF8String]);
|
||||
}
|
||||
|
||||
- (bool)disconnectAllSignalsForReceiver: (QtObject*)receiver
|
||||
method: (OFString*)method
|
||||
{
|
||||
return _qObject->disconnect([receiver qObject], [method UTF8String]);
|
||||
}
|
||||
|
||||
- (void)dumpObjectInfo
|
||||
{
|
||||
_qObject->dumpObjectInfo();
|
||||
}
|
||||
|
||||
- (void)dumpObjectTree
|
||||
{
|
||||
_qObject->dumpObjectTree();
|
||||
}
|
||||
|
||||
- (OFArray OF_GENERIC(OFDataArray*)*)dynamicPropertyNames
|
||||
{
|
||||
const QList<QByteArray> &qDynamicPropertyNames =
|
||||
_qObject->dynamicPropertyNames();
|
||||
OFMutableArray *dynamicPropertyNames =
|
||||
[OFMutableArray arrayWithCapacity: qDynamicPropertyNames.count()];
|
||||
void *pool = objc_autoreleasePoolPush();
|
||||
|
||||
for (const QByteArray &qDynamicPropertyName: qDynamicPropertyNames) {
|
||||
OFDataArray *dynamicPropertyName = [OFDataArray dataArray];
|
||||
[dynamicPropertyName addItems: qDynamicPropertyName.data()
|
||||
count: qDynamicPropertyName.count()];
|
||||
[dynamicPropertyNames addObject: dynamicPropertyName];
|
||||
}
|
||||
|
||||
objc_autoreleasePoolPop(pool);
|
||||
|
||||
return dynamicPropertyNames;
|
||||
}
|
||||
|
||||
- (bool)handleEvent: (QtEvent*)event
|
||||
{
|
||||
return _qObject->event([event qEvent]);
|
||||
}
|
||||
|
||||
- (bool)filterEvent: (QtEvent*)event
|
||||
forObject: (QtObject*)watched
|
||||
{
|
||||
return _qObject->eventFilter([watched qObject], [event qEvent]);
|
||||
}
|
||||
|
||||
- (bool)inheritsClassWithName: (OFString*)className
|
||||
{
|
||||
return _qObject->inherits([className UTF8String]);
|
||||
}
|
||||
|
||||
- (void)installEventFilter: (QtObject*)filterObj
|
||||
{
|
||||
_qObject->installEventFilter([filterObj qObject]);
|
||||
}
|
||||
|
||||
- (bool)isWidgetType
|
||||
{
|
||||
return _qObject->isWidgetType();
|
||||
}
|
||||
|
||||
- (bool)isWindowType
|
||||
{
|
||||
return _qObject->isWindowType();
|
||||
}
|
||||
|
||||
- (void)killTimerWithID: (int)ID
|
||||
{
|
||||
_qObject->killTimer(ID);
|
||||
}
|
||||
|
||||
- (const QMetaObject*)metaObject
|
||||
{
|
||||
return _qObject->metaObject();
|
||||
}
|
||||
|
||||
- (void)moveToThread: (QtThread*)targetThread
|
||||
{
|
||||
_qObject->moveToThread([targetThread qThread]);
|
||||
}
|
||||
|
||||
- (QtObject*)parent
|
||||
{
|
||||
return [[[QtObject alloc]
|
||||
initWithQObject: _qObject->parent()] autorelease];
|
||||
}
|
||||
|
||||
- (void)setParent: (QtObject*)parent
|
||||
{
|
||||
_qObject->setParent([parent qObject]);
|
||||
}
|
||||
|
||||
- (QVariant)propertyForName: (OFString*)name
|
||||
{
|
||||
return _qObject->property([name UTF8String]);
|
||||
}
|
||||
|
||||
- (void)removeEventFilter: (QtObject*)obj
|
||||
{
|
||||
_qObject->removeEventFilter([obj qObject]);
|
||||
}
|
||||
|
||||
- (bool)setProperty: (QVariant&)value
|
||||
forName: (OFString*)name
|
||||
{
|
||||
return _qObject->setProperty([name UTF8String], value);
|
||||
}
|
||||
|
||||
- (bool)signalsBlocked
|
||||
{
|
||||
return _qObject->signalsBlocked();
|
||||
}
|
||||
|
||||
- (int)startTimerWithInterval: (int)interval
|
||||
type: (Qt::TimerType)type
|
||||
{
|
||||
return _qObject->startTimer(interval, type);
|
||||
}
|
||||
|
||||
- (QtThread*)thread
|
||||
{
|
||||
return [[[QtThread alloc]
|
||||
initWithQThread: _qObject->thread()] autorelease];
|
||||
}
|
||||
|
||||
- (void)deleteLater
|
||||
{
|
||||
OF_ENSURE(!_ownsObject);
|
||||
_qObject->deleteLater();
|
||||
}
|
||||
@end
|
22
QtCore/QtThread.h
Normal file
22
QtCore/QtThread.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#import "QtObject.h"
|
||||
|
||||
#include <QThread>
|
||||
|
||||
@interface QtThread: QtObject
|
||||
@property (readonly) QThread *qThread;
|
||||
@property QAbstractEventDispatcher *eventDispatcher;
|
||||
@property (readonly, getter=isFinished) bool finished;
|
||||
@property (readonly, getter=isInterruptionRequested) bool interruptionRequested;
|
||||
@property (readonly, getter=isRunning) bool running;
|
||||
@property (readonly) int loopLevel;
|
||||
@property QThread::Priority priority;
|
||||
@property unsigned int stackSize;
|
||||
|
||||
- initWithQThread: (QThread*)qThread;
|
||||
- (void)exitWithReturnCode: (int)returnCode;
|
||||
- (void)requestInterruption;
|
||||
- (bool)waitForMilliseconds: (unsigned long)time;
|
||||
- (void)quit;
|
||||
- (void)startWithPriority: (QThread::Priority)priority;
|
||||
- (void)terminate;
|
||||
@end
|
98
QtCore/QtThread.mm
Normal file
98
QtCore/QtThread.mm
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue