Sun Apr 5 19:58:25 CEST 2009 Tobias Rautenkranz * initial import diff -rN -u old-doc/Makefile new-doc/Makefile --- old-doc/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/Makefile 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,22 @@ +# +# Dependancies: +# xmllint xsltproc docbook +# + +all: manual.html index.html + +DEPENDANCIES := *docbook *.xsl ../qt.examples/src/*.lisp ../kde.examples/src/*.lisp + +manual.html: $(DEPENDANCIES) + xmllint --xinclude --postvalid manual.docbook > /dev/null + xsltproc --xinclude -o $@ manual.xsl manual.docbook + +index.html: $(DEPENDANCIES) +# xsltproc --xinclude --stringparam base.dir "manual/" chunk.xsl manual.docbook + xsltproc --xinclude chunk.xsl manual.docbook + + + +.PHONY: clean +clean: + rm -f -- *.html diff -rN -u old-doc/chunk.xsl new-doc/chunk.xsl --- old-doc/chunk.xsl 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/chunk.xsl 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,14 @@ + + + + + + + + + + + Binary files old-doc/class-browser.png and new-doc/class-browser.png differ Binary files old-doc/hello-world.png and new-doc/hello-world.png differ Binary files old-doc/i18n-hello-world.png and new-doc/i18n-hello-world.png differ diff -rN -u old-doc/introduction.docbook new-doc/introduction.docbook --- old-doc/introduction.docbook 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/introduction.docbook 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,76 @@ + + + +Introduction + + CL-Smoke provides CLOS bindings for the Qt and KDE libraries. + +
Related + + + CommonQt (No CLOS, no startup overhead) + + Lisp-CFFI-Qt4 (dead) + +
+
Limitations + + Bad multithreaded performance + due to a lock for the global hash-tables. + No C++ style argument conversion. + No custom overloading methods by argument count. + Limited conversions. E.g. QList<T> is missing. + + 10 seconds startup time (for qt.examples) on a + Pentium M 1.7GHz. (Compilation ~20 seconds) + Needs to be recompiled when the Smoke library is updated. + Saving a core image is not supported. + +
+
Installation +
Dependencies + + Smoke2 + bindings 4.2 or later + Qt + (development package) + + CMake 2.6 + + a make program (preferably Gnu Make) + a C++ compiler (GCC) + + +On the Lisp side you need mudballs +and sysdef.cmake. + +
+ +
Supported Platforms + + SBCL on Linux x86 in works; CMUCL and CLisp currently do not. + It should be possible to get it to work (with SBCL) on + other platforms. Contact me if you have any questions. + +
+
Installation + + You need to checkout the darcs repositories: + +cd SOME_DIR +for r in smoke qt qt.test qt.tests qt.examples qt.uitools qt.webkit kde kde.tests kde.examples; do + darcs get "http://tobias.rautenkranz.ch/lisp/cl-smoke/$r" +done + + Then add the directory SOME_DIR to the mudballs search paths by adding + +(push (wildcard-searcher "SOME_DIR/*/*.mbd") + *custom-search-modules*) + + to ~/.mudballs. + +
+
+
diff -rN -u old-doc/kde.docbook new-doc/kde.docbook --- old-doc/kde.docbook 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/kde.docbook 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,64 @@ + + + +KDE + +Besiedes the :kde package there +is :kde.tests for the unit tests and +:kde.examples containing the examples. + + +
Examples + +The examples can be run with: + +(mb:load :kde.examples) + +An the running the function of the example; e.g.: + +(kde.examples:mandelbrot) + + + +Hello World + + + + + + + + + + + + + +KMandelbrot + + + + + + + + + A port of the + + Qt Mandelbrot example to KDE. +
+ +The Mandelbrot example shows how to use a worker thread to perform heavy computations without blocking the main thread's event loop. + +
+ The sources can be found in the + src/mandelbrot/ + directory of the :kde.examples package + +
+
+
+ +
Binary files old-doc/kde.hello-world.png and new-doc/kde.hello-world.png differ Binary files old-doc/kmandelbrot.png and new-doc/kmandelbrot.png differ diff -rN -u old-doc/link-apidoc.xsl new-doc/link-apidoc.xsl --- old-doc/link-apidoc.xsl 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/link-apidoc.xsl 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -rN -u old-doc/manual.docbook new-doc/manual.docbook --- old-doc/manual.docbook 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/manual.docbook 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,35 @@ + + + + + +CL-Smoke + + +Tobias +Rautenkranz +mail #\@ tobias #\. rautenkranz #\. ch + + + + +2009 +Tobias Rautenkranz + +FDL +2009-03-25 +0.0.1 + + +Common Lisp bindings for Qt and KDE using Smoke. + + + + + + + + + + diff -rN -u old-doc/manual.xsl new-doc/manual.xsl --- old-doc/manual.xsl 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/manual.xsl 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,8 @@ + + + + + + + diff -rN -u old-doc/qt.docbook new-doc/qt.docbook --- old-doc/qt.docbook 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/qt.docbook 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,174 @@ + + + +Qt + +Besieds the :qt there are these packages: with + + + :qt.uitools + + QtUiTools + :qt.test + + QtTest + :qt.webkit + + QtWebKit + + +which provied bindings for their Qt module. +Additionally there is the :qt.tests system, containing +the unit tests and :qt.examples for various examples. + + +
QApplication + +The qt:application object should created with: +qt:with-app. In its body the event loop can be +started with qt:exec. + + +Hello World + + + + + + + + + + + +
+ +
Signal-Slot + +qt:connect connects a signal to a slot. +The signal is either a qt:qsignal created with +qt:make-signal or a C++ signal by using +qt:get-signal. +The slot can be a slot returned by qt:make-slot, a function +or a C++ slot a return from qt:get-slot. + +Quit + + + + + +When the argument types for a slot or signal are not specified they are determined when +the first connection is made. Note that when connecting a qt:qsignal +to a qt:qslot at least one must have its arguments types specified. + + + +The functionality of the Qt SIGNAL and SLOT macros is +provided by qt:qsignal and qt:qslot. + +
+ +
Properties + +qt:object properties can be accessed with +qt:property (setf-able). +The name of the property can be either a string in C++ style or a symbol in Lisp style. + + + +(let ((object (make-instance 'qt:object))) + (setf (qt:property object 'object-name) "Foo") + (assert (string= "Foo" (qt:property object "objectName")))) + + + +
+ + +
i18n + +You can use qt:tr to translate strings. + + +i18n Hello World + + + + + + + + + + + + + +<filename>hello-world_de.po</filename> + + + + + + + + + +Gettext is used to extract the i18n strings and compile the message catalog. +See CMakeLists.txt +and UseClQti18n.cmake +in the src directory of :qt.examples how to do this. + +
+ +
Examples + +You can run the examples with: + +(mb:load :qt.examples) +(qt.examples:launcher) + + + + +Repl + +Use a qt:string-list-model with a qt:list-view +to show evaluated lisp expressions. + + + + + + + + + + + + + + +Class Browser +Qt Classes browser using :qt.webkit to display the +API doc and a custom qt:list-model +for the qt:list-view of the available classes. + + + + + + + + + + + + + +
+ +
Binary files old-doc/repl.png and new-doc/repl.png differ diff -rN -u old-doc/smoke.docbook new-doc/smoke.docbook --- old-doc/smoke.docbook 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/smoke.docbook 2014-10-30 07:14:32.000000000 +0100 @@ -0,0 +1,101 @@ + + + +Usage + +
Symbols + +C++ names are converted to Lisp symbols by converting camelCase +to camel-case. Underscores #\_ are replaced with +#\- and a leading uppercase K or Q is removed. + + +E.g.: QHelloWorld_foo becomes hello-world-foo. + +
+ +
Class + +C++ classes have a corresponding CLOS class. The can be used like any CLOS class; E.g: +to make a QObject instance: + + +(make-instance 'qt:object) + + +Suppy arguments as list to the :args keyword: + + +(let ((parent (make-instance 'qt:object))) + (make-instance 'qt:object :args (list parent))) + + + + +To extend a C++ class you have to use cxx:class as metaclass: + + +(defclass my-object (qt:object) + () + (:metaclass cxx:class)) + + + +
+ +
Methods + +The C++ methods are generic functions in the :cxx package. +Their lambda list is: (object &rest args). + + +The C++ method call: myInstance->frob(1); is in Lisp: + +(frob my-instance 1) + + + +You can extend the :cxx generic functions by +adding methods. :around, :before, :after +and (call-next-method) are supported. + +
+ +
Static Methods + +The static C++ method QByteArray::number(int n, int base=10) +can be called by: + +(qt:byte-array.number 37) + +which is equivalent to the C++ code QByteArray::number(37);. +Or with: + +(cxx:number (find-class 'qt:byte-array) 37) + + + +
+ +
Constants + + C++ Class enums available as constants. E.g.: + QColor::Rgb is qt:color.+rgb+. + See :cxx-support. + +
+ +
Garbage Collection + +You should be able to use C++ Class instances like normal Lisp object. + + +C++ classes are automaticly deleted when their lisp object gets garbage collected; +except when they (QObjects) have a parent and thus the parent is responsible for +their deletion. When a qt:object has a parent, a strong +reference is kept to prevent its garbage collection until the parent is deleted. + +
+ +