Example #1
0
    def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        self.setupUi(self)
        self.chartwidg = SimpleChartWidg(self)

        layout = QtGui.QHBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)
Example #2
0
class PageFour(_OptionPage):

    def __init__(self, parent=None):
        _OptionPage.__init__(self, parent)
        self.dl = parent
        self.label.setText(
            _("Please select teeth which are to be used as pontics"))
        self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
        layout = QtWidgets.QVBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def showEvent(self, event=None):
        if self.dl.is_upper_input:
            self.chartwidg.disable_lowers()
        else:
            self.chartwidg.disable_uppers()

    @property
    def completed(self):
        return list(self.properties) != []

    @property
    def properties(self):
        for tooth in self.chartwidg.getSelected():
            yield(tooth, "pontic")
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.dl = parent
     self.label.setText(
         _("Please select teeth to be added to this denture"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     layout = QtGui.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
Example #4
0
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.dl = parent
     self.label.setText(
         _("Please select teeth which are to be used as pontics"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     layout = QtWidgets.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.label.setText(
         _("Please select teeth to be added to this denture"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     if parent.is_upper_input:
         self.chartwidg.disable_lowers()
     else:
         self.chartwidg.disable_uppers()
     layout = QtGui.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
    def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        self.setupUi(self)
        self.chartwidg = SimpleChartWidg(self)

        layout = QtGui.QHBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.dl = parent
     self.label.setText(_("Please select teeth which this denture is to replace"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     layout = QtWidgets.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
class PageThree(_OptionPage):

    def __init__(self, parent=None):
        _OptionPage.__init__(self, parent)
        self.dl = parent
        self.label.setText(_(
                           "Please select teeth to be added to this denture"))
        self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
        layout = QtWidgets.QVBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def showEvent(self, event=None):
        if self.dl.is_upper_input:
            self.chartwidg.disable_lowers()
        else:
            self.chartwidg.disable_uppers()

    @property
    def is_completed(self):
        return self.return_text != ""

    @property
    def return_text(self):
        r_teeth, l_teeth = set([]), set([])
        for tooth in self.chartwidg.getSelected():
            m = re.match("[ul]([lr])(\d)", tooth)
            if m:
                if m.groups()[0] == "r":
                    r_teeth.add(m.groups()[1])
                else:
                    l_teeth.add(m.groups()[1])
        retval = ""
        if r_teeth:
            retval += "R"
            for tooth in sorted(r_teeth, reverse=True):
                retval += tooth
        if l_teeth:
            if retval != "":
                retval += ","
            retval += "L"
            for tooth in sorted(l_teeth):
                retval += tooth
        return retval

    @property
    def next_index(self):
        return 2
class PageThree(_OptionPage):
    def __init__(self, parent=None):
        _OptionPage.__init__(self, parent)
        self.dl = parent
        self.label.setText(
            _("Please select teeth to be added to this denture"))
        self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
        layout = QtGui.QVBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def showEvent(self, event=None):
        if self.dl.is_upper_input:
            self.chartwidg.disable_lowers()
        else:
            self.chartwidg.disable_uppers()

    @property
    def is_completed(self):
        return self.return_text != ""

    @property
    def return_text(self):
        r_teeth, l_teeth = set([]), set([])
        for tooth in self.chartwidg.getSelected():
            m = re.match("[ul]([lr])(\d)", tooth)
            if m:
                if m.groups()[0] == "r":
                    r_teeth.add(m.groups()[1])
                else:
                    l_teeth.add(m.groups()[1])
        retval = ""
        if r_teeth:
            retval += "R"
            for tooth in sorted(r_teeth, reverse=True):
                retval += tooth
        if l_teeth:
            if retval != "":
                retval += ","
            retval += "L"
            for tooth in sorted(l_teeth):
                retval += tooth
        return retval

    @property
    def next_index(self):
        return 2
Example #10
0
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.dl = parent
     self.label.setText(
         _("Please select teeth which are to be used as pontics"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     layout = QtGui.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
Example #11
0
 def __init__(self, parent=None):
     _OptionPage.__init__(self, parent)
     self.label.setText(_("Please select teeth to be added to this denture"))
     self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
     if parent.is_upper_input:
         self.chartwidg.disable_lowers()
     else:
         self.chartwidg.disable_uppers()
     layout = QtGui.QVBoxLayout(self.frame)
     layout.addWidget(self.chartwidg)
Example #12
0
class ChooseToothDialog(QtGui.QDialog, Ui_choose_tooth.Ui_Dialog):
    def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        self.setupUi(self)
        self.chartwidg = SimpleChartWidg(self)

        layout = QtGui.QHBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def getInput(self):
        if self.exec_():
            return self.chartwidg.getSelected()
        else:
            return []
Example #13
0
class ChooseToothDialog(QtGui.QDialog, Ui_choose_tooth.Ui_Dialog):
    def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        self.setupUi(self)
        self.chartwidg = SimpleChartWidg(self)

        layout = QtGui.QHBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def getInput(self):
        if self.exec_():
            return self.chartwidg.getSelected()
        else:
            return []
Example #14
0
class PageFour(_OptionPage):
    def __init__(self, parent=None):
        _OptionPage.__init__(self, parent)
        self.dl = parent
        self.label.setText(
            _("Please select teeth which are to be used as pontics"))
        self.chartwidg = SimpleChartWidg(self, auto_ctrl_key=True)
        layout = QtWidgets.QVBoxLayout(self.frame)
        layout.addWidget(self.chartwidg)

    def showEvent(self, event=None):
        if self.dl.is_upper_input:
            self.chartwidg.disable_lowers()
        else:
            self.chartwidg.disable_uppers()

    @property
    def completed(self):
        return list(self.properties) != []

    @property
    def properties(self):
        for tooth in self.chartwidg.getSelected():
            yield (tooth, "pontic")