[GRASS-SVN] r46249 - in grass/branches/develbranch_6/gui:
icons/grass wxpython wxpython/gui_modules wxpython/icons
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 12 16:46:48 EDT 2011
Author: martinl
Date: 2011-05-12 13:46:48 -0700 (Thu, 12 May 2011)
New Revision: 46249
Added:
grass/branches/develbranch_6/gui/icons/grass/print-compose.png
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
grass/branches/develbranch_6/gui/wxpython/icons/icon.py
grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: Tools Toolbar introduced
(merge r46248 from trunk)
Copied: grass/branches/develbranch_6/gui/icons/grass/print-compose.png (from rev 46248, grass/trunk/gui/icons/grass/print-compose.png)
===================================================================
(Binary files differ)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2011-05-12 20:44:36 UTC (rev 46248)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2011-05-12 20:46:48 UTC (rev 46249)
@@ -127,7 +127,6 @@
#
# Fancy gui
#
- # self._mgr = auimgr
self._mgr = wx.aui.AuiManager(self)
#
@@ -341,7 +340,7 @@
Layer(0))
self._mgr.AddPane(self.toolbars['vdigit'],
wx.aui.AuiPaneInfo().
- Name("vdigittoolbar").Caption(_("Vector digitizer toolbar")).
+ Name("vdigittoolbar").Caption(_("Vector Digitizer Toolbar")).
ToolbarPane().Top().Row(1).
LeftDockable(False).RightDockable(False).
BottomDockable(False).TopDockable(True).
@@ -412,7 +411,7 @@
Layer(0))
self._mgr.AddPane(self.toolbars['nviz'],
wx.aui.AuiPaneInfo().
- Name("nviztoolbar").Caption(_("3D view toolbar")).
+ Name("nviztoolbar").Caption(_("3D View Toolbar")).
ToolbarPane().Top().Row(1).
LeftDockable(False).RightDockable(False).
BottomDockable(False).TopDockable(True).
@@ -436,7 +435,7 @@
self._mgr.AddPane(self.toolbars['map'],
wx.aui.AuiPaneInfo().
- Name("maptoolbar").Caption(_("Map toolbar")).
+ Name("maptoolbar").Caption(_("Map Toolbar")).
ToolbarPane().Top().
LeftDockable(False).RightDockable(False).
BottomDockable(False).TopDockable(True).
@@ -452,7 +451,7 @@
self._mgr.AddPane(self.toolbars['georect'],
wx.aui.AuiPaneInfo().
- Name("georecttoolbar").Caption(_("Georectification toolbar")).
+ Name("georecttoolbar").Caption(_("Georectification Toolbar")).
ToolbarPane().Top().
LeftDockable(False).RightDockable(False).
BottomDockable(False).TopDockable(True).
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-05-12 20:44:36 UTC (rev 46248)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-05-12 20:46:48 UTC (rev 46249)
@@ -14,6 +14,7 @@
- ModelToolbar
- HistogramToolbar
- LayerManagerToolbar
+ - ToolsToolbar
(C) 2007-2011 by the GRASS Development Team
This program is free software under the GNU General Public License
@@ -1588,28 +1589,68 @@
self.addovl = wx.NewId()
self.delcmd = wx.NewId()
self.attribute = wx.NewId()
- self.vdigit = wx.NewId()
self.preferences = wx.NewId()
- self.modeler = wx.NewId()
icons = Icons['layerManager']
- return self._getToolbarData(((self.newdisplay, 'newdisplay', icons["newdisplay"], self.parent.OnNewMenu),
+ return self._getToolbarData(((self.newdisplay, 'newdisplay', icons["newdisplay"],
+ self.parent.OnNewMenu),
(None, ),
- (self.workspaceLoad, 'workspaceLoad', icons["workspaceLoad"], self.parent.OnLoadMenu),
- (self.workspaceOpen, 'workspaceOpen', icons["workspaceOpen"], self.parent.OnWorkspaceOpen),
- (self.workspaceSave, 'workspaceSave', icons["workspaceSave"], self.parent.OnWorkspaceSave),
+ (self.workspaceLoad, 'workspaceLoad', icons["workspaceLoad"],
+ self.parent.OnLoadMenu),
+ (self.workspaceOpen, 'workspaceOpen', icons["workspaceOpen"],
+ self.parent.OnWorkspaceOpen),
+ (self.workspaceSave, 'workspaceSave', icons["workspaceSave"],
+ self.parent.OnWorkspaceSave),
(None, ),
- (self.addrast, 'addRast', icons["addRast"], self.parent.OnAddRaster),
- (self.rastmisc, 'rastMisc', icons["rastMisc"], self.parent.OnAddRasterMisc),
- (self.addvect, 'addVect', icons["addVect"], self.parent.OnAddVector),
- (self.vectmisc, 'vectMisc', icons["vectMisc"], self.parent.OnAddVectorMisc),
- (self.addgrp, 'addGroup', icons["addGroup"], self.parent.OnAddGroup),
- (self.addovl, 'addOverlay', icons["addOverlay"], self.parent.OnAddOverlay),
- (self.delcmd, 'delCmd', icons["delCmd"], self.parent.OnDeleteLayer),
+ (self.addrast, 'addRast', icons["addRast"],
+ self.parent.OnAddRaster),
+ (self.rastmisc, 'rastMisc', icons["rastMisc"],
+ self.parent.OnAddRasterMisc),
+ (self.addvect, 'addVect', icons["addVect"],
+ self.parent.OnAddVector),
+ (self.vectmisc, 'vectMisc', icons["vectMisc"],
+ self.parent.OnAddVectorMisc),
+ (self.addgrp, 'addGroup', icons["addGroup"],
+ self.parent.OnAddGroup),
+ (self.addovl, 'addOverlay', icons["addOverlay"],
+ self.parent.OnAddOverlay),
+ (self.delcmd, 'delCmd', icons["delCmd"],
+ self.parent.OnDeleteLayer),
(None, ),
- (self.vdigit, 'vdigit', icons["vdigit"], self.parent.OnVDigit),
- (self.attribute, 'attrTable', icons["attrTable"], self.parent.OnShowAttributeTable),
+ (self.attribute, 'attrTable', icons["attrTable"],
+ self.parent.OnShowAttributeTable),
(None, ),
- (self.modeler, 'modeler', icons["modeler"], self.parent.OnGModeler),
- (self.preferences, 'preferences', icons["settings"], self.parent.OnPreferences))
- )
+ (self.preferences, 'preferences', icons["settings"],
+ self.parent.OnPreferences)
+ ))
+
+class ToolsToolbar(AbstractToolbar):
+ """!Layer Manager Tools toolbar (see wxgui.py)
+ """
+ def __init__(self, parent):
+ AbstractToolbar.__init__(self, parent)
+
+ self.InitToolbar(self._toolbarData())
+
+ # realize the toolbar
+ self.Realize()
+
+ def _toolbarData(self):
+ """!Toolbar data
+ """
+ self.georect = wx.NewId()
+ self.modeler = wx.NewId()
+ self.vdigit = wx.NewId()
+ self.mapOutput = wx.NewId()
+
+ icons = Icons['layerManager']
+ return self._getToolbarData(((self.vdigit, 'vdigit', icons["vdigit"],
+ self.parent.OnVDigit),
+ (self.georect, 'georectify', Icons["georectify"]["georectify"],
+ self.parent.OnGCPManager),
+ (self.modeler, 'modeler', icons["modeler"],
+ self.parent.OnGModeler),
+ (self.mapOutput, 'mapOutput', icons['mapOutput'],
+ self.parent.OnPsMap)
+ ))
+
Modified: grass/branches/develbranch_6/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-05-12 20:44:36 UTC (rev 46248)
+++ grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-05-12 20:46:48 UTC (rev 46249)
@@ -263,9 +263,11 @@
'settings' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
label = _('Show GUI settings')),
'modeler' : MetaIcon(img = iconSet.get('modeler-main', wx.ART_ERROR),
- label = _('Start Graphical Modeler')),
- "layerOptions" : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
+ label = _('Graphical Modeler')),
+ 'layerOptions' : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
label = _('Set options')),
+ 'mapOutput' : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
+ label = _('Hardcopy Map Ouput Utility')),
},
'vdigit' : {
'addPoint' : MetaIcon(img = iconSet.get('point-create', wx.ART_ERROR),
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-05-12 20:44:36 UTC (rev 46248)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-05-12 20:46:48 UTC (rev 46249)
@@ -82,7 +82,7 @@
from gui_modules import nviz_tools
from gui_modules.debug import Debug
from gui_modules.ghelp import MenuTreeWindow, AboutWindow, InstallExtensionWindow
-from gui_modules.toolbars import LayerManagerToolbar
+from gui_modules.toolbars import LayerManagerToolbar, ToolsToolbar
from icons.icon import Icons
UserSettings = preferences.globalSettings
@@ -128,9 +128,27 @@
self.menucmd = self.menubar.GetCmd()
self.statusbar = self.CreateStatusBar(number=1)
self.notebook = self.__createNoteBook()
- self.toolbar = LayerManagerToolbar(parent = self)
- self.SetToolBar(self.toolbar)
+ self.toolbars = { 'main' : LayerManagerToolbar(parent = self),
+ 'tools' : ToolsToolbar(parent = self) }
+ # self.SetToolBar(self.toolbar)
+ self._auimgr.AddPane(self.toolbars['main'],
+ wx.aui.AuiPaneInfo().
+ Name("toolbar").Caption(_("Main Toolbar")).
+ ToolbarPane().Top().
+ LeftDockable(False).RightDockable(False).
+ BottomDockable(False).TopDockable(True).
+ CloseButton(False).Layer(3).
+ BestSize((self.toolbars['main'].GetSize())))
+ self._auimgr.AddPane(self.toolbars['tools'],
+ wx.aui.AuiPaneInfo().
+ Name("toolbar").Caption(_("Tools Toolbar")).
+ ToolbarPane().Top().
+ LeftDockable(False).RightDockable(False).
+ BottomDockable(False).TopDockable(True).
+ CloseButton(False).Layer(2).
+ BestSize((self.toolbars['tools'].GetSize())))
+
# bindings
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
More information about the grass-commit
mailing list