Comment: | Add QtGraphicsWidget |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4c1be2eafba8952b9ed39a328ac4dca1 |
User & Date: | js 2017-11-20 01:13:20 |
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 to src/QtGui/QtPaintDevice.h.
47 48 49 50 51 52 53 | @interface QtPaintDevice: OFObject <QtPaintDevice> @property (readonly, nonatomic) QObject *qObject; @end namespace ObjQt { static OF_INLINE 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]; } } |
Changes to src/QtWidgets/Makefile.
1 2 3 4 5 6 7 8 | include ../../extra.mk STATIC_PIC_LIB_NOINST = ${QTWIDGETS_LIB_A} STATIC_LIB_NOINST = ${QTWIDGETS_A} SRCS = QtAbstractButton.mm \ QtAction.mm \ QtApplication.mm \ | > | | 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 |
Changes to src/QtWidgets/QtAbstractButton.mm.
127 128 129 130 131 132 133 | - (of_dimension_t)iconSize { return toOF(toQt(self)->iconSize()); } - (void)setIconSize: (of_dimension_t)iconSize { | | | 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(); } |
Changes to src/QtWidgets/QtApplication.mm.
77 78 79 80 81 82 83 | - (of_dimension_t)globalStrut { return toOF(toQt(self)->globalStrut()); } - (void)setGlobalStrut: (of_dimension_t)globalStrut { | | | 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.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 | /* * Copyright (c) 2017, Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/objqt.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> #include <QGraphicsWidget> #import "QtAction.h" #import "QtObject.h" // TODO: Remove // TODO: Remove once QtGraphicsObject is bound @interface QtGraphicsObject: QtObject @end @interface QtGraphicsWidget: QtGraphicsObject @property (readonly, nonatomic) QGraphicsWidget *qGraphicsWidget; @property (nonatomic) bool autoFillBackground; @property (nonatomic) Qt::FocusPolicy focusPolicy; @property (nonatomic) of_rectangle_t geometry; @property (nonatomic) QGraphicsLayout *layout; @property (nonatomic) Qt::LayoutDirection layoutDirection; @property (nonatomic) of_dimension_t maximumSize; @property (nonatomic) of_dimension_t minimumSize; @property (nonatomic) QPalette palette; @property (nonatomic) of_dimension_t preferredSize; @property (readonly, nonatomic) of_dimension_t size; @property (nonatomic) QSizePolicy sizePolicy; @property (nonatomic) Qt::WindowFlags windowFlags; @property (copy, nonatomic) OFString *windowTitle; @property (readonly, nonatomic) OFArray OF_GENERIC(QtAction *) *actions; @property (readonly, nonatomic) bool isActiveWindow; @property (nonatomic) QStyle *style; @property (readonly, nonatomic) of_rectangle_t windowFrameGeometry; @property (readonly, nonatomic) of_rectangle_t windowFrameRect; - initWithQObject: (QObject *)qObject OF_UNAVAILABLE; - initWithQGraphicsWidget: (QGraphicsWidget *)qGraphicsWidget OF_DESIGNATED_INITIALIZER; - (void)addAction: (QtAction *)action; - (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions; - (void)adjustSize; - (QtGraphicsWidget *)focusWidget; - (void)getWindowFrameMarginsWithLeft: (qreal *)left top: (qreal *)top right: (qreal *)right bottom: (qreal *)bottom; - (void)setWindowFrameMarginsWithLeft: (qreal)left top: (qreal)top right: (qreal)right bottom: (qreal)bottom; - (void)insertAction: (QtAction *)action before: (QtAction *)before; - (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions before: (QtAction *)before; - (void)paintWindowFrameWithPainter: (QPainter *)painter option: (const QStyleOptionGraphicsItem *)option widget: (QtWidget *)widget; - (void)releaseShortcut: (int)ID; - (void)removeAction: (QtAction *)action; - (void)resizeTo: (of_dimension_t)size; - (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on; - (void)setContentsMarginsWithLeft: (qreal)left top: (qreal)top right: (qreal)right bottom: (qreal)bottom; - (void)setAutoRepeat: (bool)enabled forShortcut: (int)ID; - (void)setEnabled: (bool)enabled forShortcut: (int)ID; - (bool)testAttribute: (Qt::WidgetAttribute)attribute; - (void)unsetLayoutDirection; - (void)unsetWindowFrameMargins; @end namespace ObjQt { static OF_INLINE QtGraphicsWidget * toOF(QGraphicsWidget *qGraphicsWidget) { if (qGraphicsWidget == NULL) return nil; return [[[QtGraphicsWidget alloc] initWithQGraphicsWidget: qGraphicsWidget] autorelease]; } static OF_INLINE QGraphicsWidget * toQt(QtGraphicsWidget *graphicsWidget) { return [graphicsWidget qGraphicsWidget]; } } |
Added src/QtWidgets/QtGraphicsWidget.mm.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 122 123 124 125 126 127 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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | /* * Copyright (c) 2017, Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/objqt.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include "QtGraphicsWidget.h" #import "OFString+QString.h" #import "helpers.h" using ObjQt::toOF; using ObjQt::toQt; @implementation QtGraphicsObject @end @implementation QtGraphicsWidget - initWithQObject: (QObject *)qObject { OF_INVALID_INIT_METHOD } - initWithQGraphicsWidget: (QGraphicsWidget *)qGraphicsWidget { return [super initWithQObject: qGraphicsWidget]; } - (QGraphicsWidget *)qGraphicsWidget { return dynamic_cast<QGraphicsWidget *>([self qObject]); } - (bool)autoFillBackground { return toQt(self)->autoFillBackground(); } - (void)setAutoFillBackground: (bool)autoFillBackground { toQt(self)->setAutoFillBackground(autoFillBackground); } - (Qt::FocusPolicy)focusPolicy { return toQt(self)->focusPolicy(); } - (void)setFocusPolicy: (Qt::FocusPolicy)focusPolicy { toQt(self)->setFocusPolicy(focusPolicy); } - (of_rectangle_t)geometry { return toOF(toQt(self)->geometry()); } - (void)setGeometry: (of_rectangle_t)geometry { toQt(self)->setGeometry(toQt(geometry)); } - (QGraphicsLayout *)layout { return toQt(self)->layout(); } - (void)setLayout: (QGraphicsLayout *)layout { toQt(self)->setLayout(layout); } - (Qt::LayoutDirection)layoutDirection { return toQt(self)->layoutDirection(); } - (void)setLayoutDirection: (Qt::LayoutDirection)layoutDirection { toQt(self)->setLayoutDirection(layoutDirection); } - (of_dimension_t)maximumSize { return toOF(toQt(self)->maximumSize()); } - (void)setMaximumSize: (of_dimension_t)maximumSize { toQt(self)->setMaximumSize(toQt(maximumSize)); } - (of_dimension_t)minimumSize { return toOF(toQt(self)->minimumSize()); } - (void)setMinimumSize: (of_dimension_t)minimumSize { toQt(self)->setMinimumSize(toQt(minimumSize)); } - (QPalette)palette { return toQt(self)->palette(); } - (void)setPalette: (QPalette)palette { toQt(self)->setPalette(palette); } - (of_dimension_t)preferredSize { return toOF(toQt(self)->preferredSize()); } - (void)setPreferredSize: (of_dimension_t)preferredSize { toQt(self)->setPreferredSize(toQt(preferredSize)); } - (of_dimension_t)size { return toOF(toQt(self)->size()); } - (QSizePolicy)sizePolicy { return toQt(self)->sizePolicy(); } - (void)setSizePolicy: (QSizePolicy)sizePolicy { toQt(self)->setSizePolicy(sizePolicy); } - (Qt::WindowFlags)windowFlags { return toQt(self)->windowFlags(); } - (void)setWindowFlags: (Qt::WindowFlags)windowFlags { toQt(self)->setWindowFlags(windowFlags); } - (OFString *)windowTitle { return toOF(toQt(self)->windowTitle()); } - (void)setWindowTitle: (OFString *)windowTitle { toQt(self)->setWindowTitle(toQt(windowTitle)); } - (OFArray OF_GENERIC(QtAction *) *)actions { const QList<QAction *> &actions = toQt(self)->actions(); OFMutableArray *ret = [OFMutableArray arrayWithCapacity: actions.count()]; void *pool = objc_autoreleasePoolPush(); for (QAction *action: actions) [ret addObject: toOF(action)]; [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } - (bool)isActiveWindow { return toQt(self)->isActiveWindow(); } - (QStyle *)style { return toQt(self)->style(); } - (void)setStyle: (QStyle *)style { toQt(self)->setStyle(style); } - (of_rectangle_t)windowFrameGeometry { return toOF(toQt(self)->windowFrameGeometry()); } - (of_rectangle_t)windowFrameRect { return toOF(toQt(self)->windowFrameRect()); } - (void)addAction: (QtAction *)action { toQt(self)->addAction(toQt(action)); } - (void)addActions: (OFArray OF_GENERIC(QtAction *) *)actions { QList<QAction *> list; for (QtAction *action in actions) list.append(toQt(action)); toQt(self)->addActions(list); } - (void)adjustSize { toQt(self)->adjustSize(); } - (QtGraphicsWidget *)focusWidget { return toOF(toQt(self)->focusWidget()); } - (void)getWindowFrameMarginsWithLeft: (qreal *)left top: (qreal *)top right: (qreal *)right bottom: (qreal *)bottom { toQt(self)->getWindowFrameMargins(left, top, right, bottom); } - (void)setWindowFrameMarginsWithLeft: (qreal)left top: (qreal)top right: (qreal)right bottom: (qreal)bottom { toQt(self)->setWindowFrameMargins(left, top, right, bottom); } - (void)insertAction: (QtAction *)action before: (QtAction *)before { toQt(self)->insertAction(toQt(before), toQt(action)); } - (void)insertActions: (OFArray OF_GENERIC(QtAction *) *)actions before: (QtAction *)before { QList<QAction *> list; for (QtAction *action in actions) list.append(toQt(action)); toQt(self)->insertActions(toQt(before), list); } - (void)paintWindowFrameWithPainter: (QPainter *)painter option: (const QStyleOptionGraphicsItem *)option widget: (QtWidget *)widget { toQt(self)->paintWindowFrame(painter, option, toQt(widget)); } - (void)releaseShortcut: (int)ID { toQt(self)->releaseShortcut(ID); } - (void)removeAction: (QtAction *)action { toQt(self)->removeAction(toQt(action)); } - (void)resizeTo: (of_dimension_t)size { toQt(self)->resize(toQt(size)); } - (void)setAttribute: (Qt::WidgetAttribute)attribute to: (bool)on { toQt(self)->setAttribute(attribute, on); } - (void)setContentsMarginsWithLeft: (qreal)left top: (qreal)top right: (qreal)right bottom: (qreal)bottom { toQt(self)->setContentsMargins(left, top, right, bottom); } - (void)setAutoRepeat: (bool)enabled forShortcut: (int)ID { toQt(self)->setShortcutAutoRepeat(ID, enabled); } - (void)setEnabled: (bool)enabled forShortcut: (int)ID { toQt(self)->setShortcutEnabled(ID, enabled); } - (bool)testAttribute: (Qt::WidgetAttribute)attribute { return toQt(self)->testAttribute(attribute); } - (void)unsetLayoutDirection { toQt(self)->unsetLayoutDirection(); } - (void)unsetWindowFrameMargins { toQt(self)->unsetWindowFrameMargins(); } @end |
Changes to src/QtWidgets/QtWidget.mm.
98 99 100 101 102 103 104 | - (of_dimension_t)baseSize { return toOF(toQt(self)->baseSize()); } - (void)setBaseSize: (of_dimension_t)baseSize { | | | 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 | - (of_rectangle_t)geometry { return toOF(toQt(self)->geometry()); } - (void)setGeometry: (of_rectangle_t)geometry { | | | 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 | - (of_dimension_t)maximumSize { return toOF(toQt(self)->maximumSize()); } - (void)setMaximumSize: (of_dimension_t)maximumSize { | | | 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 | - (of_dimension_t)minimumSize { return toOF(toQt(self)->minimumSize()); } - (void)setMinimumSize: (of_dimension_t)minimumSize { | | | 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 | - (of_dimension_t)size { return toOF(toQt(self)->size()); } - (void)resizeTo: (of_dimension_t)size { | | | | 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 | - (QPalette::ColorRole)foregroundRole { return toQt(self)->foregroundRole(); } - (QPixmap)grabRectangle: (of_rectangle_t)rectangle { | | | 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 | { toQt(self)->render(target, toQt(targetOffset), sourceRegion, renderFlags); } - (void)repaintInRectangle: (of_rectangle_t)rect { | | | 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 | toQt(self)->scroll(dx, dy); } - (void)scrollRight: (int)dx down: (int)dy inRectangle: (of_rectangle_t)rect { | | | 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 | - (void)setFixedHeight: (int)height { toQt(self)->setFixedHeight(height); } - (void)setFixedSize: (of_dimension_t)size { | | | 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 | - (void)ungrabGesture: (Qt::GestureType)gesture { toQt(self)->ungrabGesture(gesture); } - (void)updateInRectangle: (of_rectangle_t)rect { | | | 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); } |
Changes to src/common/helpers.h.
48 49 50 51 52 53 54 | static OF_INLINE of_dimension_t toOF(const QSize &qSize) { return of_dimension(qSize.width(), qSize.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); } } |