ObjQt  Check-in [25466afe90]

Overview
Comment:Add QtPaintDevice and initial QtWidget
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 25466afe90488ba55adaf8447f4b216ad80b18053b25d80e756c28022fa9cafa
User & Date: js on 2017-04-02 23:00:47
Other Links: manifest | tags
Context
2017-04-05
21:19
Add toOF() / toQt() for easy conversion check-in: e9fd43644a user: js tags: trunk
2017-04-02
23:00
Add QtPaintDevice and initial QtWidget check-in: 25466afe90 user: js tags: trunk
20:51
Initial commit check-in: 9463212568 user: js tags: trunk
Changes

Modified ObjQt.pro from [4cb866f5b3] to [2b8eeb5b52].

13
14
15
16
17
18
19

20

21
22
23
24
25
26
27

28

29
30
31
32
33
34
35
	   common/QtOwnershipManaging.h	\
	   QtCore/QtChildEvent.h	\
	   QtCore/QtCoreApplication.h	\
	   QtCore/QtEvent.h		\
	   QtCore/QtObject.h		\
	   QtCore/QtThread.h		\
	   QtGui/QtGuiApplication.h	\

	   QtWidgets/QtApplication.h


SOURCES += QtCore/QtChildEvent.mm	\
           QtCore/QtCoreApplication.mm	\
	   QtCore/QtEvent.mm  		\
	   QtCore/QtObject.mm		\
	   QtCore/QtThread.mm		\
	   QtGui/QtGuiApplication.mm	\

	   QtWidgets/QtApplication.mm


QMAKE_CXXFLAGS += $$system("objfw-config --cppflags --objcflags --cxxflags")
QMAKE_CXXFLAGS_WARN_ON = -Wall					\
			 -Werror				\
			 -Wsemicolon-before-method-body		\
			 -Wobjc-missing-property-synthesis
LIBS += $$system("objfw-config --ldflags --libs")







>
|
>







>
|
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
	   common/QtOwnershipManaging.h	\
	   QtCore/QtChildEvent.h	\
	   QtCore/QtCoreApplication.h	\
	   QtCore/QtEvent.h		\
	   QtCore/QtObject.h		\
	   QtCore/QtThread.h		\
	   QtGui/QtGuiApplication.h	\
	   QtGui/QtPaintDevice.h	\
	   QtWidgets/QtApplication.h	\
	   QtWidgets/QtWidget.h

SOURCES += QtCore/QtChildEvent.mm	\
           QtCore/QtCoreApplication.mm	\
	   QtCore/QtEvent.mm  		\
	   QtCore/QtObject.mm		\
	   QtCore/QtThread.mm		\
	   QtGui/QtGuiApplication.mm	\
	   QtGui/QtPaintDevice.mm	\
	   QtWidgets/QtApplication.mm	\
	   QtWidgets/QtWidget.mm

QMAKE_CXXFLAGS += $$system("objfw-config --cppflags --objcflags --cxxflags")
QMAKE_CXXFLAGS_WARN_ON = -Wall					\
			 -Werror				\
			 -Wsemicolon-before-method-body		\
			 -Wobjc-missing-property-synthesis
LIBS += $$system("objfw-config --ldflags --libs")

Added QtGui/QtPaintDevice.h version [9eaf61aac0].

Added QtGui/QtPaintDevice.mm version [544fecf524].

Modified QtWidgets/QtApplication.h from [e6e3189b74] to [63d26f68ad].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import "QtGuiApplication.h"

#include <QApplication>

@interface QtApplication: QtGuiApplication
@property (readonly) QApplication *qApplication;
@property bool autoSipEnabled;
@property int cursorFlashTime;
@property int doubleClickInterval;
@property QSize globalStrut;
@property int keyboardInputInterval;
@property int startDragDistance;
@property int startDragTime;
@property (copy) OFString *styleSheet;
@property int wheelScrollLines;

- initWithQApplication: (QApplication*)qApplication;









|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import "QtGuiApplication.h"

#include <QApplication>

@interface QtApplication: QtGuiApplication
@property (readonly) QApplication *qApplication;
@property bool autoSipEnabled;
@property int cursorFlashTime;
@property int doubleClickInterval;
@property of_dimension_t globalStrut;
@property int keyboardInputInterval;
@property int startDragDistance;
@property int startDragTime;
@property (copy) OFString *styleSheet;
@property int wheelScrollLines;

- initWithQApplication: (QApplication*)qApplication;

Modified QtWidgets/QtApplication.mm from [5d6ff1b5d5] to [375a847baa].

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
}

- (void)setDoubleClickInterval: (int)doubleClickInterval
{
	[self qApplication]->setDoubleClickInterval(doubleClickInterval);
}

- (QSize)globalStrut
{
	return [self qApplication]->globalStrut();
}

- (void)setGlobalStrut: (QSize)globalStrut
{
	[self qApplication]->setGlobalStrut(globalStrut);
}

- (int)keyboardInputInterval
{
	return [self qApplication]->keyboardInputInterval();
}








|

|


|

|







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
}

- (void)setDoubleClickInterval: (int)doubleClickInterval
{
	[self qApplication]->setDoubleClickInterval(doubleClickInterval);
}

- (of_dimension_t)globalStrut
{
	return QToOFDimension([self qApplication]->globalStrut());
}

- (void)setGlobalStrut: (of_dimension_t)globalStrut
{
	[self qApplication]->setGlobalStrut(OFToQSize(globalStrut));
}

- (int)keyboardInputInterval
{
	return [self qApplication]->keyboardInputInterval();
}

Added QtWidgets/QtWidget.h version [c33bbfb67d].

Added QtWidgets/QtWidget.mm version [037226855e].

Modified common/helpers.h from [7d6cebc297] to [f5be4fa690].

1
2
3


4
5
6
7
8
9
10
11
12
13
14
15






































#import <ObjFW/ObjFW.h>

#include <QString>



inline OFString*
QToOFString(const QString &qString)
{
	return [OFString stringWithUTF8String: qString.toUtf8()];
}

inline QString
OFToQString(OFString *string)
{
	return QString::fromUtf8([string UTF8String]);
}









































>
>












>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
#import <ObjFW/ObjFW.h>

#include <QString>
#include <QSize>
#include <QRect>

inline OFString*
QToOFString(const QString &qString)
{
	return [OFString stringWithUTF8String: qString.toUtf8()];
}

inline QString
OFToQString(OFString *string)
{
	return QString::fromUtf8([string UTF8String]);
}

inline of_dimension_t
QToOFDimension(const QSize &qSize)
{
	return of_dimension(qSize.width(), qSize.height());
}

inline of_point_t
QToOFPoint(const QPoint &qPoint)
{
	return of_point(qPoint.x(), qPoint.y());
}

inline QPoint
OFToQPoint(of_point_t point)
{
	return QPoint(point.x, point.y);
}

inline QSize
OFToQSize(of_dimension_t dimension)
{
	return QSize(dimension.width, dimension.height);
}

inline of_rectangle_t
QToOFRectangle(const QRect &qRect)
{
	return of_rectangle(qRect.x(), qRect.y(),
	    qRect.width(), qRect.height());
}

inline QRect
OFToQRect(of_rectangle_t rectangle)
{
	return QRect(rectangle.origin.x, rectangle.origin.y,
	    rectangle.size.width, rectangle.size.height);
}