Public Member Functions | |
| def | __init__ |
| def | add_report_line |
| def | new_page |
| def | close_pages |
| def | close_page |
| def | update |
| def | get_page |
| def | get_flow_graph |
Public Attributes | |
| handle_states | |
| scrolled_window | |
| drawing_area | |
| notebook | |
| page_to_be_closed | |
| current_page | |
| text_display | |
| reports_scrolled_window | |
Private Member Functions | |
| def | _quit |
| def | _handle_page_change |
| def | _show_reports_window |
| def | _set_page |
| def | _save_changes |
| def | _get_files |
| def | _get_pages |
Private Attributes | |
| _platform | |
The topmost window with menus, the tool bar, and other major windows.
Definition at line 41 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.__init__ | ( | self, | ||
| handle_states, | ||||
| platform | ||||
| ) |
MainWindow contructor.
| handle_states | the callback function |
Definition at line 44 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._quit | ( | self, | ||
| window, | ||||
| event | ||||
| ) | [private] |
Handle the delete event from the main window. Generated by pressing X to close, alt+f4, or right click+close. This method in turns calls the state handler to quit.
Definition at line 102 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._handle_page_change | ( | self, | ||
| notebook, | ||||
| page, | ||||
| page_num | ||||
| ) | [private] |
Handle a page change. When the user clicks on a new tab, reload the flow graph to update the vars window and call handle states (select nothing) to update the buttons.
| notebook | the notebook | |
| page | new page | |
| page_num | new page number |
Definition at line 112 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.add_report_line | ( | self, | ||
| line | ||||
| ) |
Place line at the end of the text buffer, then scroll its window all the way down.
| line | the new text |
Definition at line 129 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._show_reports_window | ( | self, | ||
| show | ||||
| ) | [private] |
Show the reports window when show is True. Hide the reports window when show is False.
| show | boolean flag |
Definition at line 139 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.new_page | ( | self, | ||
file_path = '', |
||||
show = False | ||||
| ) |
Create a new notebook page. Set the tab to be selected.
| file_path | optional file to load into the flow graph | |
| show | true if the page should be shown after loading |
Definition at line 152 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.close_pages | ( | self | ) |
Close all the pages in this notebook. @return true if all closed
Definition at line 187 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.close_page | ( | self, | ||
ensure = True | ||||
| ) |
Close the current page. If the notebook becomes empty, and ensure is true, call new page upon exit to ensure that at least one page exists. @param ensure boolean
Definition at line 206 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.update | ( | self | ) |
Set the title of the main window. Set the titles on the page tabs. Show/hide the reports window.
| title | the window title |
Definition at line 234 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow.get_page | ( | self | ) |
| def grc.gui.MainWindow.MainWindow.get_flow_graph | ( | self | ) |
Get the selected flow graph.
Definition at line 279 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._set_page | ( | self, | ||
| page | ||||
| ) | [private] |
Set the current page.
| page | the page widget |
Definition at line 290 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._save_changes | ( | self | ) | [private] |
| def grc.gui.MainWindow.MainWindow._get_files | ( | self | ) | [private] |
Get the file names for all the pages, in order. @return list of file paths
Definition at line 308 of file MainWindow.py.
| def grc.gui.MainWindow.MainWindow._get_pages | ( | self | ) | [private] |
Get a list of all pages in the notebook. @return list of pages
Definition at line 315 of file MainWindow.py.
grc.gui.MainWindow.MainWindow._platform [private] |
Definition at line 49 of file MainWindow.py.
Definition at line 51 of file MainWindow.py.
Definition at line 60 of file MainWindow.py.
Definition at line 63 of file MainWindow.py.
Definition at line 66 of file MainWindow.py.
Definition at line 67 of file MainWindow.py.
Definition at line 68 of file MainWindow.py.
Definition at line 82 of file MainWindow.py.
Definition at line 84 of file MainWindow.py.
1.5.4