ObjQt  Check-in [4c1be2eafb]

Overview
Comment:Add QtGraphicsWidget
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4c1be2eafba8952b9ed39a328ac4dca149da210ee6a4f9d97fecff6e1b95c4c0
User & Date: js on 2017-11-20 01:13:20
Other Links: manifest | tags
Context
2018-03-10
22:46
Update buildsys check-in: 9c3e11301a user: js tags: trunk
2017-11-20
01:13
Add QtGraphicsWidget check-in: 4c1be2eafb user: js tags: trunk
2017-11-19
15:05
Make more things properties check-in: ddbc7922c5 user: js tags: trunk
Changes

Modified src/QtGui/QtPaintDevice.h from [633824ebd6] to [44435cb862].

47
48
49
50
51
52
53
54
55
56
57
58
59
@interface QtPaintDevice: OFObject <QtPaintDevice>
@property (readonly, nonatomic) QObject *qObject;
@end

namespace ObjQt {

static OF_INLINE QPaintDevice *
toQt(QtPaintDevice *paintDevice)
{
	return [paintDevice qPaintDevice];
}

}







|





47
48
49
50
51
52
53
54
55
56
57
58
59
@interface QtPaintDevice: OFObject <QtPaintDevice>
@property (readonly, nonatomic) QObject *qObject;
@end

namespace ObjQt {

static OF_INLINE QPaintDevice *
toQt(id <QtPaintDevice> paintDevice)
{
	return [paintDevice qPaintDevice];
}

}

Modified src/QtWidgets/Makefile from [917c60f194] to [9d58ba8033].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
include ../../extra.mk

STATIC_PIC_LIB_NOINST = ${QTWIDGETS_LIB_A}
STATIC_LIB_NOINST = ${QTWIDGETS_A}

SRCS = QtAbstractButton.mm	\
       QtAction.mm		\
       QtApplication.mm		\

       QtPushButton.mm           \
       QtWidget.mm

include ../../buildsys.mk

CPPFLAGS += -I. -I../QtCore -I../QtGui -I../common








>
|





1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
include ../../extra.mk

STATIC_PIC_LIB_NOINST = ${QTWIDGETS_LIB_A}
STATIC_LIB_NOINST = ${QTWIDGETS_A}

SRCS = QtAbstractButton.mm	\
       QtAction.mm		\
       QtApplication.mm		\
       QtGraphicsWidget.mm	\
       QtPushButton.mm		\
       QtWidget.mm

include ../../buildsys.mk

CPPFLAGS += -I. -I../QtCore -I../QtGui -I../common

Modified src/QtWidgets/QtAbstractButton.mm from [16048af6f6] to [f1590706d2].

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
- (of_dimension_t)iconSize
{
	return toOF(toQt(self)->iconSize());
}

- (void)setIconSize: (of_dimension_t)iconSize
{
	toQt(self)->setIconSize(toQt(iconSize));
}

- (QKeySequence)shortcut
{
	return toQt(self)->shortcut();
}








|







127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
- (of_dimension_t)iconSize
{
	return toOF(toQt(self)->iconSize());
}

- (void)setIconSize: (of_dimension_t)iconSize
{
	toQt(self)->setIconSize(toQt(iconSize).toSize());
}

- (QKeySequence)shortcut
{
	return toQt(self)->shortcut();
}

Modified src/QtWidgets/QtApplication.mm from [579279b5d5] to [791c79a84e].

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
- (of_dimension_t)globalStrut
{
	return toOF(toQt(self)->globalStrut());
}

- (void)setGlobalStrut: (of_dimension_t)globalStrut
{
	toQt(self)->setGlobalStrut(toQt(globalStrut));
}

- (int)keyboardInputInterval
{
	return toQt(self)->keyboardInputInterval();
}








|







77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
- (of_dimension_t)globalStrut
{
	return toOF(toQt(self)->globalStrut());
}

- (void)setGlobalStrut: (of_dimension_t)globalStrut
{
	toQt(self)->setGlobalStrut(toQt(globalStrut).toSize());
}

- (int)keyboardInputInterval
{
	return toQt(self)->keyboardInputInterval();
}

Added src/QtWidgets/QtGraphicsWidget.h version [a89fbd8595].

Added src/QtWidgets/QtGraphicsWidget.mm version [ff29f683eb].

Modified src/QtWidgets/QtWidget.mm from [e8759548d3] to [e7bf98bf6f].

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
- (of_dimension_t)baseSize
{
	return toOF(toQt(self)->baseSize());
}

- (void)setBaseSize: (of_dimension_t)baseSize
{
	toQt(self)->setBaseSize(toQt(baseSize));
}

- (of_rectangle_t)childrenRect
{
	return toOF(toQt(self)->childrenRect());
}








|







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
- (of_dimension_t)baseSize
{
	return toOF(toQt(self)->baseSize());
}

- (void)setBaseSize: (of_dimension_t)baseSize
{
	toQt(self)->setBaseSize(toQt(baseSize).toSize());
}

- (of_rectangle_t)childrenRect
{
	return toOF(toQt(self)->childrenRect());
}

193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
- (of_rectangle_t)geometry
{
	return toOF(toQt(self)->geometry());
}

- (void)setGeometry: (of_rectangle_t)geometry
{
	toQt(self)->setGeometry(toQt(geometry));
}

- (int)height
{
	return toQt(self)->height();
}








|







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
- (of_rectangle_t)geometry
{
	return toOF(toQt(self)->geometry());
}

- (void)setGeometry: (of_rectangle_t)geometry
{
	toQt(self)->setGeometry(toQt(geometry).toRect());
}

- (int)height
{
	return toQt(self)->height();
}

268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
- (of_dimension_t)maximumSize
{
	return toOF(toQt(self)->maximumSize());
}

- (void)setMaximumSize: (of_dimension_t)maximumSize
{
	toQt(self)->setMaximumSize(toQt(maximumSize));
}

- (int)maximumWidth
{
	return toQt(self)->maximumWidth();
}








|







268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
- (of_dimension_t)maximumSize
{
	return toOF(toQt(self)->maximumSize());
}

- (void)setMaximumSize: (of_dimension_t)maximumSize
{
	toQt(self)->setMaximumSize(toQt(maximumSize).toSize());
}

- (int)maximumWidth
{
	return toQt(self)->maximumWidth();
}

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
- (of_dimension_t)minimumSize
{
	return toOF(toQt(self)->minimumSize());
}

- (void)setMinimumSize: (of_dimension_t)minimumSize
{
	toQt(self)->setMinimumSize(toQt(minimumSize));
}

- (of_dimension_t)minimumSizeHint
{
	return toOF(toQt(self)->minimumSizeHint());
}








|







303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
- (of_dimension_t)minimumSize
{
	return toOF(toQt(self)->minimumSize());
}

- (void)setMinimumSize: (of_dimension_t)minimumSize
{
	toQt(self)->setMinimumSize(toQt(minimumSize).toSize());
}

- (of_dimension_t)minimumSizeHint
{
	return toOF(toQt(self)->minimumSizeHint());
}

373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
- (of_dimension_t)size
{
	return toOF(toQt(self)->size());
}

- (void)resizeTo: (of_dimension_t)size
{
	toQt(self)->resize(toQt(size));
}

- (of_dimension_t)sizeHint
{
	return toOF(toQt(self)->sizeHint());
}

- (of_dimension_t)sizeIncrement
{
	return toOF(toQt(self)->sizeIncrement());
}

- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
{
	toQt(self)->setSizeIncrement(toQt(sizeIncrement));
}

- (QSizePolicy)sizePolicy
{
	return toQt(self)->sizePolicy();
}








|














|







373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
- (of_dimension_t)size
{
	return toOF(toQt(self)->size());
}

- (void)resizeTo: (of_dimension_t)size
{
	toQt(self)->resize(toQt(size).toSize());
}

- (of_dimension_t)sizeHint
{
	return toOF(toQt(self)->sizeHint());
}

- (of_dimension_t)sizeIncrement
{
	return toOF(toQt(self)->sizeIncrement());
}

- (void)setSizeIncrement: (of_dimension_t)sizeIncrement
{
	toQt(self)->setSizeIncrement(toQt(sizeIncrement).toSize());
}

- (QSizePolicy)sizePolicy
{
	return toQt(self)->sizePolicy();
}

670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
- (QPalette::ColorRole)foregroundRole
{
	return toQt(self)->foregroundRole();
}

- (QPixmap)grabRectangle: (of_rectangle_t)rectangle
{
	return toQt(self)->grab(toQt(rectangle));
}

- (void)grabGesture: (Qt::GestureType)gesture
{
	toQt(self)->grabGesture(gesture);
}








|







670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
- (QPalette::ColorRole)foregroundRole
{
	return toQt(self)->foregroundRole();
}

- (QPixmap)grabRectangle: (of_rectangle_t)rectangle
{
	return toQt(self)->grab(toQt(rectangle).toRect());
}

- (void)grabGesture: (Qt::GestureType)gesture
{
	toQt(self)->grabGesture(gesture);
}

901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
{
	toQt(self)->render(target, toQt(targetOffset), sourceRegion,
	    renderFlags);
}

- (void)repaintInRectangle: (of_rectangle_t)rect
{
	toQt(self)->repaint(toQt(rect));
}

- (void)repaintInRegion: (const QRegion &)region
{
	toQt(self)->repaint(region);
}








|







901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
{
	toQt(self)->render(target, toQt(targetOffset), sourceRegion,
	    renderFlags);
}

- (void)repaintInRectangle: (of_rectangle_t)rect
{
	toQt(self)->repaint(toQt(rect).toRect());
}

- (void)repaintInRegion: (const QRegion &)region
{
	toQt(self)->repaint(region);
}

929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
	toQt(self)->scroll(dx, dy);
}

- (void)scrollRight: (int)dx
	       down: (int)dy
	inRectangle: (of_rectangle_t)rect
{
	toQt(self)->scroll(dx, dy, toQt(rect));
}

- (void)setAttribute: (Qt::WidgetAttribute)attribute
		  to: (bool)on
{
	toQt(self)->setAttribute(attribute, on);
}







|







929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
	toQt(self)->scroll(dx, dy);
}

- (void)scrollRight: (int)dx
	       down: (int)dy
	inRectangle: (of_rectangle_t)rect
{
	toQt(self)->scroll(dx, dy, toQt(rect).toRect());
}

- (void)setAttribute: (Qt::WidgetAttribute)attribute
		  to: (bool)on
{
	toQt(self)->setAttribute(attribute, on);
}
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
- (void)setFixedHeight: (int)height
{
	toQt(self)->setFixedHeight(height);
}

- (void)setFixedSize: (of_dimension_t)size
{
	toQt(self)->setFixedSize(toQt(size));
}

- (void)setFixedWidth: (int)width
{
	toQt(self)->setFixedWidth(width);
}








|







952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
- (void)setFixedHeight: (int)height
{
	toQt(self)->setFixedHeight(height);
}

- (void)setFixedSize: (of_dimension_t)size
{
	toQt(self)->setFixedSize(toQt(size).toSize());
}

- (void)setFixedWidth: (int)width
{
	toQt(self)->setFixedWidth(width);
}

1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
- (void)ungrabGesture: (Qt::GestureType)gesture
{
	toQt(self)->ungrabGesture(gesture);
}

- (void)updateInRectangle: (of_rectangle_t)rect
{
	toQt(self)->update(toQt(rect));
}

- (void)updateInRegion: (const QRegion &)region
{
	toQt(self)->update(region);
}








|







1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
- (void)ungrabGesture: (Qt::GestureType)gesture
{
	toQt(self)->ungrabGesture(gesture);
}

- (void)updateInRectangle: (of_rectangle_t)rect
{
	toQt(self)->update(toQt(rect).toRect());
}

- (void)updateInRegion: (const QRegion &)region
{
	toQt(self)->update(region);
}

Modified src/common/helpers.h from [a7449889b6] to [b31e057a48].

48
49
50
51
52
53
54






55
56
57
58
59
60
61
62
63
64
65
66
67







68
69
70
71
72
73
74
75

static OF_INLINE of_dimension_t
toOF(const QSize &qSize)
{
	return of_dimension(qSize.width(), qSize.height());
}







static OF_INLINE QSize
toQt(const of_dimension_t &dimension)
{
	return QSize(dimension.width, dimension.height);
}

static OF_INLINE of_rectangle_t
toOF(const QRect &qRect)
{
	return of_rectangle(qRect.x(), qRect.y(),
	    qRect.width(), qRect.height());
}








static OF_INLINE QRect
toQt(const of_rectangle_t &rectangle)
{
	return QRect(rectangle.origin.x, rectangle.origin.y,
	    rectangle.size.width, rectangle.size.height);
}

}







>
>
>
>
>
>
|


|









>
>
>
>
>
>
>
|


|




48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

static OF_INLINE of_dimension_t
toOF(const QSize &qSize)
{
	return of_dimension(qSize.width(), qSize.height());
}

static OF_INLINE of_dimension_t
toOF(const QSizeF &qSizeF)
{
	return of_dimension(qSizeF.width(), qSizeF.height());
}

static OF_INLINE QSizeF
toQt(const of_dimension_t &dimension)
{
	return QSizeF(dimension.width, dimension.height);
}

static OF_INLINE of_rectangle_t
toOF(const QRect &qRect)
{
	return of_rectangle(qRect.x(), qRect.y(),
	    qRect.width(), qRect.height());
}

static OF_INLINE of_rectangle_t
toOF(const QRectF &qRectF)
{
	return of_rectangle(qRectF.x(), qRectF.y(),
	    qRectF.width(), qRectF.height());
}

static OF_INLINE QRectF
toQt(const of_rectangle_t &rectangle)
{
	return QRectF(rectangle.origin.x, rectangle.origin.y,
	    rectangle.size.width, rectangle.size.height);
}

}