Share and Money Management 0.18devel
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 on 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...
 
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 _resize_all_cols_to_content (self)
 Set column size to content length respect label size as minimum. 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
 
 tc_status
 
 nb_results
 
 pn_shares
 
 grid_shares
 
 pn_log
 
 tc_log
 
 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

Reimplemented from gui.UIFetchQuotes.UIFetchQuotes.

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:

◆ _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:

◆ _resize_all_cols_to_content()

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

Set column size to content length respect label size as minimum.

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:

◆ _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._calc_and_show_delta(), gui.dialogs.DlgFetchQuotes._resize_all_cols_to_content(), 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._resize_all_cols_to_content(), 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 on 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 
)

Fetch quotes.

See also
smm.operations.fetchDailyQuotes()

References gui.dialogs.DlgFetchQuotes._show_fetched_quotes(), gui.UIFetchQuotes.UIFetchQuotes.bn_copy, gui.UIFetchQuotes.UIFetchQuotes.bn_fetch, gui.UIFetchQuotes.UIFetchQuotes.bn_ok, gui.UIFetchQuotes.UIFetchQuotes.cb_OpenPosition, gui.UIFetchQuotes.UIFetchQuotes.cb_WatchList, gui.UIFetchQuotes.UIFetchQuotes.nb_results, gui.UIFetchQuotes.UIFetchQuotes.tc_log, and gui.UIFetchQuotes.UIFetchQuotes.tc_status.

Referenced by gui.MainWindow.createManageMenu().

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

Member Data Documentation

◆ _share_details

gui.dialogs.DlgFetchQuotes._share_details
private

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