Share and Money Management 0.18devel
|
Main window of our application. More...
Public Member Functions | |
def | __init__ (self, parent, id, title) |
Constructor. More... | |
def | createMenus (self) |
Create all menus. More... | |
def | createMenuEntry (self, menu, mid, item, htext, func, kind=wx.ITEM_NORMAL) |
Create a single menu item. More... | |
def | createFileMenu (self) |
Create "File" menu. More... | |
def | createManageMenu (self) |
Create "Manage" menu. More... | |
def | createReportMenu (self) |
Create "Reports" menu. More... | |
def | createViewMenu (self) |
Create "View" menu. More... | |
def | createHelpMenu (self) |
Create "Help" menu. More... | |
def | OnAbout (self, event) |
Open about dialog. More... | |
def | OnFileExit (self, event) |
Finish this application. More... | |
def | OnFetchQuotes (self, event) |
Open fetch quotes dialog. More... | |
def | OnNewIndex (self, event) |
Open new index dialog. More... | |
def | OnNewShare (self, event) |
Open new share dialog. More... | |
def | OnNewTransaction (self, event) |
Open new transaction dialog. More... | |
def | OnPositionReport (self, event) |
Open a new dialog to show a position report. More... | |
def | OnPortfolioReport (self, event) |
Open a new dialog to show a depot report. More... | |
def | OnPreferences (self, event) |
Open preferences dialog. More... | |
def | handleMDIChild (self, panelClass, attr, closeEvent, title) |
Creates and closes MDI child windows. More... | |
def | OnCreateSummary (self, event) |
Show a summary about the current deposit. More... | |
def | OnCreateCurrency (self, event) |
Show and maintain all currencies. More... | |
def | OnCreateExchange (self, event) |
Show and maintain all exchanges. More... | |
def | OnCreateShare (self, event) |
Show and maintain all shares. More... | |
def | OnCreateTransaction (self, event) |
Show and maintain all transactions. More... | |
def | OnCreateIndex (self, event) |
Show and maintain all indices. More... | |
def | OnCreatePositionList (self, event) |
Show all open positions. More... | |
def | OnCreatePositionDetails (self, event) |
Show all open positions. More... | |
def | OnCreateWatchList (self, event) |
Show all watch list entries. More... | |
def | OnCloseSummary (self, event) |
Cleanup / update actions on closing summary panel. More... | |
def | OnCloseCurrency (self, event) |
Cleanup / update actions on closing currency panel. More... | |
def | OnCloseExchange (self, event) |
Cleanup / update actions on closing exchange panel. More... | |
def | OnCloseShare (self, event) |
Cleanup / update actions on closing share panel. More... | |
def | OnCloseTransaction (self, event) |
Cleanup / update actions on closing transaction panel. More... | |
def | OnCloseIndex (self, event) |
Cleanup / update actions on closing indices panel. More... | |
def | OnClosePositionList (self, event) |
Cleanup / update actions on closing open position panel. More... | |
def | OnClosePositionDetails (self, event) |
Cleanup / update actions on closing open position panel. More... | |
def | OnCloseWatchList (self, event) |
Cleanup / update actions on closing watch list panel. More... | |
def | closeView (self, attr, event) |
Close an open view and perform all cleanup actions. More... | |
def | OnClose (self, event) |
Save the current configuration before the GUI is closed. More... | |
def | restoreGUIConfig (self) |
Restore general GUI configuration. More... | |
def | restoreSMMConfig (self) |
Restore GUI configuration of all SMM elements. More... | |
def | saveGUIConfig (self) |
Store general GUI configuration. More... | |
def | saveSMMConfig (self) |
Store general GUI configuration. More... | |
Public Attributes | |
filemenu | |
All menu entries grouped to the "File" menu. More... | |
helpmenu | |
All menu entries grouped to the "Help" menu. More... | |
managemenu | |
All menu entries grouped to the "Manage" menu. More... | |
reportmenu | |
All menu entries grouped to the "Reports" menu. More... | |
viewmenu | |
All menu entries grouped to the "View" menu. More... | |
menubar | |
Main menubar with all submenus. More... | |
ViewSummary | |
Reference to the "Summary" MDI client panel. More... | |
ViewCurrency | |
Reference to the "Currency" MDI client panel. More... | |
ViewExchange | |
Reference to the "Exchange" MDI client panel. More... | |
ViewShare | |
Reference to the "Share" MDI client panel. More... | |
ViewTransaction | |
Reference to the "Transaction" MDI client panel. More... | |
ViewIndex | |
Reference to the "Indices" MDI client panel. More... | |
ViewPositionList | |
Reference to the "OpenPositionList" MDI client panel. More... | |
ViewPositionDetails | |
Reference to the "OpenPositionDetails" MDI client panel. More... | |
ViewWatchList | |
nativeMDI | |
Static Public Attributes | |
bool | nativeMDI = False |
Indicates native MDI support. More... | |
list | views_open = [] |
List of all open views. More... | |
ID_FILEMENU_PREFERENCES = wx.NewIdRef() | |
ID_MANAGEMENU_FETCHQUOTES = wx.NewIdRef() | |
ID_MANAGEMENU_ADDINDEX = wx.NewIdRef() | |
ID_MANAGEMENU_ADDSHARE = wx.NewIdRef() | |
ID_MANAGEMENU_TRADE = wx.NewIdRef() | |
ID_REPORTMENU_POSITIONREPORT = wx.NewIdRef() | |
ID_REPORTMENU_PORTFOLIOREPORT = wx.NewIdRef() | |
ID_VIEWMENU_SUMMARY = wx.NewIdRef() | |
ID_VIEWMENU_CURRENCY = wx.NewIdRef() | |
ID_VIEWMENU_EXCHANGE = wx.NewIdRef() | |
ID_VIEWMENU_SHARE = wx.NewIdRef() | |
ID_VIEWMENU_TRANSACTION = wx.NewIdRef() | |
ID_VIEWMENU_INDEX = wx.NewIdRef() | |
ID_VIEWMENU_POSITIONLIST = wx.NewIdRef() | |
ID_VIEWMENU_POSITIONDETAILS = wx.NewIdRef() | |
ID_VIEWMENU_WATCHLIST = wx.NewIdRef() | |
dictionary | attr2menu |
Mapping between view name and menu id. More... | |
Main window of our application.
The application is an MDI application to provide the user more flexibility in selection and positioning of the displayed data.
The content of an MDI child is a simple wx.Frame
. That unifies the handling of the MDI children.
def gui.MainWindow.__init__ | ( | self, | |
parent, | |||
id, | |||
title | |||
) |
Constructor.
def gui.MainWindow.closeView | ( | self, | |
attr, | |||
event | |||
) |
Close an open view and perform all cleanup actions.
References gui.MainWindow.attr2menu, gui.MainWindow.viewmenu, and gui.MainWindow.views_open.
Referenced by gui.MainWindow.OnCloseCurrency(), gui.MainWindow.OnCloseExchange(), gui.MainWindow.OnCloseIndex(), gui.MainWindow.OnClosePositionDetails(), gui.MainWindow.OnClosePositionList(), gui.MainWindow.OnCloseShare(), gui.MainWindow.OnCloseSummary(), gui.MainWindow.OnCloseTransaction(), and gui.MainWindow.OnCloseWatchList().
def gui.MainWindow.createFileMenu | ( | self | ) |
Create "File" menu.
References gui.MainWindow.createMenuEntry(), gui.MainWindow.filemenu, gui.MainWindow.ID_FILEMENU_PREFERENCES, gui.MainWindow.OnFileExit(), and gui.MainWindow.OnPreferences().
Referenced by gui.MainWindow.createMenus().
def gui.MainWindow.createHelpMenu | ( | self | ) |
Create "Help" menu.
References gui.MainWindow.createMenuEntry(), gui.MainWindow.helpmenu, and gui.MainWindow.OnAbout().
Referenced by gui.MainWindow.createMenus().
def gui.MainWindow.createManageMenu | ( | self | ) |
Create "Manage" menu.
References gui.MainWindow.createMenuEntry(), gui.MainWindow.ID_MANAGEMENU_ADDINDEX, gui.MainWindow.ID_MANAGEMENU_ADDSHARE, gui.MainWindow.ID_MANAGEMENU_FETCHQUOTES, gui.MainWindow.ID_MANAGEMENU_TRADE, gui.MainWindow.managemenu, gui.MainWindow.OnFetchQuotes(), gui.dialogs.DlgFetchQuotes.OnFetchQuotes(), gui.MainWindow.OnNewIndex(), gui.panel.PanelIndex.OnNewIndex(), gui.MainWindow.OnNewShare(), gui.panel.PanelShare.OnNewShare(), and gui.MainWindow.OnNewTransaction().
Referenced by gui.MainWindow.createMenus().
def gui.MainWindow.createMenuEntry | ( | self, | |
menu, | |||
mid, | |||
item, | |||
htext, | |||
func, | |||
kind = wx.ITEM_NORMAL |
|||
) |
Create a single menu item.
self | The object pointer |
menu | Menu to append |
mid | ID of the entry |
item | Menu text |
htext | Help text |
func | Function to call if the menu event occur |
kind | Kind of the menu entry |
Referenced by gui.MainWindow.createFileMenu(), gui.MainWindow.createHelpMenu(), gui.MainWindow.createManageMenu(), gui.MainWindow.createReportMenu(), and gui.MainWindow.createViewMenu().
def gui.MainWindow.createMenus | ( | self | ) |
Create all menus.
References gui.MainWindow.createFileMenu(), gui.MainWindow.createHelpMenu(), gui.MainWindow.createManageMenu(), gui.MainWindow.createReportMenu(), gui.MainWindow.createViewMenu(), gui.MainWindow.filemenu, gui.MainWindow.helpmenu, gui.MainWindow.managemenu, gui.MainWindow.menubar, gui.MainWindow.reportmenu, and gui.MainWindow.viewmenu.
def gui.MainWindow.createReportMenu | ( | self | ) |
Create "Reports" menu.
References gui.MainWindow.createMenuEntry(), gui.MainWindow.ID_REPORTMENU_PORTFOLIOREPORT, gui.MainWindow.ID_REPORTMENU_POSITIONREPORT, gui.MainWindow.OnPortfolioReport(), gui.MainWindow.OnPositionReport(), and gui.MainWindow.reportmenu.
Referenced by gui.MainWindow.createMenus().
def gui.MainWindow.createViewMenu | ( | self | ) |
Create "View" menu.
References gui.MainWindow.createMenuEntry(), gui.MainWindow.ID_VIEWMENU_CURRENCY, gui.MainWindow.ID_VIEWMENU_EXCHANGE, gui.MainWindow.ID_VIEWMENU_INDEX, gui.MainWindow.ID_VIEWMENU_POSITIONDETAILS, gui.MainWindow.ID_VIEWMENU_POSITIONLIST, gui.MainWindow.ID_VIEWMENU_SHARE, gui.MainWindow.ID_VIEWMENU_SUMMARY, gui.MainWindow.ID_VIEWMENU_TRANSACTION, gui.MainWindow.ID_VIEWMENU_WATCHLIST, gui.MainWindow.OnCreateCurrency(), gui.MainWindow.OnCreateExchange(), gui.MainWindow.OnCreateIndex(), gui.MainWindow.OnCreatePositionDetails(), gui.MainWindow.OnCreatePositionList(), gui.MainWindow.OnCreateShare(), gui.MainWindow.OnCreateSummary(), gui.MainWindow.OnCreateTransaction(), gui.MainWindow.OnCreateWatchList(), and gui.MainWindow.viewmenu.
Referenced by gui.MainWindow.createMenus().
def gui.MainWindow.handleMDIChild | ( | self, | |
panelClass, | |||
attr, | |||
closeEvent, | |||
title | |||
) |
Creates and closes MDI child windows.
The function toggles the state of an MDI child between created and closed. A created child has a valid reference.
New children are set up by creating a wx.MDIChildFrame
and placing the content in form of a wx.Frame
in it.
The menu item will be disabled for native MDI platforms and a event handler for the close event will be installed to re-enable the menu item.
The state of the menu entry is set depending on the platform.
self | The object pointer |
panelClass | Class that provides the content of the window. |
attr | Name of the attribute to store the reference to the MDI child. |
closeEvent | Handler for MDI children close event |
title | Title of the MDI child window |
References gui.MainWindow.attr2menu, gui.MainWindow.viewmenu, and gui.MainWindow.views_open.
Referenced by gui.MainWindow.OnCreateCurrency(), gui.MainWindow.OnCreateExchange(), gui.MainWindow.OnCreateIndex(), gui.MainWindow.OnCreatePositionDetails(), gui.MainWindow.OnCreatePositionList(), gui.MainWindow.OnCreateShare(), gui.MainWindow.OnCreateSummary(), gui.MainWindow.OnCreateTransaction(), and gui.MainWindow.OnCreateWatchList().
def gui.MainWindow.OnAbout | ( | self, | |
event | |||
) |
Open about dialog.
Referenced by gui.MainWindow.createHelpMenu().
def gui.MainWindow.OnClose | ( | self, | |
event | |||
) |
Save the current configuration before the GUI is closed.
References gui.MainWindow.saveGUIConfig(), gui.MainWindow.saveSMMConfig(), and gui.MainWindow.views_open.
def gui.MainWindow.OnCloseCurrency | ( | self, | |
event | |||
) |
Cleanup / update actions on closing currency panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateCurrency().
def gui.MainWindow.OnCloseExchange | ( | self, | |
event | |||
) |
Cleanup / update actions on closing exchange panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateExchange().
def gui.MainWindow.OnCloseIndex | ( | self, | |
event | |||
) |
Cleanup / update actions on closing indices panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateIndex().
def gui.MainWindow.OnClosePositionDetails | ( | self, | |
event | |||
) |
Cleanup / update actions on closing open position panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreatePositionDetails().
def gui.MainWindow.OnClosePositionList | ( | self, | |
event | |||
) |
Cleanup / update actions on closing open position panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreatePositionList().
def gui.MainWindow.OnCloseShare | ( | self, | |
event | |||
) |
Cleanup / update actions on closing share panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateShare().
def gui.MainWindow.OnCloseSummary | ( | self, | |
event | |||
) |
Cleanup / update actions on closing summary panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateSummary().
def gui.MainWindow.OnCloseTransaction | ( | self, | |
event | |||
) |
Cleanup / update actions on closing transaction panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateTransaction().
def gui.MainWindow.OnCloseWatchList | ( | self, | |
event | |||
) |
Cleanup / update actions on closing watch list panel.
References gui.MainWindow.closeView().
Referenced by gui.MainWindow.OnCreateWatchList().
def gui.MainWindow.OnCreateCurrency | ( | self, | |
event | |||
) |
Show and maintain all currencies.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseCurrency().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateExchange | ( | self, | |
event | |||
) |
Show and maintain all exchanges.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseExchange().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateIndex | ( | self, | |
event | |||
) |
Show and maintain all indices.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseIndex().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreatePositionDetails | ( | self, | |
event | |||
) |
Show all open positions.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnClosePositionDetails().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreatePositionList | ( | self, | |
event | |||
) |
Show all open positions.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnClosePositionList().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateShare | ( | self, | |
event | |||
) |
Show and maintain all shares.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseShare().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateSummary | ( | self, | |
event | |||
) |
Show a summary about the current deposit.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseSummary().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateTransaction | ( | self, | |
event | |||
) |
Show and maintain all transactions.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseTransaction().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnCreateWatchList | ( | self, | |
event | |||
) |
Show all watch list entries.
References gui.MainWindow.handleMDIChild(), and gui.MainWindow.OnCloseWatchList().
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
def gui.MainWindow.OnFetchQuotes | ( | self, | |
event | |||
) |
Open fetch quotes dialog.
Referenced by gui.MainWindow.createManageMenu().
def gui.MainWindow.OnFileExit | ( | self, | |
event | |||
) |
Finish this application.
References smm.objects.Position.Close().
Referenced by gui.MainWindow.createFileMenu().
def gui.MainWindow.OnNewIndex | ( | self, | |
event | |||
) |
Open new index dialog.
Referenced by gui.MainWindow.createManageMenu().
def gui.MainWindow.OnNewShare | ( | self, | |
event | |||
) |
Open new share dialog.
Referenced by gui.MainWindow.createManageMenu().
def gui.MainWindow.OnNewTransaction | ( | self, | |
event | |||
) |
Open new transaction dialog.
Referenced by gui.MainWindow.createManageMenu().
def gui.MainWindow.OnPortfolioReport | ( | self, | |
event | |||
) |
Open a new dialog to show a depot report.
Referenced by gui.MainWindow.createReportMenu().
def gui.MainWindow.OnPositionReport | ( | self, | |
event | |||
) |
Open a new dialog to show a position report.
Referenced by gui.MainWindow.createReportMenu().
def gui.MainWindow.OnPreferences | ( | self, | |
event | |||
) |
Open preferences dialog.
Referenced by gui.MainWindow.createFileMenu().
def gui.MainWindow.restoreGUIConfig | ( | self | ) |
Restore general GUI configuration.
def gui.MainWindow.restoreSMMConfig | ( | self | ) |
Restore GUI configuration of all SMM elements.
References gui.MainWindow.ID_VIEWMENU_CURRENCY, gui.MainWindow.ID_VIEWMENU_EXCHANGE, gui.MainWindow.ID_VIEWMENU_INDEX, gui.MainWindow.ID_VIEWMENU_POSITIONDETAILS, gui.MainWindow.ID_VIEWMENU_POSITIONLIST, gui.MainWindow.ID_VIEWMENU_SHARE, gui.MainWindow.ID_VIEWMENU_SUMMARY, gui.MainWindow.ID_VIEWMENU_TRANSACTION, gui.MainWindow.ID_VIEWMENU_WATCHLIST, gui.MainWindow.OnCreateCurrency(), gui.MainWindow.OnCreateExchange(), gui.MainWindow.OnCreateIndex(), gui.MainWindow.OnCreatePositionDetails(), gui.MainWindow.OnCreatePositionList(), gui.MainWindow.OnCreateShare(), gui.MainWindow.OnCreateSummary(), gui.MainWindow.OnCreateTransaction(), gui.MainWindow.OnCreateWatchList(), and gui.MainWindow.viewmenu.
def gui.MainWindow.saveGUIConfig | ( | self | ) |
Store general GUI configuration.
Referenced by gui.MainWindow.OnClose().
def gui.MainWindow.saveSMMConfig | ( | self | ) |
Store general GUI configuration.
References gui.MainWindow.views_open.
Referenced by gui.MainWindow.OnClose().
|
static |
Mapping between view name and menu id.
Referenced by gui.MainWindow.closeView(), and gui.MainWindow.handleMDIChild().
gui.MainWindow.filemenu |
All menu entries grouped to the "File" menu.
Referenced by gui.MainWindow.createFileMenu(), and gui.MainWindow.createMenus().
gui.MainWindow.helpmenu |
All menu entries grouped to the "Help" menu.
Referenced by gui.MainWindow.createHelpMenu(), and gui.MainWindow.createMenus().
|
static |
Referenced by gui.MainWindow.createFileMenu().
|
static |
Referenced by gui.MainWindow.createManageMenu().
|
static |
Referenced by gui.MainWindow.createManageMenu().
|
static |
Referenced by gui.MainWindow.createManageMenu().
|
static |
Referenced by gui.MainWindow.createManageMenu().
|
static |
Referenced by gui.MainWindow.createReportMenu().
|
static |
Referenced by gui.MainWindow.createReportMenu().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
|
static |
Referenced by gui.MainWindow.createViewMenu(), and gui.MainWindow.restoreSMMConfig().
gui.MainWindow.managemenu |
All menu entries grouped to the "Manage" menu.
Referenced by gui.MainWindow.createManageMenu(), and gui.MainWindow.createMenus().
gui.MainWindow.menubar |
Main menubar with all submenus.
Referenced by gui.MainWindow.createMenus().
|
static |
Indicates native MDI support.
gui.MainWindow.nativeMDI |
gui.MainWindow.reportmenu |
All menu entries grouped to the "Reports" menu.
Referenced by gui.MainWindow.createMenus(), and gui.MainWindow.createReportMenu().
gui.MainWindow.ViewCurrency |
Reference to the "Currency" MDI client panel.
gui.MainWindow.ViewExchange |
Reference to the "Exchange" MDI client panel.
gui.MainWindow.ViewIndex |
Reference to the "Indices" MDI client panel.
gui.MainWindow.viewmenu |
All menu entries grouped to the "View" menu.
Referenced by gui.MainWindow.closeView(), gui.MainWindow.createMenus(), gui.MainWindow.createViewMenu(), gui.MainWindow.handleMDIChild(), and gui.MainWindow.restoreSMMConfig().
gui.MainWindow.ViewPositionDetails |
Reference to the "OpenPositionDetails" MDI client panel.
gui.MainWindow.ViewPositionList |
Reference to the "OpenPositionList" MDI client panel.
|
static |
List of all open views.
Referenced by gui.MainWindow.closeView(), gui.MainWindow.handleMDIChild(), gui.MainWindow.OnClose(), and gui.MainWindow.saveSMMConfig().
gui.MainWindow.ViewShare |
Reference to the "Share" MDI client panel.
gui.MainWindow.ViewSummary |
Reference to the "Summary" MDI client panel.
gui.MainWindow.ViewTransaction |
Reference to the "Transaction" MDI client panel.
gui.MainWindow.ViewWatchList |