Share and Money Management 0.18devel
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
gui.panel.PanelShare Class Reference

Panel to show and maintain all shares. More...

Inheritance diagram for gui.panel.PanelShare:

Public Member Functions

def __init__ (self, *args, **kwargs)
 Initialise widget. More...
 
def createListHeader (self)
 Create the header of a list. More...
 
def populateList (self)
 Fill the share list. More...
 
def psAddShare (self, obj)
 Add a new share to the list. More...
 
def psChangeShare (self, obj)
 A listed share has been changed. More...
 
def OnEditShare (self, event)
 Show a dialog to edit a share. More...
 
def OnNewShare (self, event)
 Show a dialog to create a new share. More...
 
def OnTrade (self, event)
 Show a dialog to trade with the selected share. More...
 
def OnWatch (self, event)
 Add a new watch list entry for the selected share. More...
 
def OnUnWatch (self, event)
 Remove watch list entry for the selected share. More...
 
- Public Member Functions inherited from gui.controls.SortedListPanel
def __init__ (self, *args, **kwargs)
 Initialise widget. More...
 
def createListHeader (self)
 Create the header of a list. More...
 
def createList (self)
 Create list, add header and enable sorting. More...
 
def populateList (self)
 Fill an already created list. More...
 
def removeEntry (self, element_id)
 Remove a listed entry. More...
 
- Public Member Functions inherited from gui.controls.GeneralPanelConfig
def OnClose (self, event)
 Save the current configuration before the panel is closed. More...
 
def restoreConfig (self)
 Restore saved settings. More...
 
def saveConfig (self)
 Save current settings. More...
 
def restoreListCtrl (self, ctrl, section, prefix)
 Restore saved settings. More...
 
def saveListCtrl (self, ctrl, section, prefix)
 Save current settings. More...
 
- Public Member Functions inherited from gui.controls.PopupMenuMixin
def __init__ (self, *args, **kwargs)
 
def OnShowPopup (self, event)
 Event handler to show the pop-up menu. More...
 

Public Attributes

 pmenu_watch
 
 pmenu_unwatch
 
 pmenu_newshare
 
 pmenu_editshare
 
- Public Attributes inherited from gui.controls.PopupMenuMixin
 widget_attr
 

Static Public Attributes

string config_section = "panel_share"
 
int initiallySort = 3
 
- Static Public Attributes inherited from gui.controls.SortedListPanel
 config_section = None
 Section in the configuration that contains the current look. More...
 
 listStyle = wx.LC_REPORT | wx.SUNKEN_BORDER
 Style of the ListCtrl. More...
 
 list = None
 Reference to the used SortedListCtrl. More...
 
- Static Public Attributes inherited from gui.controls.GeneralPanelConfig
 config_section = None
 Section in the configuration that contains the current look. More...
 
dictionary config_items
 Dictionary with all elements to save/restore. More...
 
- Static Public Attributes inherited from gui.controls.PopupMenuMixin
 popupmenu = None
 Reference to the pop-up menu. More...
 
string widget_attr = "list"
 Name of widget class attribute to add the pop-up menu. More...
 

Private Member Functions

def _fill_popup_menu (self)
 Fills the pop-up menu initially. More...
 
def _addShare (self, share)
 Add a smm.objects.Share object to the list control. More...
 
def _adapt_popup (self)
 Adapt the content before the menu is shown. More...
 

Detailed Description

Panel to show and maintain all shares.

Lists all smm.objects.Share objects.

Constructor & Destructor Documentation

◆ __init__()

def gui.panel.PanelShare.__init__ (   self,
args,
**  kwargs 
)

Initialise widget.

Reimplemented from gui.controls.SortedListPanel.

References gui.controls.SortedListPanel.list, gui.panel.PanelShare.OnEditShare(), gui.panel.PanelShare.psAddShare(), and gui.panel.PanelShare.psChangeShare().

Here is the call graph for this function:

Member Function Documentation

◆ _adapt_popup()

def gui.panel.PanelShare._adapt_popup (   self)
private

Adapt the content before the menu is shown.

Use this function to change/enable/disable menu entries to reflect the current state before the menu is shown.

Default - do nothing - derive this function to implement your own functionality.

Reimplemented from gui.controls.PopupMenuMixin.

References gui.controls.SortedListPanel.list, gui.panel.PanelShare.pmenu_unwatch, and gui.panel.PanelShare.pmenu_watch.

Referenced by gui.controls.PopupMenuMixin.OnShowPopup().

Here is the caller graph for this function:

◆ _addShare()

def gui.panel.PanelShare._addShare (   self,
  share 
)
private

Add a smm.objects.Share object to the list control.

Parameters
selfThe object instance itself
shareThe smm.objects.Share object

References gui.controls.SortedListPanel.list.

Referenced by gui.panel.PanelShare.populateList(), and gui.panel.PanelShare.psAddShare().

Here is the caller graph for this function:

◆ _fill_popup_menu()

def gui.panel.PanelShare._fill_popup_menu (   self)
private

Fills the pop-up menu initially.

Derive this function to implement your own functionality.

Reimplemented from gui.controls.PopupMenuMixin.

References gui.panel.PanelShare.OnTrade(), gui.panel.PanelOpenPositionList.OnTrade(), gui.panel.PanelOpenPositionDetails.OnTrade(), gui.panel.PanelWatchList.OnTrade(), gui.controls.PopupMenuMixin.popupmenu, gui.controls.BaseListSmall.popupmenu, and gui.controls.TransactionListSmall.popupmenu.

Here is the call graph for this function:

◆ createListHeader()

def gui.panel.PanelShare.createListHeader (   self)

Create the header of a list.

Reimplemented from gui.controls.SortedListPanel.

References gui.controls.SortedListPanel.list.

Referenced by gui.controls.SortedListPanel.createList().

Here is the caller graph for this function:

◆ OnEditShare()

def gui.panel.PanelShare.OnEditShare (   self,
  event 
)

Show a dialog to edit a share.

See also
dialogs.DlgShare

References gui.controls.SortedListPanel.list.

Referenced by gui.panel.PanelShare.__init__().

Here is the caller graph for this function:

◆ OnNewShare()

def gui.panel.PanelShare.OnNewShare (   self,
  event 
)

Show a dialog to create a new share.

See also
dialogs.DlgShare

Referenced by gui.MainWindow.createManageMenu().

Here is the caller graph for this function:

◆ OnTrade()

def gui.panel.PanelShare.OnTrade (   self,
  event 
)

Show a dialog to trade with the selected share.

See also
dialogs.DlgTrade

References gui.controls.SortedListPanel.list.

Referenced by gui.panel.PanelShare._fill_popup_menu(), and gui.panel.PanelOpenPositionList._fill_popup_menu().

Here is the caller graph for this function:

◆ OnUnWatch()

def gui.panel.PanelShare.OnUnWatch (   self,
  event 
)

Remove watch list entry for the selected share.

References gui.controls.SortedListPanel.list.

◆ OnWatch()

def gui.panel.PanelShare.OnWatch (   self,
  event 
)

Add a new watch list entry for the selected share.

References gui.controls.SortedListPanel.list.

◆ populateList()

def gui.panel.PanelShare.populateList (   self)

Fill the share list.

Reimplemented from gui.controls.SortedListPanel.

References gui.panel.PanelShare._addShare().

Referenced by gui.controls.SortedListPanel.__init__().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ psAddShare()

def gui.panel.PanelShare.psAddShare (   self,
  obj 
)

Add a new share to the list.

Parameters
selfThe object instance itself
objShare to add

References gui.panel.PanelShare._addShare(), and gui.controls.SortedListPanel.list.

Referenced by gui.panel.PanelShare.__init__(), and gui.panel.PanelShare.psChangeShare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ psChangeShare()

def gui.panel.PanelShare.psChangeShare (   self,
  obj 
)

A listed share has been changed.

Parameters
selfThe object instance itself
objShare to change

References gui.panel.PanelShare.psAddShare(), and gui.controls.SortedListPanel.removeEntry().

Referenced by gui.panel.PanelShare.__init__().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ config_section

string gui.panel.PanelShare.config_section = "panel_share"
static

◆ initiallySort

int gui.panel.PanelShare.initiallySort = 3
static

◆ pmenu_editshare

gui.panel.PanelShare.pmenu_editshare

◆ pmenu_newshare

gui.panel.PanelShare.pmenu_newshare

◆ pmenu_unwatch

gui.panel.PanelShare.pmenu_unwatch

◆ pmenu_watch

gui.panel.PanelShare.pmenu_watch

The documentation for this class was generated from the following file: