License
Annotate for file src/mandelbrot/mandelbrot.lisp
2009-04-14 tobias 1 ;;; Copyright (C) 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
14:32:06 ' 2 ;;;
' 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 (make-instance 'qt:byte-array :args '("kmandelbrot")))
15:30:05 ' 22 (catalog-name (make-instance 'qt:byte-array))
2009-04-02 tobias 23 (program-name (kde:ki18n "KMandelbrot"))
2009-04-17 tobias 24 (version (make-instance 'qt:byte-array :args '("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 (make-instance 'qt:byte-array
15:30:05 ' 29 :args '("http://tobias.rautenkranz.ch")))
' 30 (email (make-instance 'qt:byte-array
' 31 :args '("bugs@tobias.rautenkranz.ch"))))
2009-04-02 tobias 32 (let ((aboutdata
2009-05-24 tobias 33 (make-instance 'kde:about-data :args (list
21:29:56 ' 34 app-name catalog-name program-name
' 35 version description
' 36 kde:about-data.+license-lgpl-v2+
' 37 copyright text homepage email))))
2009-04-02 tobias 38 (cxx:add-author aboutdata
2009-05-24 tobias 39 (kde:ki18n "Tobias Rautenkranz")
21:29:56 ' 40 (make-instance 'kde:localized-string)
2009-04-17 tobias 41 (make-instance 'qt:byte-array :args '("tobias@rautenkranz.ch")))
2009-04-02 tobias 42 aboutdata)))
22:16:06 ' 43
' 44 (defun mandelbrot ()
' 45 (kde:with-app (make-aboutdata)
' 46 (let* ((window (make-instance 'kde:xml-gui-window))
' 47 (mandelbrot (make-instance 'mandelbrotwidget))
2010-04-03 tobias 48 (resource-dir (directory-namestring
17:19:09 ' 49 (mb.sysdef:component-pathname
' 50 (mb.sysdef:find-component :kde.examples "src")))))
' 51
2009-04-02 tobias 52 (cxx:add-resource-dir (kde:global.dirs)
22:16:06 ' 53 "icon" resource-dir)
' 54 (cxx:add-resource-dir (kde:global.dirs)
' 55 "apps" resource-dir)
' 56 (cxx:quit (find-class 'kde:standard-action)
' 57 window (qt:qslot "close()")
' 58 (cxx:action-collection window))
' 59
' 60 (kde:make-standard-action kde:standard-action.+redisplay+
' 61 (cxx:action-collection window)
' 62 #'(lambda () (zoom mandelbrot 1d0)))
' 63
' 64 (kde:make-standard-action kde:standard-action.+zoom-in+
' 65 (cxx:action-collection window)
' 66 #'(lambda () (zoom mandelbrot 0.5d0)))
' 67
' 68 (kde:make-standard-action kde:standard-action.+zoom-out+
' 69 (cxx:action-collection window)
' 70 #'(lambda () (zoom mandelbrot 2d0)))
' 71
' 72 (cxx:set-central-widget window mandelbrot)
' 73 (cxx:set-focus mandelbrot)
' 74 (setup-slot mandelbrot)
' 75
2009-05-24 tobias 76 (cxx:add-resource-dir (kde:global.dirs)
21:29:56 ' 77 "data" resource-dir)
2009-04-02 tobias 78 (cxx:setup-gui window)
22:16:06 ' 79
' 80 (cxx:show window)
2009-05-24 tobias 81 (qt:exec))))