ObjQt  Check-in [ddbc7922c5]

Overview
Comment:Make more things properties
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ddbc7922c5268061e603032e4cdeb551c784282b937734c71c3a1ad2de9a3033
User & Date: js on 2017-11-19 15:05:11
Other Links: manifest | tags
Context
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
2017-07-23
12:15
Adjust to ObjFW changes check-in: 142cffefb2 user: js tags: trunk
Changes

Modified src/QtCore/QtObject.h from [054b094c22] to [a05ce1afd4].

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
64
65
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
64
65
66
67







-
-
+
+
+
+
+
+




-











-







{
	QObject *_qObject;
	bool _ownsObject;
}

@property (readonly, nonatomic) QObject *qObject;
@property (readonly, nonatomic) const QMetaObject *metaObject;
@property (nonatomic, retain) QtObject *parent;
@property (nonatomic, copy) OFString *objectName;
@property (retain, nonatomic) QtObject *parent;
@property (copy, nonatomic) OFString *objectName;
@property (readonly, nonatomic) OFArray OF_GENERIC(QtObject *) *children;
@property (readonly, nonatomic)
    OFArray OF_GENERIC(OFData *) *dynamicPropertyNames;
@property (readonly, nonatomic) QtThread *thread;

- init OF_UNAVAILABLE;
- initWithQObject: (QObject *)qObject OF_DESIGNATED_INITIALIZER;
- (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(OFData *) *)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;
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
76
77
78
79
80
81
82

83
84
85
86
87
88
89







-







- (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

namespace ObjQt {

static OF_INLINE QtObject *
toOF(QObject *qObject)

Modified src/QtGui/QtGUIApplication.h from [205e5d23cc] to [a966c37426].

31
32
33
34
35
36
37


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46


47
48
49
50
51
52
53







+
+







-
-







@property (nonatomic, copy) OFString *desktopFileName;
#endif
@property (nonatomic) Qt::LayoutDirection layoutDirection;
@property (readonly, nonatomic) OFString *platformName;
@property (readonly, nonatomic) QScreen *primaryScreen;
@property (nonatomic) bool quitsOnLastWindowClosed;
@property (nonatomic) QIcon windowIcon;
@property (readonly, nonatomic) OFString *sessionID;
@property (readonly, nonatomic) OFString *sessionKey;

- initWithQCoreApplication: (QCoreApplication *)qCoreApplication OF_UNAVAILABLE;
- initWithQGuiApplication: (QGuiApplication *)qGuiApplication
    OF_DESIGNATED_INITIALIZER;
- (double)devicePixelRatio;
- (bool)isSavingSession;
- (bool)isSessionRestored;
- (OFString *)sessionID;
- (OFString *)sessionKey;
@end

namespace ObjQt {

static OF_INLINE QtGUIApplication *
toOF(QGuiApplication *qGuiApplication)
{

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

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
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







-
-
-
-
+
+
+
+

-
+

-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+







 */

#import <ObjFW/ObjFW.h>

#include <QPaintDevice>

@protocol QtPaintDevice
- (QPaintDevice *)qPaintDevice;
- (int)colorCount;
- (int)depth;
- (int)devicePixelRatio;
@property (readonly, nonatomic) QPaintDevice *qPaintDevice;
@property (readonly, nonatomic) int colorCount;
@property (readonly, nonatomic) int depth;
@property (readonly, nonatomic) int devicePixelRatio;
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
- (double)devicePixelRatioF;
@property (readonly, nonatomic) double devicePixelRatioF;
#endif
- (int)height;
- (int)heightMM;
- (int)logicalDPIX;
- (int)logicalDPIY;
- (QPaintEngine *)paintEngine;
- (bool)paintingActive;
- (int)physicalDPIX;
- (int)physicalDPIY;
- (int)width;
- (int)widthMM;
@property (readonly, nonatomic) int height;
@property (readonly, nonatomic) int heightMM;
@property (readonly, nonatomic) int logicalDPIX;
@property (readonly, nonatomic) int logicalDPIY;
@property (readonly, nonatomic) QPaintEngine *paintEngine;
@property (readonly, nonatomic) bool paintingActive;
@property (readonly, nonatomic) int physicalDPIX;
@property (readonly, nonatomic) int physicalDPIY;
@property (readonly, nonatomic) int width;
@property (readonly, nonatomic) int widthMM;
@end

@interface QtPaintDevice: OFObject <QtPaintDevice>
@property (readonly, nonatomic) QObject *qObject;
@end

namespace ObjQt {

Modified src/QtWidgets/QtAbstractButton.h from [4bfce82261] to [37773e2710].

33
34
35
36
37
38
39

40
41
42
43
44
45
46
47
48
49
50
51
33
34
35
36
37
38
39
40
41
42
43
44

45
46
47
48
49
50
51







+




-







@property (nonatomic, getter=isCheckable) bool checkable;
@property (nonatomic, getter=isChecked) bool checked;
@property (nonatomic, getter=isDown) bool down;
@property (nonatomic) QIcon icon;
@property (nonatomic) of_dimension_t iconSize;
@property (nonatomic) QKeySequence shortcut;
@property (nonatomic, copy) OFString *text;
@property (readonly, nonatomic) QButtonGroup *group;

- initWithQWidget: (QWidget *)qWidget OF_UNAVAILABLE;
- initWithQAbstractButton: (QAbstractButton *)qAbstractButton
    OF_DESIGNATED_INITIALIZER;
- (QButtonGroup *)group;
@end

namespace ObjQt {

static OF_INLINE QtAbstractButton *
toOF(QAbstractButton *qAbstractButton)
{

Modified src/QtWidgets/QtAction.h from [7e60480e14] to [774a285c94].

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

64
65
66
67
68
69
70
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
64
65
66
67
68
69







-
-
-
+
+
+

-
+
+
+
+
+






-

-

-

-
+
-
-
-
+







@property (nonatomic) QIcon icon;
@property (nonatomic, copy) OFString *iconText;
@property (nonatomic, getter=isIconVisibleInMenu) bool iconVisibleInMenu;
@property (nonatomic) QAction::MenuRole menuRole;
@property (nonatomic) QAction::Priority priority;
@property (nonatomic) QKeySequence shortcut;
@property (nonatomic) Qt::ShortcutContext shortcutContext;
@property (nonatomic, copy) OFString *statusTip;
@property (nonatomic, copy) OFString *text;
@property (nonatomic, copy) OFString *toolTip;
@property (copy, nonatomic) OFString *statusTip;
@property (copy, nonatomic) OFString *text;
@property (copy, nonatomic) OFString *toolTip;
@property (nonatomic, getter=isVisible) bool visible;
@property (nonatomic, copy) OFString *whatsThis;
@property (copy, nonatomic) OFString *whatsThis;
@property (readonly, nonatomic)
    OFArray OF_GENERIC(QtWidget *) *associatedWidgets;
    @property (nonatomic, setter=setSeparator:) bool isSeparator;
@property (readonly, nonatomic) QtWidget *parentWidget;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQAction: (QAction *)qAction OF_DESIGNATED_INITIALIZER;
- (QActionGroup *)actionGroup;
- (void)activate: (QAction::ActionEvent)event;
- (QList<QGraphicsWidget *>)associatedGraphicsWidgets;
- (OFArray OF_GENERIC(QtWidget *) *)associatedWidgets;
- (QVariant)data;
- (bool)isSeparator;
- (QMenu *)menu;
- (QtWidget *)parentWidget;
- (void)setActionGroup: (QActionGroup *)group;
- (void)setData: (const QVariant&)data;
- (void)setData: (const QVariant &)data;
- (void)setMenu: (QMenu *)menu;
- (void)setSeparator: (bool)isSeparator;
- (void)setShortcuts: (const QList<QKeySequence>&)shortcuts;
- (void)setShortcuts: (const QList<QKeySequence> &)shortcuts;
- (void)setShortcutsWithStandardKey: (QKeySequence::StandardKey)key;
- (QList<QKeySequence>)shortcuts;
- (bool)showStatusText: (QtWidget *)widget;
@end

namespace ObjQt {

Modified src/QtWidgets/QtWidget.h from [b33956c62e] to [cadc7c9183].

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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102

103
104
105
106
107
108
109
110
111
112

113
114


115
116
117
118
119
120
121







-
-
+
+


















-
+


















-
-
-
+
+
+



-
+






-
+


+
+
+
+
+
+
+
+
+
+
+
+



-










-


-
-







#include <QWidget>

@class QtAction;

@interface QtWidget: QtObject
@property (readonly, nonatomic) QWidget *qWidget;
@property (nonatomic) bool acceptDrops;
@property (nonatomic, copy) OFString *accessibleDescription;
@property (nonatomic, copy) OFString *accessibleName;
@property (copy, nonatomic) OFString *accessibleDescription;
@property (copy, nonatomic) OFString *accessibleName;
@property (nonatomic) bool autoFillBackground;
@property (nonatomic) of_dimension_t baseSize;
@property (readonly, nonatomic) of_rectangle_t childrenRect;
@property (readonly, nonatomic) QRegion childrenRegion;
@property (nonatomic) Qt::ContextMenuPolicy contextMenuPolicy;
@property (nonatomic) QCursor cursor;
@property (nonatomic, getter=isEnabled) bool enabled;
@property (nonatomic) Qt::FocusPolicy focusPolicy;
@property (nonatomic) const QFont &font;
@property (readonly, nonatomic) of_rectangle_t frameGeometry;
@property (readonly, nonatomic) of_dimension_t frameSize;
@property (readonly, nonatomic, getter=isFullScreen) bool fullScreen;
@property (nonatomic) of_rectangle_t geometry;
@property (readonly, nonatomic) int height;
@property (nonatomic) Qt::InputMethodHints inputMethodHints;
@property (readonly, nonatomic) bool isActiveWindow;
@property (nonatomic) Qt::LayoutDirection layoutDirection;
@property (nonatomic) QLocale locale;
@property (nonatomic, readonly, getter=isMaximized) bool maximized;
@property (readonly, nonatomic, getter=isMaximized) bool maximized;
@property (nonatomic) int maximumHeight;
@property (nonatomic) of_dimension_t maximumSize;
@property (nonatomic) int maximumWidth;
@property (readonly, nonatomic, getter=isMinimized) bool minimized;
@property (nonatomic) int minimumHeight;
@property (nonatomic) of_dimension_t minimumSize;
@property (readonly, nonatomic) of_dimension_t minimumSizeHint;
@property (nonatomic) int minimumWidth;
@property (readonly, nonatomic, getter=isModal) bool modal;
@property (nonatomic, getter=hasMouseTracking) bool mouseTracking;
@property (readonly, nonatomic) of_rectangle_t normalGeometry;
@property (nonatomic) const QPalette &palette;
@property (nonatomic, setter=moveToPosition:) of_point_t pos;
@property (readonly, nonatomic) of_rectangle_t rect;
@property (nonatomic, setter=resizeTo:) of_dimension_t size;
@property (readonly, nonatomic) of_dimension_t sizeHint;
@property (nonatomic) of_dimension_t sizeIncrement;
@property (nonatomic) QSizePolicy sizePolicy;
@property (nonatomic, copy) OFString *statusTip;
@property (nonatomic, copy) OFString *styleSheet;
@property (nonatomic, copy) OFString *toolTip;
@property (copy, nonatomic) OFString *statusTip;
@property (copy, nonatomic) OFString *styleSheet;
@property (copy, nonatomic) OFString *toolTip;
@property (nonatomic) int toolTipDuration;
@property (nonatomic) bool updatesEnabled;
@property (nonatomic, getter=isVisible) bool visible;
@property (nonatomic, copy) OFString *whatsThis;
@property (copy, nonatomic) OFString *whatsThis;
@property (readonly, nonatomic) int width;
@property (nonatomic) Qt::WindowFlags windowFlags;
@property (nonatomic) QIcon windowIcon;
@property (nonatomic) Qt::WindowModality windowModality;
@property (nonatomic, getter=isWindowModified) bool windowModified;
@property (nonatomic) double windowOpacity;
@property (nonatomic, copy) OFString *windowTitle;
@property (copy, nonatomic) OFString *windowTitle;
@property (readonly, nonatomic) int x;
@property (readonly, nonatomic) int y;
@property (readonly, nonatomic) OFArray OF_GENERIC(QtAction *) *actions;
@property (readonly, nonatomic) of_rectangle_t contentsRect;
@property (readonly, nonatomic) QtWidget *focusProxy;
@property (readonly, nonatomic) QtWidget *focusWidget;
@property (readonly, nonatomic, getter=isHidden) bool hidden;
@property (readonly, nonatomic) bool isWindow;
@property (readonly, nonatomic) QtWidget *nativeParentWidget;
@property (readonly, nonatomic) QtWidget *nextInFocusChain;
@property (readonly, nonatomic) QtWidget *parentWidget;
@property (readonly, nonatomic) QtWidget *previousInFocusChain;
@property (readonly, nonatomic) QtWidget *window;
@property (readonly, nonatomic) OFString *windowRole;

- initWithQObject: (QObject *)qObject OF_UNAVAILABLE;
- initWithQWidget: (QWidget *)qWidget OF_DESIGNATED_INITIALIZER;
- (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)activateWindow;
- (void)addAction: (QtAction *)action;
- (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions;
- (void)adjustSize;
- (QPalette::ColorRole)backgroundRole;
- (QBackingStore *)backingStore;
- (QtWidget *)childAt: (of_point_t)point;
- (void)clearFocus;
- (void)clearMask;
- (QMargins)contentsMargins;
- (of_rectangle_t)contentsRect;
- (WId)effectiveWinID;
- (void)ensurePolished;
- (QtWidget *)focusProxy;
- (QtWidget *)focusWidget;
- (QFontInfo)fontInfo;
- (QFontMetrics)fontMetrics;
- (QPalette::ColorRole)foregroundRole;
- (QPixmap)grabRectangle: (of_rectangle_t)rectangle;
- (void)grabGesture: (Qt::GestureType)gesture;
- (void)grabGesture: (Qt::GestureType)gesture
	      flags: (Qt::GestureFlags)flags;
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
136
137
138
139
140
141
142

143

144
145
146
147
148
149
150
151
152


153


154
155
156
157
158
159
160







-

-









-
-

-
-







- (QVariant)queryInputMethod: (Qt::InputMethodQuery)query;
- (void)insertAction: (QtAction *)action
	      before: (QtAction *)before;
- (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions
	       before: (QtAction *)before;
- (bool)isAncestorOf: (QtWidget *)child;
- (bool)isEnabledTo: (QtWidget *)ancestor;
- (bool)isHidden;
- (bool)isVisibleTo: (QtWidget *)ancestor;
- (bool)isWindow;
- (of_point_t)mapPosition: (of_point_t)pos
		     from: (QtWidget *)parent;
- (of_point_t)mapPositionFromGlobal: (of_point_t)pos;
- (of_point_t)mapPositionFromParent: (of_point_t)pos;
- (of_point_t)mapPosition: (of_point_t)pos
		       to: (QtWidget *)parent;
- (of_point_t)mapPositionToGlobal: (of_point_t)pos;
- (of_point_t)mapPositionToParent: (of_point_t)pos;
- (QRegion)mask;
- (QtWidget *)nativeParentWidget;
- (QtWidget *)nextInFocusChain;
- (void)overrideWindowFlags: (Qt::WindowFlags)flags;
- (QtWidget *)parentWidget;
- (QtWidget *)previousInFocusChain;
- (void)releaseKeyboard;
- (void)releaseMouse;
- (void)releaseShortcut: (int)ID;
- (void)removeAction: (QtAction *)action;
- (void)renderIntoPaintDevice: (QtObject <QtPaintDevice> *)target
		 targetOffset: (of_point_t)targetOffset
		 sourceRegion: (QRegion)sourceRegion;
174
175
176
177
178
179
180

181
182
183
184
185
186
187
188
189
190
191
192
193
194
176
177
178
179
180
181
182
183
184
185
186
187
188
189

190
191
192
193
194
195
196







+






-







- (void)scrollRight: (int)dx
	       down: (int)dy;
- (void)scrollRight: (int)dx
	       down: (int)dy
	inRectangle: (of_rectangle_t)rect;
- (void)setAttribute: (Qt::WidgetAttribute)attribute
		  to: (bool)on;
- (void)setFocus: (Qt::FocusReason)reason;
#ifdef QT_KEYPAD_NAVIGATION
- (void)setEditFocus: (bool)enable;
#endif
- (void)setFixedHeight: (int)height;
- (void)setFixedSize: (of_dimension_t)size;
- (void)setFixedWidth: (int)width;
- (void)setFocus: (Qt::FocusReason)reason;
- (void)setFocusProxy: (QtWidget *)widget;
- (void)setForegroundRole: (QPalette::ColorRole)role;
- (void)setGraphicsEffect: (QGraphicsEffect *)effect;
- (void)setLayout: (QLayout *)layout;
- (void)setMaskFromBitmap: (const QBitmap &)bitmap;
- (void)setMask: (const QRegion &)region;
- (void)setParent: (QtWidget *)parent;
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
212
213
214
215
216
217
218

219

220
221
222
223
224
225
226







-

-







- (void)unsetLayoutDirection;
- (void)unsetLocale;
- (void)updateInRectangle: (of_rectangle_t)rect;
- (void)updateInRegion: (const QRegion &)region;
- (void)updateGeometry;
- (QRegion)visibleRegion;
- (WId)winID;
- (QtWidget *)window;
- (QWindow *)windowHandle;
- (OFString *)windowRole;
- (Qt::WindowStates)windowState;
- (Qt::WindowType)windowType;
@end

@interface QtWidget (QtPaintDevice) <QtPaintDevice>
@end