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

Panel to show all open positions. More...

Inheritance diagram for gui.panel.PanelWatchList:

Public Member Functions

def __init__ (self, args, kwds)
 Initialise the watch list frame. More...
 
def createWatchList (self)
 Create a header only list for all open positions. More...
 
def createQuoteList (self)
 Create a header only list for daily quotes. More...
 
def populateWatchList (self)
 Creates a list with all open positions. More...
 
def populateQuoteList (self)
 List all quotes refered by the selectet share. More...
 
def showDetails (self)
 Shows the details of a selected share. More...
 
def OnItemSelected (self, event)
 Event handler to update the transaction list on selecting an open position. More...
 
def psUpdateAllContent (self)
 Full panel update. More...
 
def psUpdateQuoteList (self)
 Quote list update. More...
 
def OnCancel (self, event)
 Revert changes. More...
 
def OnDelete (self, event)
 Delete watch list entry. More...
 
def OnSave (self, event)
 Write changes back. More...
 
def OnTrade (self, event)
 Show a dialog to trade with the selected share. More...
 
- Public Member Functions inherited from gui.UIBasePanelWatchList.UIBasePanelWatchList
def __init__ (self, args, kwds)
 
- 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 Attributes

 watch
 Watch list entry. More...
 
- Public Attributes inherited from gui.UIBasePanelWatchList.UIBasePanelWatchList
 sw_WatchList
 
 pn_Details
 
 sizer_quotes_staticbox
 
 pn_ShareList
 
 lc_WatchPosition
 
 bn_save
 
 bn_cancel
 
 bn_delete
 
 bn_trade
 
 pn_WatchDetails
 
 lc_DailyQuotes
 

Static Public Attributes

string config_section = 'panel_watchlist'
 Section in the configuration that contains the current look. More...
 
dictionary config_items
 
- 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...
 

Private Member Functions

def _addPosition (self, watch)
 Add a new watch list entry to the list. More...
 
def _addQuote (self, quote)
 Add a new quote to the list. More...
 

Detailed Description

Panel to show all open positions.

Constructor & Destructor Documentation

◆ __init__()

def gui.panel.PanelWatchList.__init__ (   self,
  args,
  kwds 
)

Initialise the watch list frame.

References gui.UIBasePanelWatchList.UIBasePanelWatchList.sw_WatchList.

Member Function Documentation

◆ _addPosition()

def gui.panel.PanelWatchList._addPosition (   self,
  watch 
)
private

Add a new watch list entry to the list.

Parameters
selfThe object instance itself
watchThe watch list entry

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition.

Referenced by gui.panel.PanelWatchList.populateWatchList().

Here is the caller graph for this function:

◆ _addQuote()

def gui.panel.PanelWatchList._addQuote (   self,
  quote 
)
private

Add a new quote to the list.

Parameters
selfThe object instance itself
quoteThe smm.objects.DailyQuote object

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_DailyQuotes.

Referenced by gui.panel.PanelWatchList.populateQuoteList().

Here is the caller graph for this function:

◆ createQuoteList()

def gui.panel.PanelWatchList.createQuoteList (   self)

Create a header only list for daily quotes.

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_DailyQuotes.

◆ createWatchList()

def gui.panel.PanelWatchList.createWatchList (   self)

Create a header only list for all open positions.

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition.

◆ OnCancel()

def gui.panel.PanelWatchList.OnCancel (   self,
  event 
)

Revert changes.

References gui.panel.PanelOpenPositionDetails.showDetails(), and gui.panel.PanelWatchList.showDetails().

Here is the call graph for this function:

◆ OnDelete()

def gui.panel.PanelWatchList.OnDelete (   self,
  event 
)

Delete watch list entry.

References smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

◆ OnItemSelected()

def gui.panel.PanelWatchList.OnItemSelected (   self,
  event 
)

Event handler to update the transaction list on selecting an open position.

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition, gui.panel.PanelOpenPositionDetails.showDetails(), gui.panel.PanelWatchList.showDetails(), smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

Here is the call graph for this function:

◆ OnSave()

def gui.panel.PanelWatchList.OnSave (   self,
  event 
)

Write changes back.

The watch list entry as well as the share will be updated

References gui.UIBasePanelWatchList.UIBasePanelWatchList.pn_WatchDetails, smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

◆ OnTrade()

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

Show a dialog to trade with the selected share.

See also
dialogs.DlgTrade

References smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

◆ populateQuoteList()

def gui.panel.PanelWatchList.populateQuoteList (   self)

List all quotes refered by the selectet share.

References gui.panel.PanelWatchList._addQuote(), gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_DailyQuotes, smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

Referenced by gui.panel.PanelWatchList.psUpdateQuoteList(), and gui.panel.PanelWatchList.showDetails().

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

◆ populateWatchList()

def gui.panel.PanelWatchList.populateWatchList (   self)

Creates a list with all open positions.

References gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), gui.panel.PanelWatchList._addPosition(), gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition, smm.objects.Share.watch, and gui.panel.PanelWatchList.watch.

Referenced by gui.panel.PanelWatchList.psUpdateAllContent().

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

◆ psUpdateAllContent()

def gui.panel.PanelWatchList.psUpdateAllContent (   self)

Full panel update.

References gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition, gui.panel.PanelWatchList.populateWatchList(), gui.panel.PanelOpenPositionDetails.showDetails(), and gui.panel.PanelWatchList.showDetails().

Here is the call graph for this function:

◆ psUpdateQuoteList()

def gui.panel.PanelWatchList.psUpdateQuoteList (   self)

Quote list update.

References gui.panel.PanelWatchList.populateQuoteList().

Here is the call graph for this function:

◆ showDetails()

def gui.panel.PanelWatchList.showDetails (   self)

Member Data Documentation

◆ config_items

dictionary gui.panel.PanelWatchList.config_items
static
Initial value:
= {
# attr type
'lc_DailyQuotes': 'ListCtrl',
'lc_WatchPosition': 'ListCtrl',
'sw_WatchList': 'SplitterWindow',
}

◆ config_section

gui.panel.PanelWatchList.config_section = 'panel_watchlist'
static

Section in the configuration that contains the current look.

◆ watch

gui.panel.PanelWatchList.watch

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