ObjQt  Diff

Differences From Artifact [0c750e4bdb]:

To Artifact [9d343457e1]:


29
30
31
32
33
34
35
36

37

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@interface QtPushButton: QtAbstractButton
@property (readonly, nonatomic) QPushButton *qPushButton;
@property (nonatomic) QMenu *menu;
@property (nonatomic) bool autoDefault;
@property (nonatomic, getter=isDefault, setter=setDefault:) bool default_;
@property (nonatomic, getter=isFlat) bool flat;

- initWithQAbstractButton: (QAbstractButton *)qAbstractButton OF_UNAVAILABLE;

- initWithQPushButton: (QPushButton *)qPushButton OF_DESIGNATED_INITIALIZER;

- initWithText: (OFString *)text;
- initWithIcon: (QIcon)icon
	  text: (OFString *)text;
@end

namespace ObjQt {

static OF_INLINE QtPushButton *
toOF(QPushButton *qPushButton)
{
	if (qPushButton == NULL)
		return nil;

	return [[[QtPushButton alloc]
	    initWithQPushButton: qPushButton] autorelease];
}

static OF_INLINE QPushButton *
toQt(QtPushButton *pushButton)
{
	return [pushButton qPushButton];
}

}







|
>
|
>
|
|
|

















|



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@interface QtPushButton: QtAbstractButton
@property (readonly, nonatomic) QPushButton *qPushButton;
@property (nonatomic) QMenu *menu;
@property (nonatomic) bool autoDefault;
@property (nonatomic, getter=isDefault, setter=setDefault:) bool default_;
@property (nonatomic, getter=isFlat) bool flat;

- (instancetype)initWithQAbstractButton: (QAbstractButton *)qAbstractButton
    OF_UNAVAILABLE;
- (instancetype)initWithQPushButton: (QPushButton *)qPushButton
    OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithText: (OFString *)text;
- (instancetype)initWithIcon: (QIcon)icon
			text: (OFString *)text;
@end

namespace ObjQt {

static OF_INLINE QtPushButton *
toOF(QPushButton *qPushButton)
{
	if (qPushButton == NULL)
		return nil;

	return [[[QtPushButton alloc]
	    initWithQPushButton: qPushButton] autorelease];
}

static OF_INLINE QPushButton *
toQt(QtPushButton *pushButton)
{
	return pushButton.qPushButton;
}

}