Share and Money Management 0.18devel
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, **kwargs)
 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 referred by the selected 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...
 
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

 lc_DailyQuotes
 Daily quotes of the watched share. More...
 
 lc_WatchPosition
 List of all watched shares. More...
 
 sw_WatchList
 Splitter window used as main widget in this panel. More...
 
 watch
 Watch list entry. More...
 
- Public Attributes inherited from gui.UIBasePanelWatchList.UIBasePanelWatchList
 sw_WatchList
 
 pn_ShareList
 
 lc_WatchPosition
 
 pn_Details
 
 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,
**  kwargs 
)

Initialise the watch list frame.

Reimplemented from gui.UIBasePanelWatchList.UIBasePanelWatchList.

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.panel.PanelWatchList.lc_WatchPosition, and gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition.

Referenced by gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), and 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.panel.PanelWatchList.lc_DailyQuotes, and 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)

◆ createWatchList()

def gui.panel.PanelWatchList.createWatchList (   self)

Create a header only list for all open positions.

References gui.panel.PanelWatchList.lc_WatchPosition, and 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 gui.panel.PanelWatchList.watch, and smm.objects.Share.watch.

◆ OnItemSelected()

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

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

References gui.panel.PanelWatchList.lc_WatchPosition, gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition, gui.panel.PanelOpenPositionDetails.showDetails(), gui.panel.PanelWatchList.showDetails(), gui.panel.PanelWatchList.watch, and smm.objects.Share.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, gui.panel.PanelWatchList.watch, and smm.objects.Share.watch.

◆ OnTrade()

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

Show a dialog to trade with the selected share.

See also
dialogs.DlgTrade

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

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

Here is the caller graph for this function:

◆ populateQuoteList()

def gui.panel.PanelWatchList.populateQuoteList (   self)

List all quotes referred by the selected share.

References gui.panel.PanelWatchList._addQuote(), gui.panel.PanelWatchList.lc_DailyQuotes, gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_DailyQuotes, gui.panel.PanelWatchList.watch, and smm.objects.Share.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.panel.PanelWatchList.lc_WatchPosition, gui.UIBasePanelWatchList.UIBasePanelWatchList.lc_WatchPosition, gui.panel.PanelWatchList.watch, and smm.objects.Share.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.panel.PanelWatchList.lc_WatchPosition, 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 kind
"lc_DailyQuotes": "ListCtrl",
"lc_WatchPosition": "ListCtrl",
"sw_WatchList": "SplitterWindow",
}

Referenced by gui.controls.GeneralPanelConfig.restoreConfig(), and gui.controls.GeneralPanelConfig.saveConfig().

◆ config_section

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

Section in the configuration that contains the current look.

Referenced by gui.controls.GeneralPanelConfig.restoreConfig(), and gui.controls.GeneralPanelConfig.saveConfig().

◆ lc_DailyQuotes

gui.panel.PanelWatchList.lc_DailyQuotes

◆ lc_WatchPosition

gui.panel.PanelWatchList.lc_WatchPosition

◆ sw_WatchList

gui.panel.PanelWatchList.sw_WatchList

Splitter window used as main widget in this panel.

◆ watch

gui.panel.PanelWatchList.watch

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