/ src / signal-slot /
src/signal-slot/signal-slot.lisp
1 (in-package :cl-smoke.qt.core)
2
3
4 (defclass funcallable-smoke-class (closer-mop:funcallable-standard-class
5 cxx:class)
6 ())
7
8 (defmethod closer-mop:validate-superclass ((class funcallable-smoke-class)
9 (superclass closer-mop:funcallable-standard-class))
10 t)
11
12 (defgeneric id (method))
13
14 (defun munged-name-p (name)
15 "Returns true when NAME is a METHOD, SLOT or SIGNAL."
16 (and (> (length name) 0)
17 (case (aref name 0)
18 ((#\0 #\1 #\2) t)
19 (t nil))))
20
21 (defun qt:qmethod (name)
22 "Equivalent of the METHOD(a) CPP macro."
23 (assert (not (munged-name-p name)))
24 (format nil "0~A" name))
25
26 (defun qt:qslot (name)
27 "Equivalent of the SLOT(a) CPP macro."
28 (assert (not (munged-name-p name)))
29 (format nil "1~A" name))
30
31 (defun qt:qsignal (name)
32 "Equivalent of the SIGNAL(a) CPP macro."
33 (assert (not (munged-name-p name)))
34 (format nil "2~A" name))
35