|
Share and Money Management 0.18devel
|
Dialog to add and change shares. More...
Public Member Functions | |
| def | __init__ (self, parent, share=None) |
| Initialise dialog. More... | |
| def | setFixedShareKind (self, kind) |
| Set the specified share kind and disable changing the kind. More... | |
| def | __init__ (self, *args, **kwds) |
| Initialise dialog. More... | |
Public Member Functions inherited from gui.controls.BaseDialog | |
| def | __init__ (self, *args, **kwargs) |
| Initialise dialog. More... | |
| def | installOwnOKEventHandler (self) |
| Bind own event handler for pressing OK to allow a proper validation. More... | |
| def | OnOK (self, event) |
| Own OK button handler to validate the dialog logically using validateDialog() More... | |
| def | ShowModal (self) |
| Show the dialog modal and process dialogs input. More... | |
Static Public Attributes | |
| share = None | |
| Reference to a share. More... | |
Private Member Functions | |
| def | _setShare (self, share) |
| Fill dialogs fields with share data. More... | |
| def | _validateInput (self) |
| Validate dialog input in a logical way. More... | |
| def | _processInput (self) |
| Update existing share or create a new one. More... | |
Additional Inherited Members | |
Public Attributes inherited from gui.UIShare.UIShare | |
| tc_Name | |
| tc_Symbol | |
| tc_WKN | |
| tc_ISIN | |
| cc_Currency | |
| cc_Exchange | |
| cc_Kind | |
| cc_Source | |
| tc_Notes | |
| static_line_1 | |
| bn_OK | |
| bn_Cancel | |
Dialog to add and change shares.
| def gui.dialogs.DlgShare.__init__ | ( | self, | |
| parent, | |||
share = None |
|||
| ) |
Initialise dialog.
| self | The object pointer |
| parent | The parent object |
| share | A Share object |
Reimplemented from gui.UIShare.UIShare.
References gui.dialogs.DlgShare._setShare(), gui.UIShare.UIShare.cc_Source, and gui.controls.BaseDialog.installOwnOKEventHandler().
|
private |
Update existing share or create a new one.
An existing share will be updated if share is set. Otherwise, a new share will be created using the dialog's data and stored in share.
Reimplemented from gui.controls.BaseDialog.
References gui.controls.ShareDetailsPanel.cc_Currency, gui.controls.PositionDetailsPanel.cc_Currency, gui.UIShare.UIShare.cc_Currency, gui.UITrade.UITrade.cc_Currency, gui.controls.ShareDetailsPanel.cc_Exchange, gui.UIShare.UIShare.cc_Exchange, gui.controls.ShareDetailsPanel.cc_Kind, gui.UIShare.UIShare.cc_Kind, gui.UIShare.UIShare.cc_Source, gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, smm.objects.Position.share, gui.controls.ShareDetailsPanel.tc_ISIN, gui.UIShare.UIShare.tc_ISIN, gui.controls.ShareDetailsPanel.tc_Name, gui.UIShare.UIShare.tc_Name, gui.controls.ShareDetailsPanel.tc_Notes, gui.controls.PositionDetailsPanel.tc_Notes, gui.controls.WatchDetailsPanel.tc_Notes, gui.UIShare.UIShare.tc_Notes, gui.controls.ShareDetailsPanel.tc_Symbol, gui.UIShare.UIShare.tc_Symbol, gui.controls.ShareDetailsPanel.tc_WKN, and gui.UIShare.UIShare.tc_WKN.
Referenced by gui.controls.BaseDialog.ShowModal().
|
private |
Fill dialogs fields with share data.
| self | The object pointer |
| share | A Share object |
References gui.controls.BaseDialog._unmarkWidget(), gui.controls.ShareDetailsPanel.cc_Currency, gui.controls.PositionDetailsPanel.cc_Currency, gui.UIShare.UIShare.cc_Currency, gui.UITrade.UITrade.cc_Currency, gui.controls.ShareDetailsPanel.cc_Exchange, gui.UIShare.UIShare.cc_Exchange, gui.controls.ShareDetailsPanel.cc_Kind, gui.UIShare.UIShare.cc_Kind, gui.UIShare.UIShare.cc_Source, gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, smm.objects.Position.share, gui.controls.ShareDetailsPanel.tc_ISIN, gui.UIShare.UIShare.tc_ISIN, gui.controls.ShareDetailsPanel.tc_Name, gui.UIShare.UIShare.tc_Name, gui.controls.ShareDetailsPanel.tc_Notes, gui.controls.PositionDetailsPanel.tc_Notes, gui.controls.WatchDetailsPanel.tc_Notes, gui.UIShare.UIShare.tc_Notes, gui.controls.ShareDetailsPanel.tc_Symbol, gui.UIShare.UIShare.tc_Symbol, gui.controls.ShareDetailsPanel.tc_WKN, and gui.UIShare.UIShare.tc_WKN.
Referenced by gui.dialogs.DlgShare.__init__().
|
private |
Validate dialog input in a logical way.
Reimplemented from gui.controls.BaseDialog.
References gui.controls.BaseDialog._markWidget(), gui.controls.BaseDialog._unmarkWidget(), gui.controls.ShareDetailsPanel.cc_Kind, gui.UIShare.UIShare.cc_Kind, gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, smm.objects.Position.share, gui.controls.ShareDetailsPanel.tc_ISIN, gui.UIShare.UIShare.tc_ISIN, gui.controls.ShareDetailsPanel.tc_Name, gui.UIShare.UIShare.tc_Name, gui.controls.ShareDetailsPanel.tc_Symbol, gui.UIShare.UIShare.tc_Symbol, gui.controls.ShareDetailsPanel.tc_WKN, and gui.UIShare.UIShare.tc_WKN.
Referenced by gui.controls.BaseDialog.OnOK().
| def gui.dialogs.DlgShare.setFixedShareKind | ( | self, | |
| kind | |||
| ) |
Set the specified share kind and disable changing the kind.
| self | The object pointer |
| kind | A share kind |
References gui.controls.ShareDetailsPanel.cc_Kind, and gui.UIShare.UIShare.cc_Kind.
|
static |
Reference to a share.
Referenced by smm.objects.Watch.__init__(), smm.objects.DailyQuote.__str__(), smm.objects.Watch.__str__(), smm.objects.Position.__str__(), gui.dialogs.DlgTrade._prepareBuy(), gui.dialogs.DlgShare._processInput(), gui.dialogs.DlgShare._setShare(), gui.dialogs.DlgShare._validateInput(), smm.objects.Position.getLastQuote(), smm.objects.Position.getPerf(), gui.dialogs.DlgTrade.OnUpdateExistingPosition(), gui.dialogs.DlgTrade.OnUpdateNewPosition(), smm.objects.Watch.remove(), and smm.objects.Position.split().