2 |
# Authors: |
# Authors: |
3 |
# Jan-Oliver Wagner <[email protected]> |
# Jan-Oliver Wagner <[email protected]> |
4 |
# Bernhard Herzog <[email protected]> |
# Bernhard Herzog <[email protected]> |
5 |
|
# Frank Koormann <[email protected]> |
6 |
# |
# |
7 |
# This program is free software under the GPL (>=v2) |
# This program is free software under the GPL (>=v2) |
8 |
# Read the file COPYING coming with Thuban for details. |
# Read the file COPYING coming with Thuban for details. |
19 |
import os |
import os |
20 |
|
|
21 |
from wxPython.wx import * |
from wxPython.wx import * |
22 |
|
from wxPython.wx import __version__ as wxPython_version |
23 |
|
|
24 |
import Thuban |
import Thuban |
25 |
|
import Thuban.version |
26 |
|
|
27 |
from Thuban import _ |
from Thuban import _ |
28 |
from Thuban.Model.session import create_empty_session |
from Thuban.Model.session import create_empty_session |
29 |
from Thuban.Model.layer import Layer |
from Thuban.Model.layer import Layer |
436 |
|
|
437 |
def About(self): |
def About(self): |
438 |
self.RunMessageBox(_("About"), |
self.RunMessageBox(_("About"), |
439 |
_("Thuban v%s\n" |
_("Thuban %s\n" |
440 |
#"Build Date: %s\n" |
#"Build Date: %s\n" |
441 |
"\n" |
"using:\n" |
442 |
|
" %s\n" |
443 |
|
" %s\n\n" |
444 |
"Thuban is a program for\n" |
"Thuban is a program for\n" |
445 |
"exploring geographic data.\n" |
"exploring geographic data.\n" |
446 |
"Copyright (C) 2001-2003 Intevation GmbH.\n" |
"Copyright (C) 2001-2003 Intevation GmbH.\n" |
447 |
"Thuban is licensed under the GNU GPL" |
"Thuban is licensed under the GNU GPL" |
448 |
% __ThubanVersion__), #__BuildDate__)), |
% (Thuban.version.longversion, |
449 |
|
"wxPython %s" % wxPython_version, |
450 |
|
"Python %d.%d.%d" % sys.version_info[:3] |
451 |
|
)), |
452 |
|
# % __ThubanVersion__), #__BuildDate__)), |
453 |
wxOK | wxICON_INFORMATION) |
wxOK | wxICON_INFORMATION) |
454 |
|
|
455 |
def AddLayer(self): |
def AddLayer(self): |
675 |
def FullSelectionExtent(self): |
def FullSelectionExtent(self): |
676 |
self.canvas.FitSelectedToWindow() |
self.canvas.FitSelectedToWindow() |
677 |
|
|
678 |
|
def ExportMap(self): |
679 |
|
self.canvas.Export() |
680 |
|
|
681 |
def PrintMap(self): |
def PrintMap(self): |
682 |
self.canvas.Print() |
self.canvas.Print() |
683 |
|
|
829 |
_method_command("selected_full_extent", _("&Full selection extent"), "FullSelectionExtent", |
_method_command("selected_full_extent", _("&Full selection extent"), "FullSelectionExtent", |
830 |
helptext = _("Full Selection Extent"), icon = "fullselextent", |
helptext = _("Full Selection Extent"), icon = "fullselextent", |
831 |
sensitive = _has_selected_shapes) |
sensitive = _has_selected_shapes) |
832 |
|
_method_command("map_export", _("E&xport"), "ExportMap", |
833 |
|
helptext = _("Export the map to file")) |
834 |
_method_command("map_print", _("Prin&t"), "PrintMap", |
_method_command("map_print", _("Prin&t"), "PrintMap", |
835 |
helptext = _("Print the map")) |
helptext = _("Print the map")) |
836 |
_method_command("map_rename", _("&Rename..."), "RenameMap", |
_method_command("map_rename", _("&Rename..."), "RenameMap", |
873 |
_method_command("table_hide", _("&Hide"), "TableHide") |
_method_command("table_hide", _("&Hide"), "TableHide") |
874 |
_method_command("table_join", _("&Join..."), "TableJoin") |
_method_command("table_join", _("&Join..."), "TableJoin") |
875 |
|
|
876 |
# the menu structure |
# Export only under Windows ... |
877 |
main_menu = Menu("<main>", "<main>", |
map_menu = ["layer_add", "layer_remove", "map_rename", |
|
[Menu("file", _("&File"), |
|
|
["new_session", "open_session", None, |
|
|
"save_session", "save_session_as", None, |
|
|
"toggle_session_tree", None, |
|
|
"exit"]), |
|
|
Menu("map", _("&Map"), |
|
|
["layer_add", "layer_remove", "map_rename", |
|
878 |
None, |
None, |
879 |
"map_projection", |
"map_projection", |
880 |
None, |
None, |
887 |
"map_identify_tool", "map_label_tool", |
"map_identify_tool", "map_label_tool", |
888 |
None, |
None, |
889 |
"toggle_legend", |
"toggle_legend", |
890 |
None, |
None] |
891 |
"map_print"]), |
if wxPlatform == '__WXMSW__': |
892 |
|
map_menu.append("map_export") |
893 |
|
map_menu.append("map_print") |
894 |
|
|
895 |
|
# the menu structure |
896 |
|
main_menu = Menu("<main>", "<main>", |
897 |
|
[Menu("file", _("&File"), |
898 |
|
["new_session", "open_session", None, |
899 |
|
"save_session", "save_session_as", None, |
900 |
|
"toggle_session_tree", None, |
901 |
|
"exit"]), |
902 |
|
Menu("map", _("&Map"), map_menu), |
903 |
Menu("layer", _("&Layer"), |
Menu("layer", _("&Layer"), |
904 |
["layer_raise", "layer_lower", |
["layer_raise", "layer_lower", |
905 |
None, |
None, |