GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Statusbar manager for wx.Statusbar and SbItems. More...
Public Member Functions | |
def | __init__ |
Connects manager to statusbar. More... | |
def | SetProperty |
Sets property represented by one of contained SbItems. More... | |
def | GetProperty |
Returns property represented by one of contained SbItems. More... | |
def | HasProperty |
Checks whether property is represented by one of contained SbItems. More... | |
def | AddStatusbarItem |
Adds item to statusbar. More... | |
def | AddStatusbarItemsByClass |
Adds items to statusbar. More... | |
def | HideStatusbarChoiceItemsByClass |
Hides items showed in choice. More... | |
def | ShowStatusbarChoiceItemsByClass |
Shows items showed in choice. More... | |
def | ShowItem |
Invokes showing of particular item. More... | |
def | Update |
Updates statusbar. More... | |
def | Reposition |
Reposition items in statusbar. More... | |
def | GetProgressBar |
Returns progress bar. More... | |
def | OnToggleStatus |
Toggle status text. More... | |
def | SetMode |
Sets current mode. More... | |
def | GetMode |
Returns current mode. More... | |
Data Fields | |
mapFrame | |
statusbar | |
choice | |
statusbarItems | |
progressbar | |
Statusbar manager for wx.Statusbar and SbItems.
Statusbar manager manages items added by AddStatusbarItem method. Provides progress bar (SbProgress) and choice (wx.Choice). Items with position 0 are shown according to choice selection. Only one item of the same class is supposed to be in statusbar. Manager user have to create statusbar on his own, add items to manager and call Update method to show particular widgets. User settings (group = 'display', key = 'statusbarMode', subkey = 'selection') are taken into account.
generalize access to UserSettings (specify group, etc.)
add GetMode method using name instead of index
Definition at line 50 of file statusbar.py.
def statusbar.SbManager.__init__ | ( | self, | |
mapframe, | |||
statusbar | |||
) |
Connects manager to statusbar.
Creates choice and progress bar.
Definition at line 65 of file statusbar.py.
def statusbar.SbManager.AddStatusbarItem | ( | self, | |
item | |||
) |
Adds item to statusbar.
If item position is 0, item is managed by choice.
Definition at line 111 of file statusbar.py.
References statusbar.SbManager.statusbarItems, mapdisplay.MapFrame.statusbarItems, and frame.MapFrame.statusbarItems.
Referenced by statusbar.SbManager.AddStatusbarItemsByClass().
def statusbar.SbManager.AddStatusbarItemsByClass | ( | self, | |
itemClasses, | |||
kwargs | |||
) |
Adds items to statusbar.
itemClasses | list of classes of items to be add |
kwargs | SbItem constructor parameters |
Definition at line 122 of file statusbar.py.
References statusbar.SbManager.AddStatusbarItem().
def statusbar.SbManager.GetMode | ( | self | ) |
Returns current mode.
Definition at line 276 of file statusbar.py.
def statusbar.SbManager.GetProgressBar | ( | self | ) |
Returns progress bar.
Definition at line 260 of file statusbar.py.
References statusbar.SbManager.progressbar, and goutput.GMConsole.progressbar.
Referenced by mapdisplay.MapFrame.OnUpdateProgress(), and frame.MapFrame.OnUpdateProgress().
def statusbar.SbManager.GetProperty | ( | self, | |
name | |||
) |
Returns property represented by one of contained SbItems.
name | name of SbItem (from name attribute) |
Definition at line 93 of file statusbar.py.
References widgets.GetValue(), statusbar.SbManager.statusbarItems, mapdisplay.MapFrame.statusbarItems, and frame.MapFrame.statusbarItems.
def statusbar.SbManager.HasProperty | ( | self, | |
name | |||
) |
Checks whether property is represented by one of contained SbItems.
name | name of SbItem (from name attribute) |
Definition at line 100 of file statusbar.py.
References statusbar.SbManager.statusbarItems, mapdisplay.MapFrame.statusbarItems, and frame.MapFrame.statusbarItems.
def statusbar.SbManager.HideStatusbarChoiceItemsByClass | ( | self, | |
itemClasses | |||
) |
Hides items showed in choice.
Hides items with position 0 (items showed in choice) by removing them from choice.
itemClasses | list of classes of items to be hided |
Definition at line 134 of file statusbar.py.
References statusbar.SbManager._hiddenItems, and tools.range.
def statusbar.SbManager.OnToggleStatus | ( | self, | |
event | |||
) |
Toggle status text.
Definition at line 264 of file statusbar.py.
References manager.VirtualAttributeList.Update(), statusbar.SbManager.Update(), forms.UpdateQThread.Update(), model.Model.Update(), model.ModelObject.Update(), model.ModelAction.Update(), model.ModelData.Update(), model.ModelLoop.Update(), frame.VariablePanel.Update(), frame.ItemPanel.Update(), manager.TableListCtrl.Update(), and manager.LayerListCtrl.Update().
def statusbar.SbManager.Reposition | ( | self | ) |
Reposition items in statusbar.
Set positions to all items managed by statusbar manager. It should not be necessary to call it manually.
Definition at line 219 of file statusbar.py.
References statusbar.SbManager.choice.
Referenced by statusbar.SbManager.ShowItem().
def statusbar.SbManager.SetMode | ( | self, | |
modeIndex | |||
) |
Sets current mode.
Mode is usually driven by user through choice.
Definition at line 269 of file statusbar.py.
def statusbar.SbManager.SetProperty | ( | self, | |
name, | |||
value | |||
) |
Sets property represented by one of contained SbItems.
name | name of SbItem (from name attribute) |
value | value to be set |
Definition at line 85 of file statusbar.py.
References widgets.SetValue(), statusbar.SbManager.statusbarItems, mapdisplay.MapFrame.statusbarItems, and frame.MapFrame.statusbarItems.
Referenced by frame.MapFrame.SetProperties().
def statusbar.SbManager.ShowItem | ( | self, | |
itemName | |||
) |
Invokes showing of particular item.
Definition at line 173 of file statusbar.py.
References statusbar.SbManager._postInitialized, statusbar.SbManager.Reposition(), statusbar.SbManager.statusbarItems, mapdisplay.MapFrame.statusbarItems, and frame.MapFrame.statusbarItems.
def statusbar.SbManager.ShowStatusbarChoiceItemsByClass | ( | self, | |
itemClasses | |||
) |
Shows items showed in choice.
Shows items with position 0 (items showed in choice) by adding them to choice. Items are restored in their old positions.
itemClasses | list of classes of items to be showed |
Definition at line 156 of file statusbar.py.
References statusbar.SbManager._hiddenItems.
def statusbar.SbManager.Update | ( | self | ) |
Updates statusbar.
It always updates mask.
Definition at line 201 of file statusbar.py.
References statusbar.SbManager._postInit(), and statusbar.SbManager._postInitialized.
Referenced by wizard.DatumPage.OnDText(), colorrules.VectorColorTable.OnLayerSelection(), manager.GroupPage.OnMkGroup(), statusbar.SbManager.OnToggleStatus(), and mapwindow.BufferedWindow.TextBounds().
statusbar.SbManager.choice |
Definition at line 73 of file statusbar.py.
Referenced by statusbar.SbManager.Reposition().
statusbar.SbManager.mapFrame |
Definition at line 70 of file statusbar.py.
statusbar.SbManager.progressbar |
Definition at line 81 of file statusbar.py.
Referenced by statusbar.SbManager.GetProgressBar(), and mapwindow.NvizThread.run().
statusbar.SbManager.statusbar |
Definition at line 71 of file statusbar.py.
statusbar.SbManager.statusbarItems |
Definition at line 77 of file statusbar.py.
Referenced by statusbar.SbManager.AddStatusbarItem(), statusbar.SbManager.GetProperty(), statusbar.SbManager.HasProperty(), statusbar.SbManager.SetProperty(), and statusbar.SbManager.ShowItem().