コード例 #1
0
    def __init__(self):
        '''
        instanciates with no params
        '''
        self.tree_model = TreatmentTreeModel()

        #:a pointer to the treatment plan :doc:`ChartDataModel`
        self.plan_tx_chartmodel = ChartDataModel()

        #:a pointer to the treatment completed :doc:`ChartDataModel`
        self.cmp_tx_chartmodel = ChartDataModel()

        self._treatment_items = []
        self._deleted_items = []
コード例 #2
0
    def populate_fills(self):

        self.tp_line_edit = QtGui.QLineEdit()
        self.tp_line_edit.setReadOnly(True)
        tp_button = QtGui.QPushButton("teeth present key")
        tp_button.clicked.connect(self.show_teeth_key)
        self.connect(self.chart, QtCore.SIGNAL("teeth present changed"),
                     self.show_teeth_key)

        teeth_present_frame = QtGui.QFrame()
        layout = QtGui.QHBoxLayout(teeth_present_frame)
        layout.addWidget(self.tp_line_edit)
        layout.addWidget(tp_button)

        self.layout().addWidget(teeth_present_frame)

    def show_teeth_key(self, key):
        if key == False:  #function has been called by button click
            key = self.chart.known_teeth_key
        self.tp_line_edit.setText(str(key))


if __name__ == "__main__":
    from lib_openmolar.client.qt4.widgets import ChartDataModel

    model = ChartDataModel()
    app = QtGui.QApplication([])
    dl = _TestDialog(model)
    dl.exec_()
    app.closeAllWindows()