Notation box window ##. More...
Public Member Functions | |
def | __init__ |
def | print_text |
def | delete_note |
def | cancel_delete |
Public Attributes | |
canvas | |
event | |
note | |
anchors | |
seltext | |
numnote | |
Private Member Functions | |
def | _get_axes_from_pos |
def | _oldpos2new |
WORKAROUND for old matplotlib. | |
def | _convert_pix2dat |
def | _get_selected_text |
def | _get_text_dist2 |
def | _remove_seltext |
Notation box window ##.
A base class to define the functions that the backend-based GUI notation class must implement to print/modify/delete notes on a canvas. The following methods *must* be implemented in the backend-based parent class: _get_note : get text in text box _get_anchval : get anchor value selected
Definition at line 424 of file customgui_base.py.
def asap.customgui_base.NotationWindowCommon.__init__ | ( | self, | |
master = None |
|||
) |
Reimplemented in asap.customgui_qt4agg.NotationWindowQT4Agg, and asap.customgui_tkagg.NotationWindowTkAgg.
Definition at line 434 of file customgui_base.py.
def asap.customgui_base.NotationWindowCommon._convert_pix2dat | ( | self, | |
pos, | |||
axes | |||
) | [private] |
helper function to convert a position in figure-coord (0-1) to data-coordinate of the axes
Definition at line 568 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon._oldpos2new().
Referenced by asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_base.NotationWindowCommon._get_axes_from_pos | ( | self, | |
pos, | |||
canvas | |||
) | [private] |
helper function to get axes of a position in a plot (fig-coord)
Definition at line 547 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon._oldpos2new().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note(), and asap.customgui_base.NotationWindowCommon.print_text().
def asap.customgui_base.NotationWindowCommon._get_selected_text | ( | self, | |
event | |||
) | [private] |
helper function to return a dictionary of the nearest note to the event.
Definition at line 596 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon._get_text_dist2().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu(), and asap.customgui_qt4agg.NotationWindowQT4Agg.load_modmenu().
def asap.customgui_base.NotationWindowCommon._get_text_dist2 | ( | self, | |
event, | |||
textobj | |||
) | [private] |
helper function to calculate square of distance between a event position and a text object.
Definition at line 633 of file customgui_base.py.
Referenced by asap.customgui_base.NotationWindowCommon._get_selected_text().
def asap.customgui_base.NotationWindowCommon._oldpos2new | ( | self, | |
oldpos = None |
|||
) | [private] |
WORKAROUND for old matplotlib.
Definition at line 565 of file customgui_base.py.
Referenced by asap.customgui_base.NotationWindowCommon._convert_pix2dat(), and asap.customgui_base.NotationWindowCommon._get_axes_from_pos().
def asap.customgui_base.NotationWindowCommon._remove_seltext | ( | self | ) | [private] |
helper function to remove the selected note
Definition at line 650 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon.numnote, pCASA.remove(), and asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_base.NotationWindowCommon.delete_note(), and asap.customgui_base.NotationWindowCommon.print_text().
Cancel deleting the selected note. Called when 'cancel' button selected on confirmation dialog.
Definition at line 671 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), and asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog().
Remove selected note.
Definition at line 641 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon._remove_seltext().
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), and asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog().
Print a note on a canvas specified with the Notation window. Called when 'print' button selected on the window.
Definition at line 444 of file customgui_base.py.
References asap.customgui_base.NotationWindowCommon._convert_pix2dat(), asap.customgui_tkagg.NotationWindowTkAgg._get_anchval(), asap.customgui_qt4agg.NotationWindowQT4Agg._get_anchval(), asap.customgui_base.NotationWindowCommon._get_axes_from_pos(), asap.customgui_tkagg.NotationWindowTkAgg._get_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._get_note(), asap.customgui_base.NotationWindowCommon._remove_seltext(), asap.customgui_base.NotationWindowCommon.anchors, 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.event, asap.customgui_base.NotationWindowCommon.numnote, and asap.customgui_base.NotationWindowCommon.seltext.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._print_text(), and asap.customgui_qt4agg.NotationWindowQT4Agg._print_text().
Definition at line 439 of file customgui_base.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._select_radio(), asap.customgui_qt4agg.NotationWindowQT4Agg._select_radio(), and asap.customgui_base.NotationWindowCommon.print_text().
Definition at line 436 of file customgui_base.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note(), and asap.customgui_base.NotationWindowCommon.print_text().
Reimplemented in asap.customgui_qt4agg.NotationWindowQT4Agg, and asap.customgui_tkagg.NotationWindowTkAgg.
Definition at line 437 of file customgui_base.py.
Referenced by asap.interactivemask.interactivemask.finish_selection(), asap.customgui_base.NotationWindowCommon.print_text(), asap.interactivemask.interactivemask.select_mask(), and asap.interactivemask.interactivemask.set_startevent().
Definition at line 438 of file customgui_base.py.
Definition at line 441 of file customgui_base.py.
Referenced by asap.customgui_base.NotationWindowCommon._remove_seltext(), and asap.customgui_base.NotationWindowCommon.print_text().
Reimplemented in asap.customgui_qt4agg.NotationWindowQT4Agg, and asap.customgui_tkagg.NotationWindowTkAgg.
Definition at line 440 of file customgui_base.py.
Referenced by asap.customgui_tkagg.NotationWindowTkAgg._delnote_dialog(), asap.customgui_qt4agg.NotationWindowQT4Agg._delnote_dialog(), asap.customgui_tkagg.NotationWindowTkAgg._modify_note(), asap.customgui_qt4agg.NotationWindowQT4Agg._modify_note(), asap.customgui_base.NotationWindowCommon._remove_seltext(), asap.customgui_base.NotationWindowCommon.cancel_delete(), asap.customgui_tkagg.NotationWindowTkAgg.close_modmenu(), asap.customgui_qt4agg.NotationWindowQT4Agg.close_modmenu(), asap.customgui_tkagg.NotationWindowTkAgg.load_modmenu(), asap.customgui_qt4agg.NotationWindowQT4Agg.load_modmenu(), and asap.customgui_base.NotationWindowCommon.print_text().