|
Share and Money Management 0.18devel
|
Dialog to fetch quotes. More...
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 | |
Dialog to fetch quotes.
| def gui.dialogs.DlgFetchQuotes.__init__ | ( | self, | |
| parent | |||
| ) |
Initialise dialog.
| self | The object pointer |
| parent | The parent object |
Reimplemented from gui.UIFetchQuotes.UIFetchQuotes.
|
private |
Append a new share to the shares grid.
Show the share name as well as date and value of the last quote
| share | A Share object |
References gui.dialogs.DlgFetchQuotes._share_details, and gui.UIFetchQuotes.UIFetchQuotes.grid_shares.
Referenced by gui.dialogs.DlgFetchQuotes._show_selected_shares().
|
private |
Calculate the different between previous and current value and show it in percent.
| prev_value | Old value |
| current_value | New value |
| row | Row to the show the difference |
| column | Column to the show the difference |
References gui.UIFetchQuotes.UIFetchQuotes.grid_shares.
Referenced by gui.dialogs.DlgFetchQuotes._show_fetched_quotes().
|
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().
|
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().
|
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().
| 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.
| 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.
| def gui.dialogs.DlgFetchQuotes.OnFetchQuotes | ( | self, | |
| event | |||
| ) |
Fetch quotes.
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().
|
private |
Store the details of the shares shown in the grid.
Referenced by gui.dialogs.DlgFetchQuotes._append_share_to_grid(), gui.dialogs.DlgFetchQuotes._show_fetched_quotes(), and gui.dialogs.DlgFetchQuotes._show_selected_shares().