QVector translations --> to head
Wed Mar 10 18:13:52 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Delete QPainDevices before the QApplication is destroyed.
hunk ./src/application.lisp 14
+ ;; QPaintDevices are only valid when a application object exists.
+ (loop for object being the hash-values of smoke::*object-map* do
+ (when (typep object 'qt:paint-device)
+ (delete-object object)))
Mon Jan 25 20:09:40 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix with-app cleanup
hunk ./src/application.lisp 5
-(defmethod delete-app :around ((application qt:application))
+(defmethod cl-smoke.qt.core:delete-app :around ((application qt:application))
hunk ./src/application.lisp 14
+ ;; Finalize other stuff before deleting the QApplication,
+ ;; e.g. QGraphicsScene
+ (tg:gc :full t)
Mon Jan 25 19:50:16 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix with-painter
hunk ./src/painter.lisp 10
- (when paint-device
- `(let ((,painter (make-instance 'qt:painter :arg0 ,paint-device)))
- (assert (cxx:is-active ,painter)
- (,painter)
- "Painter ~A for ~A is not active"
- ,painter ,paint-device)
- (unwind-protect
- (progn ,@body)
- (cxx:end ,painter)))
- `(progn (cxx:save ,painter)
- (unwind-protect
- (progn ,@body)
- (cxx:restore ,painter)))))
+ (if paint-device
+ `(let ((,painter (make-instance 'qt:painter :arg0 ,paint-device)))
+ (assert (cxx:is-active ,painter)
+ (,painter)
+ "Painter ~A for ~A is not active"
+ ,painter ,paint-device)
+ (unwind-protect
+ (progn ,@body)
+ (cxx:end ,painter)))
+ `(progn (cxx:save ,painter)
+ (unwind-protect
+ (progn ,@body)
+ (cxx:restore ,painter)))))
Mon Jan 25 19:49:07 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* QList<Foo*> translations
hunk ./src/translations.lisp 11
+(cl-smoke.qt.core::define-qlist-wrapper "QAction*" qt:action "void")
+(cl-smoke.qt.core::define-qlist-wrapper "QGraphicsItem*" qt:graphics-item "void")
+(cl-smoke.qt.core::define-qlist-wrapper "QStandardItem*" qt:standard-item "void")
+(cl-smoke.qt.core::define-qlist-wrapper "QWidget*" qt:widget "void")
+
Mon Jan 25 19:48:42 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* QVector<QPointF> translation
hunk ./src/translations.lisp 6
+(cl-smoke.qt.core:define-qvector-translations "QPointF" qt:point-f)
Mon Jan 25 19:48:17 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* ownership transfer QGraphicsScene::addItem
hunk ./src/ownership.lisp 69
+;; FIXME graphic-item has a lot more.
+(define-takes-ownership cxx:add-item ((this qt:graphics-scene) item)
+ item)
Sat Jan 23 20:48:00 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* QVector translations
hunk ./cl-smoke.qt.gui.asd 16
+ (:file "translations" :depends-on ("qt.gui"))
hunk ./src/application.lisp 30
- `(cl-smoke.qt.core::with-application ((cl-smoke.qt.core::ensure-app 'qt:application)
- (cl-smoke.qt.core::kill-app))
+ `(cl-smoke.qt.core:with-application ((cl-smoke.qt.core:ensure-app 'qt:application)
+ (cl-smoke.qt.core:kill-app))
hunk ./src/painter.lisp 3
-(defmacro qt:with-painter ((painter paint-device) &body body)
+(defmacro qt:with-painter ((painter &optional paint-device) &body body)
hunk ./src/painter.lisp 5
- during the evaluation of BODY.
+ during the evaluation of BODY. Or when PAINT-DEVICE is not
+specified, saves and restored the state of PAINTER around BODY.
hunk ./src/painter.lisp 10
- `(let ((,painter (make-instance 'qt:painter :arg0 ,paint-device)))
- (assert (cxx:is-active ,painter)
- (,painter)
- "Painter ~A for ~A is not active"
- ,painter ,paint-device)
- (unwind-protect
- (progn ,@body)
- (cxx:end ,painter))))
+ (when paint-device
+ `(let ((,painter (make-instance 'qt:painter :arg0 ,paint-device)))
+ (assert (cxx:is-active ,painter)
+ (,painter)
+ "Painter ~A for ~A is not active"
+ ,painter ,paint-device)
+ (unwind-protect
+ (progn ,@body)
+ (cxx:end ,painter)))
+ `(progn (cxx:save ,painter)
+ (unwind-protect
+ (progn ,@body)
+ (cxx:restore ,painter)))))
addfile ./src/translations.lisp
hunk ./src/translations.lisp 1
+(in-package :cl-smoke.qt.gui)
+
+;; QPoint has a trivial copy ctor and destructor, thus memcpying it
+;; should be fine.
+(cl-smoke.qt.core:define-qvector-translations "QPoint" qt:point)
+
+(cl-smoke.qt.core:define-qvector-translations "unsigned int"
+ (smoke:c-integer :unsigned-int))