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

53
QtCore/QtChildEvent.mm Normal file
View 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