def led_status_config_ch1_max_sbox_changed(self, value):
        QObject.sender(self).blockSignals(True)

        self.analog_in.set_channel_led_status_config(CH_1,
                                                     self.led_status_config_ch1_min_sbox.value(),
                                                     self.led_status_config_ch1_max_sbox.value(),
                                                     self.led_status_config_ch1_combo.currentIndex())

        QObject.sender(self).blockSignals(False)
Beispiel #2
0
    def led_status_config_ch0_max_sbox_changed(self, value):
        QObject.sender(self).blockSignals(True)

        self.dual020.set_channel_led_status_config(
            CH_0,
            self.led_status_config_ch0_min_sbox.value() * 1000000,
            self.led_status_config_ch0_max_sbox.value() * 1000000,
            self.led_status_config_ch0_combo.currentIndex())

        QObject.sender(self).blockSignals(False)
Beispiel #3
0
    def _writePv(self, v):
        """
        """
        c = QObject.sender(self)
        i = self.spinbox.index(c)
        #print i, c.text(), "changed"

        #print self.pvs_sp[i], v
        caput(self.pvs_sp[i], v)
Beispiel #4
0
    def _writePv(self, v):
        """
        """
        c = QObject.sender(self)
        i = self.spinbox.index(c)
        #print i, c.text(), "changed"

        #print self.pvs_sp[i], v
        caput(self.pvs_sp[i], v)
    def GetBackNextImage(self):
        ''' Get to Back Image '''
        qgsutils.removeAllHighlightFeaturesFromCanvasScene(self.canvas)

        sender = QObject.sender(self)

        lys = self.canvas.layers()  # Check if mapa foto is loaded
        if len(lys) == 0:
            qgsutils.showUserAndLogMessage(
                self, u"Information: ", u"You need to upload the photo layer.",
                QgsMessageBar.INFO)
            return

        for layer in lys:
            if layer.name() == config.layer_name:
                self.encontrado = True
                self.iface.setActiveLayer(layer)
                qApp.processEvents()

                f = self.selected_features

                ac_lordem = f.attribute(config.column_order)

                if sender.objectName() == "btn_back":
                    new_lordem = int(ac_lordem) - 1
                else:
                    new_lordem = int(ac_lordem) + 1

                # Filter mapa foto layer
                ids = [feat.id() for feat in layer.getFeatures(
                    QgsFeatureRequest().setFilterExpression(config.column_order + " ='" + 
                                                            str(new_lordem) + 
                                                            "'"))]

                if len(ids) == 0:
                    qgsutils.showUserAndLogMessage(
                        self, u"Information: ", u"There is no superiority that follows.",
                        QgsMessageBar.INFO)
                    # Filter mapa foto layer
                    ids = [feat.id() for feat in layer.getFeatures(
                        QgsFeatureRequest().setFilterExpression(config.column_order + " ='" + 
                                                                str(ac_lordem) + 
                                                                "'"))]
                    # Update selected feature
                    self.ReloadView(ids[0])
                    return

                self.ReloadView(ids[0])
                qApp.processEvents()

        if self.encontrado is False:
            qgsutils.showUserAndLogMessage(
                self, u"Information: ", u"You need to upload the photo layer.",
                QgsMessageBar.INFO)

        return
    def ResizeDialog(self):
        ''' Expanded/Decreased Dialog '''
        sender = QObject.sender(self)

        w = self.width()
        h = self.height()

        size = self.size()
        anim = QPropertyAnimation(self, 'size', self)
        anim.setStartValue(size)

        if sender.objectName() == "btn_ZoomOut":
            anim.setEndValue(QSize(w - 50, h - 50))
        else:
            anim.setEndValue(QSize(w + 50, h + 50))

        anim.setDuration(300)
        anim.start()
        qApp.processEvents()

        return