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

Panel to show all open positions. More...

Inheritance diagram for gui.panel.PanelOpenPositionDetails:

Public Member Functions

def __init__
 Initialise the open position frame.
def createListOpenPosition
 Create a header only list for all open positions.
def populateOpenPosition
 Creates a list with all open positions.
def showDetails
 Shows the details of a selected share.
def OnItemSelected
 Event handler to update the transaction list on selecting an open position.
def psUpdateContent
 Update the panel if new quotes are available.
def OnCancel
 Revert changes.
def OnSave
 Write changes back to the share.
def OnTrade
 Show a dialog to trade with the selected share.
- Public Member Functions inherited from gui.controls.GeneralPanelConfig
def OnClose
 Save the current configuration before the panel is closed.
def restoreConfig
 Restore saved settings.
def saveConfig
 Save current settings.
def restoreListCtrl
 Restore saved settings.
def saveListCtrl
 Save current settings.

Public Attributes

 position
 Position whose details are shown.
 transaction_list
 Instance to simplify controlling of the list of transactions related to the current selected share.
 green_arrow_idx
 Position of the green arrow image inside the ListCtrl image list.
 yellow_arrow_idx
 Position of the yellow arrow image inside the ListCtrl image list.
 red_arrow_idx
 Position of the red arrow image inside the ListCtrl image list.
- Public Attributes inherited from gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails
 sw_OpenPosition
 pn_Details
 sizer_21_staticbox
 sizer_20_staticbox
 sizer_17_staticbox
 pn_ShareList
 lc_OpenPosition
 bn_save
 bn_cancel
 bn_trade
 pn_PositionDetails
 tc_Buy
 tc_Quote
 tc_Count
 tc_Date
 tc_Volume
 tc_ProfitAbsolute
 tc_ProfitRelative
 bm_Trend
 tc_ProfitRelative_6M
 tc_ProfitRelative_1Y
 tc_ProfitRelative_3Y
 tc_ProfitRelative_5Y
 lc_Transaction

Static Public Attributes

string config_section = 'panel_positiondetails'
 Section in the configuration that contains the current look.
dictionary config_items
- Static Public Attributes inherited from gui.controls.GeneralPanelConfig
 config_section = None
 Section in the configuration that contains the current look.
dictionary config_items
 Dictionary with all elements to save/restore.

Private Member Functions

def _addPosition
 Add a new single smm.objects.OpenPosition object to the list.

Detailed Description

Panel to show all open positions.

Constructor & Destructor Documentation

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

Initialise the open position frame.

Reimplemented from gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.

Member Function Documentation

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

Add a new single smm.objects.OpenPosition object to the list.

Parameters
selfThe object instance itself
posThe smm.objects.Position object

References gui.panel.PanelOpenPositionList.green_arrow_idx, gui.panel.PanelOpenPositionDetails.green_arrow_idx, gui.panel.PanelOpenPositionList.red_arrow_idx, gui.panel.PanelOpenPositionDetails.red_arrow_idx, gui.panel.PanelOpenPositionList.yellow_arrow_idx, and gui.panel.PanelOpenPositionDetails.yellow_arrow_idx.

Referenced by gui.panel.PanelOpenPositionDetails.populateOpenPosition(), and gui.panel.PanelWatchList.populateWatchList().

Here is the caller graph for this function:

def gui.panel.PanelOpenPositionDetails.createListOpenPosition (   self)

Create a header only list for all open positions.

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

Revert changes.

References gui.panel.PanelOpenPositionDetails.showDetails().

Here is the call graph for this function:

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

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

References gui.dialogs.DlgTrade.position, smm.objects.Transaction.position, gui.panel.PanelOpenPositionDetails.position, and gui.panel.PanelOpenPositionDetails.showDetails().

Here is the call graph for this function:

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

Write changes back to the share.

def gui.panel.PanelOpenPositionDetails.OnTrade (   self,
  event 
)
def gui.panel.PanelOpenPositionDetails.populateOpenPosition (   self)

Creates a list with all open positions.

References gui.panel.PanelOpenPositionList._addPosition(), and gui.panel.PanelOpenPositionDetails._addPosition().

Referenced by gui.panel.PanelOpenPositionDetails.psUpdateContent().

Here is the call graph for this function:

Here is the caller graph for this function:

def gui.panel.PanelOpenPositionDetails.psUpdateContent (   self)

Update the panel if new quotes are available.

References gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), gui.dialogs.DlgTrade.position, smm.objects.Transaction.position, gui.panel.PanelOpenPositionDetails.position, and gui.panel.PanelOpenPositionDetails.showDetails().

Here is the call graph for this function:

def gui.panel.PanelOpenPositionDetails.showDetails (   self)

Member Data Documentation

dictionary gui.panel.PanelOpenPositionDetails.config_items
static
Initial value:
{
# attr type
'lc_OpenPosition': 'ListCtrl',
'lc_Transaction': 'ListCtrl',
'sw_OpenPosition': 'SplitterWindow',
}
gui.panel.PanelOpenPositionDetails.config_section = 'panel_positiondetails'
static

Section in the configuration that contains the current look.

gui.panel.PanelOpenPositionDetails.green_arrow_idx

Position of the green arrow image inside the ListCtrl image list.

Referenced by gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().

gui.panel.PanelOpenPositionDetails.position
gui.panel.PanelOpenPositionDetails.red_arrow_idx

Position of the red arrow image inside the ListCtrl image list.

Referenced by gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().

gui.panel.PanelOpenPositionDetails.transaction_list

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

See Also
controls.TransactionListSmall
gui.panel.PanelOpenPositionDetails.yellow_arrow_idx

Position of the yellow arrow image inside the ListCtrl image list.

Referenced by gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().


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