Пример #1
0
    def __init__(self, parent=None, database=None):
        super(MotivationsTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "MOTIVATIONS"
        self._table = Motivations
        self._layout = QFormLayout(self)
        self._child_widgets_not_set = True

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding,
                                            QSizePolicy.Expanding)
        self._scroll_contents.setObjectName("mscroll")
        self._scroll_contents.setStyleSheet(
            'QWidget[objectName^="mscroll"] {background-color: #FFFFFF;}')
        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        reason_combos = [
            Motivations.REASON_1.value, Motivations.REASON_2.value,
            Motivations.REASON_3.value
        ]
        for combo in reason_combos:
            combo.setReasonCombos(reason_combos)
            combo.activated.connect(combo.reasonCombos)

        self.connectWidgets()
        self.setReasonsArea()
        self.setGeneralMotivationsArea()
        self._scroll_layout.addRow(VerticalFiller(self))
    def __init__(self, parent=None, database=None):
        super(RepLeakTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "REP_LEAK"
        self._table = RepLeak
        self._layout = QFormLayout(self)
        self._child_widgets_not_set = True

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding,
                                            QSizePolicy.Expanding)
        self._scroll_contents.setObjectName("rplscroll")
        self._scroll_contents.setStyleSheet(
            'QWidget[objectName^="rplscroll"] {background-color: #FFFFFF;}')
        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        self.connectWidgets()
        RepLeak.MET_DEV_AGREE.value.setChecked(True)
        RepLeak.CUS_INFORM.value.setChecked(True)
        self.setRepLeakArea()
        self._scroll_layout.addRow(VerticalFiller(self))
    def __init__(self, parent=None, database=None):
        super(PrevLeakTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "PREV_LEAK"
        self._table = PrevLeak
        self._layout = QFormLayout(self)
        self._child_widgets_not_set = True

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding,
                                            QSizePolicy.Expanding)
        self._scroll_contents.setObjectName("prevleakscroll")
        self._scroll_contents.setStyleSheet(
            'QWidget[objectName^="prevleakscroll"] {background-color: #FFFFFF;}'
        )
        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        self.connectWidgets()
        self.setPrevLeakArea()
        self._scroll_layout.addRow(QWidget(self))
        self._scroll_layout.addRow(VerticalFiller(self))
    def __init__(self, parent=None, database=None):
        super(DeviceDetectionTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "DEVICE_DETECTION"
        self._table = DeviceDetection
        self._layout = QFormLayout(self)

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setObjectName("ddscroll")
        self._scroll_contents.setStyleSheet(
            'QWidget[objectName^="ddscroll"] {background-color: #FFFFFF;}')
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding,
                                            QSizePolicy.Expanding)

        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        self._child_widgets_not_set = True

        self.connectWidgets()
        self.setDeviceStatusArea()
        self.setDetectedLeakArea()
        self.setLeakDiscoveredArea()
        self._scroll_layout.addRow(VerticalFiller(self))
Пример #5
0
    def __init__(self, parent=None, database=None):
        super(FixAndAppTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "FIX_AND_APP"
        self._table = FixAndApp
        self._layout = QFormLayout(self)
        self._child_widgets_not_set = True 

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
        self._scroll_contents.setObjectName("apfxscroll")
        self._scroll_contents.setStyleSheet('QWidget[objectName^="apfxscroll"] {background-color: #FFFFFF;}')
        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        self.connectWidgets()
        self.setFixAppArea()
        self._scroll_layout.addWidget(VerticalFiller(self))
    def setRepLeakArea(self):
        form_box = FormGroupBox("Leak Discovered By SNWA Represenative", self)
        form_box.frame_layout.addRow(RepLeak.LEAK_SHOWING.value)
        vol_unit = QWidget(self)
        vol_unit_row = SmartHFormLayout(vol_unit)
        vol_unit_row.addRow(["Volume at Meter:", "Unit:"],
                            [RepLeak.VOL.value, RepLeak.UNIT.value])
        form_box.frame_layout.addRow(vol_unit)
        form_box.frame_layout.addRow("Leak Location:", RepLeak.LOCS.value)

        metdev_box = FormGroupBox("Meter and Device", self)
        metdev_box.frame_layout.addRow(RepLeak.MET_DEV_AGREE.value)
        metdev_box.frame_layout.addRow("Which has a Higher Volume?",
                                       RepLeak.MET_OR_DEV_HIGHER.value)
        metdev_box.frame_layout.addRow(RepLeak.CUS_INFORM.value)
        metdev_box.frame_layout.addRow("If No, Explain:",
                                       RepLeak.REA_CUS_NOT_INFORM.value)
        metdev_box.frame_layout.addRow("Expected Resolution (If Known):",
                                       RepLeak.RESOLUTION.value)

        form_box.frame_layout.addRow(metdev_box)
        form_box.frame_layout.addRow(VerticalFiller(self))
        self._scroll_layout.addRow(form_box)
    def __init__(self, parent=None, database=None):
        super(CustomerKnowledgeTab, self).__init__(parent)
        Form.__init__(self, parent)
        self._database = database
        self._table_name = "CUSTOMER_KNOWLEDGE"
        self._table = CustomerKnowledge
        self._layout = QFormLayout(self)
        self._child_widgets_not_set = True

        self._scroll = QScrollArea(self)
        self._scroll.setWidgetResizable(True)
        self._layout.addRow(self._scroll)
        self._scroll_contents = QWidget(self)
        self._scroll_contents.setSizePolicy(QSizePolicy.Expanding,
                                            QSizePolicy.Expanding)
        self._scroll_contents.setObjectName("ckwscroll")
        self._scroll_contents.setStyleSheet(
            'QWidget[objectName^="ckwscroll"] {background-color: #FFFFFF;}')
        self._scroll.setWidget(self._scroll_contents)
        self._scroll_layout = QFormLayout(self._scroll_contents)

        self.connectWidgets()
        self.setCustKnowArea()
        self._scroll_layout.addWidget(VerticalFiller(self))