repos
/
qt.examples
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
Lisp image loading
Annotate for file src/i18n-hello-world.lisp
2009-04-14 tobias
1
;;; Copyright 2009 Tobias Rautenkranz
14:29:22 '
2
;;; License: X11 license
'
3
2009-04-05 tobias
4
(in-package :qt.examples)
15:36:46 '
5
'
6
(defun i18n-hello-world ()
'
7
"i18n hello world"
2009-07-01 tobias
8
(qt:with-app
2009-05-14 tobias
9
;; ensures that the message catalogs are found regardless
12:27:03 '
10
;; of the current directory.
'
11
(let ((source-path (directory-namestring
'
12
(mb.sysdef:input-file
'
13
(mb.sysdef:find-component :qt.examples "src"
'
14
"i18n-hello-world")))))
'
15
(qt:with-translator ("hello-world"
'
16
*default-pathname-defaults*
'
17
source-path)
'
18
(let ((widget (make-instance 'qt:label)))
'
19
(setf (cxx:window-title widget) (qt:tr "Lisp Qt Example" "hello-world")
'
20
(cxx:text widget) (format nil (qt:tr "<h1>Hello world</h1>
2009-04-05 tobias
21
15:36:46 '
22
You are running ~A version ~A on a ~A ~A")
2009-05-14 tobias
23
(lisp-implementation-type)
12:27:03 '
24
(lisp-implementation-version)
'
25
(software-type)
'
26
(software-version)))
'
27
(cxx:show widget)
'
28
(qt:exec widget))))))