repos
/
kde.examples
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Use C++ style overload resolution.
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")
15:30:05 '
22
(catalog-name (cffi:null-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 :args (list
21:29:56 '
32
app-name catalog-name program-name
'
33
version description
'
34
kde:about-data.+license-lgpl-v2+
'
35
copyright text homepage email))))
2009-04-02 tobias
36
(cxx:add-author aboutdata
2009-05-24 tobias
37
(kde:ki18n "Tobias Rautenkranz")
21:29:56 '
38
(make-instance 'kde:localized-string)
2009-04-17 tobias
39
"tobias@rautenkranz.ch")
2009-04-02 tobias
40
aboutdata)))
22:16:06 '
41
'
42
(defun mandelbrot ()
'
43
(kde:with-app (make-aboutdata)
'
44
(let* ((window (make-instance 'kde:xml-gui-window))
'
45
(mandelbrot (make-instance 'mandelbrotwidget))
2010-04-03 tobias
46
(resource-dir (directory-namestring
17:19:09 '
47
(mb.sysdef:component-pathname
'
48
(mb.sysdef:find-component :kde.examples "src")))))
'
49
2009-04-02 tobias
50
(cxx:add-resource-dir (kde:global.dirs)
22:16:06 '
51
"icon" resource-dir)
'
52
(cxx:add-resource-dir (kde:global.dirs)
'
53
"apps" resource-dir)
'
54
(cxx:quit (find-class 'kde:standard-action)
'
55
window (qt:qslot "close()")
'
56
(cxx:action-collection window))
'
57
'
58
(kde:make-standard-action kde:standard-action.+redisplay+
'
59
(cxx:action-collection window)
'
60
#'(lambda () (zoom mandelbrot 1d0)))
'
61
'
62
(kde:make-standard-action kde:standard-action.+zoom-in+
'
63
(cxx:action-collection window)
'
64
#'(lambda () (zoom mandelbrot 0.5d0)))
'
65
'
66
(kde:make-standard-action kde:standard-action.+zoom-out+
'
67
(cxx:action-collection window)
'
68
#'(lambda () (zoom mandelbrot 2d0)))
'
69
'
70
(cxx:set-central-widget window mandelbrot)
'
71
(cxx:set-focus mandelbrot)
'
72
(setup-slot mandelbrot)
'
73
2009-05-24 tobias
74
(cxx:add-resource-dir (kde:global.dirs)
21:29:56 '
75
"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))))