Notation box window ##. More...
Public Member Functions | |
def | __init__ |
def | load_textwindow |
def | show_textwindow |
def | close_textwindow |
def | load_modmenu |
def | close_modmenu |
def | close_widgets |
close all widgets | |
Public Attributes | |
parent | |
anchval | |
textwin | |
menu | |
textbox | |
actionbs | |
radio | |
rFig | |
rAxis | |
rData | |
event | |
seltext | |
Private Member Functions | |
def | _create_textwindow |
Notation window widget. | |
def | _NotationBox |
def | _AnchorRadio |
def | _NewRadioButton |
def | _enable_radio |
def | _reset_radio |
def | _select_radio |
def | _get_anchval |
def | _get_note |
def | _clear_textbox |
def | _set_note |
def | _ActionButtons |
def | _NewButton |
def | _cancel_text |
def | _print_text |
def | _create_modmenu |
Modify/Delete menu widget. | |
def | _modify_note |
load text window for modification | |
def | _delnote_dialog |
dialog to confirm deleting note | |
def | _disppix2screen |
helper functions |
Notation box window ##.
Backend based class to create widgets to add, modify, or delete note on the plot. Note: Press LEFT-mouse button on the plot to ADD a note on the canvas. A notation window will be loaded for specifying note string and anchor. The note will be anchored on a position in whether figure- (0-1 relative in a figure), panel- (0-1 relative in a plot axes), or data-coordinate (data value in a plot axes). Press RIGHT-mouse button on a note to MODIFY/DELETE it. A cascade menu will be displayed and you can select an operation.
Definition at line 215 of file customgui_qt4agg.py.
def asap.customgui_qt4agg.NotationWindowQT4Agg.__init__ | ( | self, | |
master = None |
|||
) |
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 229 of file customgui_qt4agg.py.
def asap.customgui_qt4agg.NotationWindowQT4Agg._ActionButtons | ( | self, | |
parent = None |
|||
) | [private] |
def asap.customgui_qt4agg.NotationWindowQT4Agg._AnchorRadio | ( | self, | |
parent = None |
|||
) | [private] |
Definition at line 269 of file customgui_qt4agg.py.
def asap.customgui_qt4agg.NotationWindowQT4Agg._cancel_text | ( | self | ) | [private] |
Cancel adding/modifying a note and close notaion window. called when 'cancel' is selected.
Definition at line 372 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons(), and asap.customgui_qt4agg.NotationWindowQT4Agg._ActionButtons().
def asap.customgui_qt4agg.NotationWindowQT4Agg._clear_textbox | ( | self | ) | [private] |
Clear the text box
Definition at line 342 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._set_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg._set_note().
def asap.customgui_qt4agg.NotationWindowQT4Agg._create_modmenu | ( | self, | |
master = None |
|||
) | [private] |
Modify/Delete menu widget.
Create modify/delete menu widget
Definition at line 439 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog(), asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg.parent.
def asap.customgui_qt4agg.NotationWindowQT4Agg._create_textwindow | ( | self, | |
master = None |
|||
) | [private] |
Notation window widget.
Create notation window widget and iconfy it
Definition at line 237 of file customgui_qt4agg.py.
def asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog | ( | self | ) | [private] |
dialog to confirm deleting note
Load dialog to confirm deletion of the text
Definition at line 500 of file customgui_qt4agg.py.
References asap.customgui_base.NotationWindowCommon.cancel_delete(), asap.customgui_base.NotationWindowCommon.delete_note(), asap.customgui_qt4agg.NotationWindowQT4Agg.parent, and asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg._create_modmenu().
def asap.customgui_qt4agg.NotationWindowQT4Agg._disppix2screen | ( | self, | |
xpixd, | |||
ypixd | |||
) | [private] |
helper functions
helper function to calculate a pixel position form Upper-left corner of the SCREEN from a pixel position (xpixd, ypixd) from Lower-left of the CANVAS (which, e.g., event.x/y returns) Returns: (x, y): pixel position from Upper-left corner of the SCREEN.
Definition at line 513 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note().
def asap.customgui_qt4agg.NotationWindowQT4Agg._enable_radio | ( | self | ) | [private] |
Enable 'panel' and 'data' radio button
Definition at line 304 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.anchval.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow().
def asap.customgui_qt4agg.NotationWindowQT4Agg._get_anchval | ( | self | ) | [private] |
Returns a integer of a selected radio button
Definition at line 333 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.anchval.
Referenced by asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_qt4agg.NotationWindowQT4Agg._get_note | ( | self | ) | [private] |
Returns a note string specified in the text box
Definition at line 338 of file customgui_qt4agg.py.
Referenced by asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note | ( | self | ) | [private] |
load text window for modification
helper function to load text window to modify selected note
Definition at line 476 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg._disppix2screen(), asap.customgui_base.NotationWindowCommon._get_axes_from_pos(), asap.customgui_qt4agg.NotationWindowQT4Agg._select_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._set_note(), asap.asaplot.asaplot.canvas, asap.asaplotgui_qt4.asaplotgui.canvas, asap.asaplotgui.asaplotgui.canvas, asap.asaplotgui_gtk.asaplotgui.canvas, asap.asaplotbase.asaplotbase.canvas, asap.customgui_base.NotationWindowCommon.canvas, asap.customgui_base.NotationWindowCommon.seltext, and asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg._create_modmenu().
def asap.customgui_qt4agg.NotationWindowQT4Agg._NewButton | ( | self, | |
parent, | |||
text, | |||
command, | |||
balloon = None , |
|||
addit = True |
|||
) | [private] |
Definition at line 365 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons(), and asap.customgui_qt4agg.NotationWindowQT4Agg._ActionButtons().
def asap.customgui_qt4agg.NotationWindowQT4Agg._NewRadioButton | ( | self, | |
parent, | |||
text, | |||
balloon = None , |
|||
bgr = None , |
|||
value = None |
|||
) | [private] |
Definition at line 294 of file customgui_qt4agg.py.
def asap.customgui_qt4agg.NotationWindowQT4Agg._NotationBox | ( | self, | |
parent = None |
|||
) | [private] |
Definition at line 254 of file customgui_qt4agg.py.
References cleanhelper_regression.font.
def asap.customgui_qt4agg.NotationWindowQT4Agg._print_text | ( | self | ) | [private] |
Add/Modify a note. Called when 'print' is selected on the notation window.
Definition at line 379 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow(), and asap.customgui_base.NotationWindowCommon.print_text().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._ActionButtons(), and asap.customgui_qt4agg.NotationWindowQT4Agg._ActionButtons().
def asap.customgui_qt4agg.NotationWindowQT4Agg._reset_radio | ( | self | ) | [private] |
Disable 'panel' and 'data' radio button
Definition at line 312 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.anchval.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow().
def asap.customgui_qt4agg.NotationWindowQT4Agg._select_radio | ( | self, | |
selection | |||
) | [private] |
Select a specified radio button
Definition at line 321 of file customgui_qt4agg.py.
References asap.customgui_base.NotationWindowCommon.anchors, and asap.customgui_qt4agg.NotationWindowQT4Agg.anchval.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note().
def asap.customgui_qt4agg.NotationWindowQT4Agg._set_note | ( | self, | |
note = None |
|||
) | [private] |
Set a note string to the text box
Definition at line 346 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg._clear_textbox().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note().
Close cascade menu.
Definition at line 470 of file customgui_qt4agg.py.
References asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.close_widgets(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_widgets(), asap.customgui_tkagg.NotationWindowTkAgg.load_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.load_textwindow().
Close text window.
Definition at line 430 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._cancel_text(), asap.customgui_qt4agg.NotationWindowQT4Agg._cancel_text(), asap.customgui_tkagg.NotationWindowTkAgg._print_text(), asap.customgui_qt4agg.NotationWindowQT4Agg._print_text(), asap.customgui_tkagg.NotationWindowTkAgg.close_widgets(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_widgets(), asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg.load_modmenu().
close all widgets
Close note window and menu
Definition at line 494 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.close_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow().
def asap.customgui_qt4agg.NotationWindowQT4Agg.load_modmenu | ( | self, | |
event | |||
) |
Load cascade menu at a event position to modify or delete selected text. Parameter: event: an even object to specify the position to load text window.
Definition at line 451 of file customgui_qt4agg.py.
References asap.customgui_base.NotationWindowCommon._get_selected_text(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_textwindow(), and asap.customgui_base.NotationWindowCommon.seltext.
def asap.customgui_qt4agg.NotationWindowQT4Agg.load_textwindow | ( | self, | |
event | |||
) |
Load text window at a event position to add a note on a plot. Parameter: event: an even object to specify the position to load text window.
Definition at line 387 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg.close_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg.parent.
def asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow | ( | self, | |
xpix, | |||
ypix, | |||
basetext = None , |
|||
enableaxes = False |
|||
) |
Load text window at a position of screen to add a note on a plot. Parameters: xpix, ypix: a pixel position from Upper-left corner of the screen. basetext: None (default) or any string. A string to be printed on text box when loaded. enableaxes: False (default) or True. If True, 'panel' & 'data' radio button is enabled.
Definition at line 404 of file customgui_qt4agg.py.
References asap.customgui_qt4agg.NotationWindowQT4Agg._enable_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._reset_radio(), and asap.customgui_qt4agg.NotationWindowQT4Agg.textwin.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), and asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note().
Definition at line 244 of file customgui_qt4agg.py.
Definition at line 232 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._AnchorRadio(), asap.customgui_qt4agg.NotationWindowQT4Agg._enable_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._get_anchval(), asap.customgui_qt4agg.NotationWindowQT4Agg._reset_radio(), and asap.customgui_qt4agg.NotationWindowQT4Agg._select_radio().
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 398 of file customgui_qt4agg.py.
Referenced by asap.interactivemask.interactivemask.finish_selection(), asap.interactivemask.interactivemask.select_mask(), and asap.interactivemask.interactivemask.set_startevent().
Definition at line 234 of file customgui_qt4agg.py.
Definition at line 230 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._create_modmenu(), asap.customgui_qt4agg.NotationWindowQT4Agg._create_modmenu(), asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog(), asap.customgui_tkagg.NotationWindowTkAgg.load_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.load_textwindow().
Definition at line 273 of file customgui_qt4agg.py.
Definition at line 277 of file customgui_qt4agg.py.
Definition at line 280 of file customgui_qt4agg.py.
Definition at line 274 of file customgui_qt4agg.py.
Reimplemented from asap.customgui_base.NotationWindowCommon.
Definition at line 432 of file customgui_qt4agg.py.
Definition at line 242 of file customgui_qt4agg.py.
Definition at line 233 of file customgui_qt4agg.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.show_textwindow(), and asap.customgui_qt4agg.NotationWindowQT4Agg.show_textwindow().