ChartDataModel

Incomplete documentation - sorry!

Note

Neil - please put some data in technical/class_headings/ChartDataModel.rst

methods and attributes

class lib_openmolar.client.qt4.widgets.chart_widgets.chart_data_model.ChartDataModel[source]

Bases: object

a custom set of dictionaries which holds data about all teeth in the mouth.

ChartWidgets hold no data, but are “views” to this model.

Note

Summary and static chart share one instance of this class. the treatment chart and completed chart have an instance each.

__init__()[source]
add_comment(record)[source]

add comment from the database orm fill is an instance of QtSqlQRecord, with some customisations see lib_openmolar.common.db_orm.static_comments for details

add_crown(crown_record)[source]

add crown from the database orm crown is an instance of QtSqlQRecord, with some customisations see lib_openmolar.common.db_orm.static_crowns for details

add_data(data_list)[source]
add_fill(fill_record)[source]

add fill from the database orm fill is an instance of QtSqlQRecord, with some customisations see lib_openmolar.common.db_orm.static_fills for details

add_fill_from_string(tooth_id, input)[source]
Param :int
Param :string

allows the addition of a fill in the form “MOD,CO”

add_perio_data(tooth_id, type_, values)[source]
add_perio_property(prop)[source]
Param :prop (PerioData )

add a perio data object to the model

add_perio_records(records)[source]

add records from database

add_property(tooth_data)[source]

add a ToothData object to this model

add_root(root_record)[source]

add root data from the database orm root_record is an instance of QtSqlQRecord, with some customisations see lib_openmolar.common.db_orm.static_roots for details

clear()[source]

resets the model, and any attached views

data = None
endResetModel()[source]

call this function after altering the data if you need to inform registered views of the change

get_new_comments()[source]

a generator returning all ToothData objects of type Comment which are NOT in the database (ie have been added by client)

get_new_crowns()[source]

a generator returning all ToothData objects of type Crown which are NOT in the database (ie have been added by client)

get_new_fillings()[source]

a generator returning all ToothData objects of type Filling which are NOT in the database (ie have been added by client)

get_new_roots()[source]

a generator returning all ToothData objects of type Root which are NOT in the database (ie have been added by client)

get_perio_data(tooth_id)[source]
Param :tooth_id (int)

a generator returning all PerioData for this tooth

get_properties(tooth_id)[source]
Param :tooth_id (int)

a generator returning all ToothData objects for this tooth

get_restorations(tooth_id)[source]
Param :tooth_id (int)

a generator returning all ToothData objects of type Filling or Crown for this tooth

get_root_info(tooth_id)[source]
Param :tooth_id (int)

a generator returning all ToothData objects of type Root for this tooth

has_properties(tooth_id)[source]
Param :tooth_id (int)

returns True if this model has data for tooth with this id

load_test_data()[source]
perio_data = None
register_view(widget)[source]

register all widgets which are attached to this model, so that when “endResetModel” is called, they get notified

Note

widgets registered this way must have a method model_changed()

views = None

a list of widgets which need to be informed whenever this model changes

Table Of Contents

Previous topic

BPE_ComboBox

Next topic

ChartLineEdit