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

Panel to show all open positions. More...

Inheritance diagram for gui.panel.PanelOpenPositionList:

Public Member Functions

def __init__ (self, *args, **kwargs)
 Initialise the open position frame. More...
 
def createListOpenPosition (self)
 Create a header only list for all open positions. More...
 
def populateOpenPosition (self)
 Creates a list with all open positions. More...
 
def OnClosePosition (self, event)
 Event handler to close an empty position. More...
 
def OnItemSelected (self, event)
 Event handler to update the transaction list on selecting an open position. More...
 
def OnTrade (self, event)
 Show a dialog to trade with the selected share. More...
 
def psUpdateContent (self)
 Update the panel if new quotes are available. More...
 
def __init__ (self, *args, **kwds)
 
- 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 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

 green_arrow_idx
 Position of the green arrow image inside the ListCtrl image list. More...
 
 yellow_arrow_idx
 Position of the yellow arrow image inside the ListCtrl image list. More...
 
 red_arrow_idx
 Position of the red arrow image inside the ListCtrl image list. More...
 
 lc_OpenPosition
 List of all open positions. More...
 
 sw_OpenPosition
 Splitter window used as main widget in this panel. More...
 
 transaction_list
 Instance to simplify controlling of the list of transactions related to the current selected share. More...
 
 pmenu_close
 
- Public Attributes inherited from gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList
 sw_OpenPosition
 
 pn_TopWindow
 
 lc_OpenPosition
 
 pn_DownWindow
 
 lc_Transaction
 
- Public Attributes inherited from gui.controls.PopupMenuMixin
 widget_attr
 

Static Public Attributes

string config_section = "panel_positionlist"
 Section in the configuration that contains the current look. More...
 
dictionary config_items
 
- 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...
 
- 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 _fill_popup_menu (self)
 Fills the pop-up menu initially. More...
 
def _addPosition (self, pos)
 Add a new single smm.objects.OpenPosition object to the list. More...
 
def _adapt_popup (self)
 Display the pop-up menu. More...
 

Detailed Description

Panel to show all open positions.

Constructor & Destructor Documentation

◆ __init__()

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

Initialise the open position frame.

Reimplemented from gui.controls.PopupMenuMixin.

Member Function Documentation

◆ _adapt_popup()

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

◆ _addPosition()

def gui.panel.PanelOpenPositionList._addPosition (   self,
  pos 
)
private

◆ _fill_popup_menu()

def gui.panel.PanelOpenPositionList._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:

◆ createListOpenPosition()

def gui.panel.PanelOpenPositionList.createListOpenPosition (   self)

◆ OnClosePosition()

def gui.panel.PanelOpenPositionList.OnClosePosition (   self,
  event 
)

◆ OnItemSelected()

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

◆ OnTrade()

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

Show a dialog to trade with the selected share.

See also
dialogs.DlgTrade

References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, and gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition.

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

Here is the caller graph for this function:

◆ populateOpenPosition()

def gui.panel.PanelOpenPositionList.populateOpenPosition (   self)

Creates a list with all open positions.

References gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), gui.panel.PanelWatchList._addPosition(), gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, and gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition.

Referenced by gui.panel.PanelOpenPositionList.psUpdateContent(), and gui.panel.PanelOpenPositionDetails.psUpdateContent().

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

◆ psUpdateContent()

def gui.panel.PanelOpenPositionList.psUpdateContent (   self)

Update the panel if new quotes are available.

References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), gui.panel.PanelOpenPositionList.transaction_list, and gui.panel.PanelOpenPositionDetails.transaction_list.

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

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

Member Data Documentation

◆ config_items

dictionary gui.panel.PanelOpenPositionList.config_items
static
Initial value:
= {
# attr kind
"lc_OpenPosition": "ListCtrl",
"lc_Transaction": "ListCtrl",
"sw_OpenPosition": "SplitterWindow",
}

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

◆ config_section

gui.panel.PanelOpenPositionList.config_section = "panel_positionlist"
static

Section in the configuration that contains the current look.

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

◆ green_arrow_idx

gui.panel.PanelOpenPositionList.green_arrow_idx

◆ lc_OpenPosition

gui.panel.PanelOpenPositionList.lc_OpenPosition

◆ pmenu_close

gui.panel.PanelOpenPositionList.pmenu_close

◆ red_arrow_idx

gui.panel.PanelOpenPositionList.red_arrow_idx

◆ sw_OpenPosition

gui.panel.PanelOpenPositionList.sw_OpenPosition

Splitter window used as main widget in this panel.

◆ transaction_list

gui.panel.PanelOpenPositionList.transaction_list

Instance to simplify controlling of the list of transactions related to the current selected share.

See also
controls.TransactionListSmall

Referenced by gui.panel.PanelOpenPositionList.OnItemSelected(), gui.panel.PanelOpenPositionList.psUpdateContent(), and gui.panel.PanelOpenPositionDetails.showDetails().

◆ yellow_arrow_idx

gui.panel.PanelOpenPositionList.yellow_arrow_idx

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