repos
/
kde.examples
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Work around null pointer for references bug
Annotate for file src/mandelbrot/mandelbrot.lisp
2010-04-03 tobias
1
;;; Copyright (C) 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
2009-04-14 tobias
2
;;;
14:32:06 '
3
;;; This program is free software: you can redistribute it and/or modify
'
4
;;; it under the terms of the GNU General Public License as published by
'
5
;;; the Free Software Foundation, either version 3 of the License, or
'
6
;;; (at your option) any later version.
'
7
;;;
'
8
;;; This program is distributed in the hope that it will be useful,
'
9
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
'
10
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'
11
;;; GNU General Public License for more details.
'
12
;;;
'
13
;;; You should have received a copy of the GNU General Public License
'
14
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
'
15
2010-04-03 tobias
16
(in-package :kde.examples)
17:19:09 '
17
'
18
(declaim (optimize (debug 3)))
2009-04-02 tobias
19
22:16:06 '
20
(defun make-aboutdata ()
2009-04-17 tobias
21
(let ((app-name "kmandelbrot")
2009-05-24 tobias
22
(catalog-name "") ;; not (null-pointer) (see smoke::conversion-pointer)
2009-04-02 tobias
23
(program-name (kde:ki18n "KMandelbrot"))
2009-04-17 tobias
24
(version "0.0.1")
2009-04-02 tobias
25
(description (kde:ki18n "KDE Mandelbrot program."))
22:16:06 '
26
(copyright (kde:ki18n "Copyright (c) 2009 Tobias Rautenkranz"))
'
27
(text (kde:ki18n "TODO"))
2009-04-17 tobias
28
(homepage "http://tobias.rautenkranz.ch/lisp/cl-smoke/")
15:30:05 '
29
(email "bugs@tobias.rautenkranz.ch"))
2009-04-02 tobias
30
(let ((aboutdata
2009-05-24 tobias
31
(make-instance 'kde:about-data
21:29:56 '
32
:args (list
'
33
app-name catalog-name program-name
'
34
version description
'
35
kde:about-data.+license-lgpl-v2+
'
36
copyright text homepage email))))
2009-04-02 tobias
37
(cxx:add-author aboutdata
2009-05-24 tobias
38
(kde:ki18n "Tobias Rautenkranz")
21:29:56 '
39
(make-instance 'kde:localized-string)
'
40
"tobias@rautenkranz.ch")
2009-04-02 tobias
41
aboutdata)))
22:16:06 '
42
'
43
(defun mandelbrot ()
'
44
(kde:with-app (make-aboutdata)
'
45
(let* ((window (make-instance 'kde:xml-gui-window))
'
46
(mandelbrot (make-instance 'mandelbrotwidget))
2010-04-03 tobias
47
(resource-dir (directory-namestring
17:19:09 '
48
(mb.sysdef:component-pathname
'
49
(mb.sysdef:find-component :kde.examples "src")))))
'
50
2009-04-02 tobias
51
(cxx:add-resource-dir (kde:global.dirs)
22:16:06 '
52
"icon" resource-dir)
'
53
(cxx:add-resource-dir (kde:global.dirs)
'
54
"apps" resource-dir)
'
55
(cxx:quit (find-class 'kde:standard-action)
'
56
window (qt:qslot "close()")
'
57
(cxx:action-collection window))
'
58
'
59
(kde:make-standard-action kde:standard-action.+redisplay+
'
60
(cxx:action-collection window)
'
61
#'(lambda () (zoom mandelbrot 1d0)))
'
62
'
63
(kde:make-standard-action kde:standard-action.+zoom-in+
'
64
(cxx:action-collection window)
'
65
#'(lambda () (zoom mandelbrot 0.5d0)))
'
66
'
67
(kde:make-standard-action kde:standard-action.+zoom-out+
'
68
(cxx:action-collection window)
'
69
#'(lambda () (zoom mandelbrot 2d0)))
'
70
'
71
(cxx:set-central-widget window mandelbrot)
'
72
(cxx:set-focus mandelbrot)
'
73
(setup-slot mandelbrot)
'
74
2009-05-24 tobias
75
(cxx:add-resource-dir (kde:global.dirs) "data" resource-dir)
2009-04-02 tobias
76
(cxx:setup-gui window)
22:16:06 '
77
'
78
(cxx:show window)
2009-05-24 tobias
79
(qt:exec window))))