Share and Money Management  0.16
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gui.dialogs.DlgFetchQuotes Class Reference

Dialog to fetch quotes. More...

Inheritance diagram for gui.dialogs.DlgFetchQuotes:

Public Member Functions

def __init__ (self, parent)
 Initialise dialog. More...
 
def OnCheckBoxClicked (self, event)
 Enable the fetch button depending if at least one list checked. More...
 
def OnCopyAllToClipboard (self, event)
 Copy the whole grid content to clipboard. More...
 
def OnFetchQuotes (self, event)
 Fetch quotes. More...
 
- Public Member Functions inherited from gui.UIFetchQuotes.UIFetchQuotes
def __init__ (self, args, kwds)
 

Private Member Functions

def _append_share_to_grid (self, share)
 Append a new share to the shares grid. More...
 
def _auto_size_columns (self)
 Set column width to the greater width (label width vs. More...
 
def _show_selected_shares (self)
 Show all currently selected shares in the shares grid. More...
 
def _calc_and_show_delta (self, prev_value, current_value, row, column)
 Calculate the different between previous and current value and show it in percent. More...
 
def _show_fetched_quotes (self)
 Show the new fetched quotes in the shares grid. More...
 

Private Attributes

 _share_details
 Store the details of the shares shown in the grid. More...
 

Additional Inherited Members

- Public Attributes inherited from gui.UIFetchQuotes.UIFetchQuotes
 cb_OpenPosition
 
 cb_WatchList
 
 sizer_11_staticbox
 
 tc_status
 
 sizer_32_staticbox
 
 nb_results
 
 pn_shares
 
 grid_shares
 
 pn_log
 
 tc_log
 
 sizer_12_staticbox
 
 static_line_3
 
 bn_fetch
 
 bn_ok
 
 bn_copy
 

Detailed Description

Dialog to fetch quotes.

Constructor & Destructor Documentation

◆ __init__()

def gui.dialogs.DlgFetchQuotes.__init__ (   self,
  parent 
)

Initialise dialog.

Parameters
selfThe object pointer
parentThe parent object

Member Function Documentation

◆ _append_share_to_grid()

def gui.dialogs.DlgFetchQuotes._append_share_to_grid (   self,
  share 
)
private

Append a new share to the shares grid.

Show the share name as well as date and value of the last quote

Parameters
shareA Share object

References gui.dialogs.DlgFetchQuotes._share_details, and gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

Referenced by gui.dialogs.DlgFetchQuotes._show_selected_shares().

Here is the caller graph for this function:

◆ _auto_size_columns()

def gui.dialogs.DlgFetchQuotes._auto_size_columns (   self)
private

Set column width to the greater width (label width vs.

content width)

References gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

Referenced by gui.dialogs.DlgFetchQuotes._show_fetched_quotes(), and gui.dialogs.DlgFetchQuotes._show_selected_shares().

Here is the caller graph for this function:

◆ _calc_and_show_delta()

def gui.dialogs.DlgFetchQuotes._calc_and_show_delta (   self,
  prev_value,
  current_value,
  row,
  column 
)
private

Calculate the different between previous and current value and show it in percent.

Parameters
prev_valueOld value
current_valueNew value
rowRow to the show the difference
columnColumn to the show the difference

References gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

Referenced by gui.dialogs.DlgFetchQuotes._show_fetched_quotes().

Here is the caller graph for this function:

◆ _show_fetched_quotes()

def gui.dialogs.DlgFetchQuotes._show_fetched_quotes (   self)
private

Show the new fetched quotes in the shares grid.

References gui.dialogs.DlgFetchQuotes._auto_size_columns(), gui.dialogs.DlgFetchQuotes._calc_and_show_delta(), gui.dialogs.DlgFetchQuotes._share_details, and gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

Referenced by gui.dialogs.DlgFetchQuotes.OnFetchQuotes().

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

◆ _show_selected_shares()

def gui.dialogs.DlgFetchQuotes._show_selected_shares (   self)
private

Show all currently selected shares in the shares grid.

References gui.dialogs.DlgFetchQuotes._append_share_to_grid(), gui.dialogs.DlgFetchQuotes._auto_size_columns(), gui.dialogs.DlgFetchQuotes._share_details, gui.UIFetchQuotes.UIFetchQuotes.cb_OpenPosition, gui.UIFetchQuotes.UIFetchQuotes.cb_WatchList, and gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

Referenced by gui.dialogs.DlgFetchQuotes.OnCheckBoxClicked().

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

◆ OnCheckBoxClicked()

def gui.dialogs.DlgFetchQuotes.OnCheckBoxClicked (   self,
  event 
)

Enable the fetch button depending if at least one list checked.

References gui.dialogs.DlgFetchQuotes._show_selected_shares(), gui.UIFetchQuotes.UIFetchQuotes.bn_copy, gui.UIFetchQuotes.UIFetchQuotes.bn_fetch, gui.UIFetchQuotes.UIFetchQuotes.cb_OpenPosition, gui.UIFetchQuotes.UIFetchQuotes.cb_WatchList, and gui.UIFetchQuotes.UIFetchQuotes.tc_status.

Here is the call graph for this function:

◆ OnCopyAllToClipboard()

def gui.dialogs.DlgFetchQuotes.OnCopyAllToClipboard (   self,
  event 
)

Copy the whole grid content to clipboard.

The single field are separated by tabs '\t'. Lines are separated by newlines. The newline sequence depends on the platform.

References gui.UIFetchQuotes.UIFetchQuotes.grid_shares.

◆ OnFetchQuotes()

def gui.dialogs.DlgFetchQuotes.OnFetchQuotes (   self,
  event 
)

Member Data Documentation

◆ _share_details

gui.dialogs.DlgFetchQuotes._share_details
private

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