ChartWidgetBase

see also Tooth Notation

methods and attributes

class lib_openmolar.client.qt4.widgets.chart_widgets.chart_widget_base.ChartWidgetBase(model=None, parent=None)[source]

Bases: PyQt4.QtGui.QWidget

a custom widget to show a standard UK dental chart allows for user navigation with mouse and/or keyboard

__init__(model=None, parent=None)[source]
CHART_STYLE_COMPLEX = 4
CHART_STYLE_COMPLEX_PLUS = 4.5
CHART_STYLE_DECIDUOUS = 2
CHART_STYLE_MIXED = 1
CHART_STYLE_PERIO = 6
CHART_STYLE_ROOTS = 5
CHART_STYLE_SIMPLE = 3
add_key_press_function(key, function)[source]

used by widgets which inherit from this class eg. widg.add_key_press_function(QtCore.Qt.Key_ControlA, widg.do_something)

allow_multi_select = None
borderX = None
borderY = None
chart_data_model = None

the relevant ChartDataModel

choose_teeth()[source]
clear()[source]

refreshes the chart (and underlying data model)

clear_selection()[source]

set every tooth to is_selected =False

complex_style()[source]
current_tooth[source]
deciduous_style()[source]
draw_background()[source]
draw_deciduous = None
draw_grid()[source]
draw_mid_lines()[source]
draw_perio = None
draw_permanent = None
draw_roots = None
draw_selections(tooth, painter)[source]
draw_tooth(tooth, painter)[source]

often overwritten by charts which inherits from this one

focusInEvent(event)[source]
focusOutEvent(event)[source]
focused = None
init_teeth_and_roots()[source]
inner_percentage = None

relative width of the inner rows

iterate_teeth(visible_only=False)[source]
keyPressEvent(event)[source]
key_press_dict = None
leaveEvent(event)[source]
minimumSizeHint()[source]
mixed_style()[source]
model_changed()[source]

called when underlying model has altered

mouseDoubleClickEvent(event)[source]
mouseMoveEvent(event)[source]
mousePressEvent(event)[source]
paintEvent(event=None)[source]

overrides the paint event so that we can draw our grid note - other charts will re-implement this!

perio_style()[source]
redraw_check(previous_selection=None, previous_current_tooth=None)[source]
resizeEvent(event=None)[source]

initiate/update allsizes

roots_style()[source]
selected_teeth[source]
setStyle(enum)[source]
set_current_tooth(new_tooth=None, set_as_selected=True)[source]

overloaded function, tooth can be either a reference, or a tooth object, or NoneType to deselect all NOTE - if a reference is sent, all other selections will be cleared!

set_known_teeth(key)[source]

sets which teeth are present from a 64bit integer key opposite function is found in the static chart subclass

show_LR = None
show_selected = None
simple_style()[source]
sizeHint()[source]
teeth = None

populated during resize event

tooth_from_ref(ref)[source]

Table Of Contents

Previous topic

ChartTooth

Next topic

ChartWidgetCompleted