• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python gui.QgsFieldComboBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中qgis.gui.QgsFieldComboBox的典型用法代码示例。如果您正苦于以下问题:Python QgsFieldComboBox类的具体用法?Python QgsFieldComboBox怎么用?Python QgsFieldComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了QgsFieldComboBox类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: testFilter

    def testFilter(self):
        """ test setting field with filter """
        l = create_layer()
        w = QgsFieldComboBox()
        w.setLayer(l)
        w.setFilters(QgsFieldProxyModel.Int)
        self.assertEqual(w.layer(), l)

        w.setField('fldint')
        self.assertEqual(w.currentField(), 'fldint')
开发者ID:peterisb,项目名称:QGIS,代码行数:10,代码来源:test_qgsfieldcombobox.py


示例2: __init__

    def __init__(self, curPointLayerName, curPolygonLayerName, curFiledName, parent=None):
        QtGui.QDialog.__init__(self, parent)

        self.resize(300, 100)
        Plugin().plPrint("curPointLayerName:: %s" % curPointLayerName)
        Plugin().plPrint("curPolygonLayerName:: %s" % curPolygonLayerName)
        Plugin().plPrint("curFiledName:: %s" % curFiledName)
        self.setWindowTitle(Plugin().getPluginName())
        self.__mainLayout = QtGui.QVBoxLayout(self)
        self.__layout = QtGui.QGridLayout(self)

        # self.__layout.addWidget(QtGui.QLabel(self.tr("Point layer name") + ":"), 0, 0)
        l1 = QtGui.QLabel(u"Имя точечного слоя" + ":")
        l1.setSizePolicy(
            QtGui.QSizePolicy.Preferred,
            QtGui.QSizePolicy.Fixed
        )
        self.__layout.addWidget(l1, 0, 0)
        self.pointsLayersComboBox = QgsMapLayerComboBox()
        self.pointsLayersComboBox.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.pointsLayersComboBox.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.pointsLayersComboBox.setEditable(True)
        self.pointsLayersComboBox.setEditText(curPointLayerName)
        self.pointsLayersComboBox.layerChanged.connect(self.layerChooze1)
        self.__layout.addWidget(self.pointsLayersComboBox, 0, 1)


        # self.__layout.addWidget(QtGui.QLabel(self.tr("Field name") + ":"), 2, 0)
        self.__layout.addWidget(QtGui.QLabel(u"Имя поля" + ":"), 2, 0)
        self.fieldName = QgsFieldComboBox()
        self.fieldName.setFilters(QgsFieldProxyModel.Int)
        self.fieldName.setEditable(True)
        self.fieldName.setEditText(curFiledName)
        self.fieldName.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fieldName, 2, 1)

        # self.__layout.addWidget(QtGui.QLabel(self.tr("Polypon layer name") + ":"), 1, 0)
        self.__layout.addWidget(QtGui.QLabel(u"Имя полигонального слоя" + ":"), 1, 0)
        self.polygonsLayersComboBox = QgsMapLayerComboBox()
        self.polygonsLayersComboBox.setFilters(QgsMapLayerProxyModel.PolygonLayer)
        self.polygonsLayersComboBox.setEditable(True)
        self.polygonsLayersComboBox.setEditText(curPolygonLayerName)
        self.polygonsLayersComboBox.layerChanged.connect(self.layerChooze2)
        self.polygonsLayersComboBox.layerChanged.connect(self.fieldName.setLayer)
        self.__layout.addWidget(self.polygonsLayersComboBox, 1, 1)

        # self.startButton = QtGui.QPushButton(self.tr("Start"))
        # self.startButton.clicked.connect(self.startCalculation)
        # self.__layout.addWidget(self.startButton, 3, 1)

        self.__mainLayout.addLayout(self.__layout)
        # self.progress = QtGui.QLabel()
        # self.__mainLayout.addWidget(self.progress)
        self.__bbox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok)
        self.__bbox.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        self.__bbox.accepted.connect(self.accept)
        self.__mainLayout.addWidget(self.__bbox)
开发者ID:nextgis,项目名称:qgis.points_in_polygons,代码行数:60,代码来源:dialog.py


示例3: testGettersSetters

    def testGettersSetters(self):
        """ test combobox getters/setters """
        l = create_layer()
        w = QgsFieldComboBox()
        w.setLayer(l)
        self.assertEqual(w.layer(), l)

        w.setField('fldint')
        self.assertEqual(w.currentField(), 'fldint')
开发者ID:peterisb,项目名称:QGIS,代码行数:9,代码来源:test_qgsfieldcombobox.py


示例4: __init__

    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(500, 100)
        self.setWindowTitle("Settings")

        layout = QGridLayout(self)

        csTargetLayerName = getCSLayerName()
        bufferTargetLayerName = getRZLayerName()

        csLable = QLabel("Compressor staitions layer:")
        csLable.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        layout.addWidget(csLable, 0, 0)
        self.__csLayerName = QgsMapLayerComboBox()
        self.__csLayerName.setEditable(True)
        self.__csLayerName.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.__csLayerName.setEditText(csTargetLayerName)
        self.__csLayerName.layerChanged.connect(self.csLayerChooze)
        self.__csLayerName.editTextChanged.connect(self.csLayernameSave)
        self.__csLayerName.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        layout.addWidget(self.__csLayerName, 0, 1)

        self.__csIdField = QgsFieldComboBox()
        self.__csIdField.setEditable(True)
        self.__csIdField.fieldChanged.connect(self.csIdFiledChooze)
        self.__csIdField.editTextChanged.connect(self.csIdFieldSave)
        self.__csIdField.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        self.csIdFieldFill()
        layout.addWidget(self.__csIdField, 0, 2)

        bufferLable = QLabel("Buffer layer:")
        bufferLable.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        layout.addWidget(bufferLable, 1, 0)
        # self.__bufferLayerName = QLineEdit(bufferTargetLayerName, self)
        # self.__bufferLayerName.editingFinished.connect(self.bufferTargetLayernameSave)
        self.__bufferLayerName = QgsMapLayerComboBox()
        self.__bufferLayerName.setEditable(True)
        self.__bufferLayerName.setFilters(QgsMapLayerProxyModel.PolygonLayer)
        self.__bufferLayerName.setEditText(bufferTargetLayerName)
        self.__bufferLayerName.layerChanged.connect(self.bufferLayerChooze)
        self.__bufferLayerName.editTextChanged.connect(self.bufferLayernameSave)
        layout.addWidget(self.__bufferLayerName, 1, 1)
开发者ID:nextgis,项目名称:qgis.ipc_plugin,代码行数:43,代码来源:settings_dialog.py


示例5: createWidget

    def createWidget(self):
        self._layer = None

        if self.dialogType in (DIALOG_STANDARD, DIALOG_BATCH):
            if self.param.multiple:
                return MultipleInputPanel(options=[])
            else:
                widget = QgsFieldComboBox()
                widget.setAllowEmptyFieldName(self.param.optional)
                widget.fieldChanged.connect(lambda: self.widgetValueHasChanged.emit(self))
                if self.param.datatype == ParameterTableField.DATA_TYPE_NUMBER:
                    widget.setFilters(QgsFieldProxyModel.Numeric)
                elif self.param.datatype == ParameterTableField.DATA_TYPE_STRING:
                    widget.setFilters(QgsFieldProxyModel.String)
                elif self.param.datatype == ParameterTableField.DATA_TYPE_DATETIME:
                    widget.setFilters(QgsFieldProxyModel.Date | QgsFieldProxyModel.Time)
                return widget
        else:
            widget = QComboBox()
            widget.setEditable(True)
            fields = self.dialog.getAvailableValuesOfType(ParameterTableField, None)
            if self.param.optional:
                widget.addItem(self.NOT_SET, None)
            for f in fields:
                widget.addItem(self.dialog.resolveValueDescription(f), f)
            return widget
开发者ID:,项目名称:,代码行数:26,代码来源:


示例6: SettingsDialog

class SettingsDialog(QDialog):
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)

        self.resize(500, 100)
        self.setWindowTitle("Settings")

        layout = QGridLayout(self)

        csTargetLayerName = getCSLayerName()
        bufferTargetLayerName = getRZLayerName()

        csLable = QLabel("Compressor staitions layer:")
        csLable.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        layout.addWidget(csLable, 0, 0)
        self.__csLayerName = QgsMapLayerComboBox()
        self.__csLayerName.setEditable(True)
        self.__csLayerName.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.__csLayerName.setEditText(csTargetLayerName)
        self.__csLayerName.layerChanged.connect(self.csLayerChooze)
        self.__csLayerName.editTextChanged.connect(self.csLayernameSave)
        self.__csLayerName.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
        layout.addWidget(self.__csLayerName, 0, 1)

        self.__csIdField = QgsFieldComboBox()
        self.__csIdField.setEditable(True)
        self.__csIdField.fieldChanged.connect(self.csIdFiledChooze)
        self.__csIdField.editTextChanged.connect(self.csIdFieldSave)
        self.__csIdField.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        self.csIdFieldFill()
        layout.addWidget(self.__csIdField, 0, 2)

        bufferLable = QLabel("Buffer layer:")
        bufferLable.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed)
        layout.addWidget(bufferLable, 1, 0)
        # self.__bufferLayerName = QLineEdit(bufferTargetLayerName, self)
        # self.__bufferLayerName.editingFinished.connect(self.bufferTargetLayernameSave)
        self.__bufferLayerName = QgsMapLayerComboBox()
        self.__bufferLayerName.setEditable(True)
        self.__bufferLayerName.setFilters(QgsMapLayerProxyModel.PolygonLayer)
        self.__bufferLayerName.setEditText(bufferTargetLayerName)
        self.__bufferLayerName.layerChanged.connect(self.bufferLayerChooze)
        self.__bufferLayerName.editTextChanged.connect(self.bufferLayernameSave)
        layout.addWidget(self.__bufferLayerName, 1, 1)

    def csLayerChooze(self, qgsMapLayer):
        self.__csLayerName.setEditText(qgsMapLayer.name())

    def csLayernameSave(self, csTargetLayerName):
        if csTargetLayerName == u"":
            return
        setCSLayerName(csTargetLayerName)
        self.csIdFieldFill()

    def csIdFieldFill(self):
        csIdField = getCSIdField()
        csTargetLayerName = getCSLayerName()
        layers = QgsMapLayerRegistry.instance().mapLayersByName(csTargetLayerName)
        if len(layers) > 0:
            self.__csIdField.setLayer(layers[0])
        else:
            self.__csIdField.setLayer(None)
        self.__csIdField.setEditText(csIdField)

    def csIdFiledChooze(self, fieldName):
        self.__csIdField.setEditText(fieldName)

    def csIdFieldSave(self, fieldName):
        settings = QSettings()
        if fieldName == u"":
            return
        setCSIdField(fieldName)

    def bufferLayerChooze(self, qgsMapLayer):
        self.__bufferLayerName.setEditText(qgsMapLayer.name())

    def bufferLayernameSave(self, bufferTargetLayerName):
        settings = QSettings()
        if bufferTargetLayerName == u"":
            return
        setRZLayerName(bufferTargetLayerName)
开发者ID:nextgis,项目名称:qgis.ipc_plugin,代码行数:81,代码来源:settings_dialog.py


示例7: __init__

    def __init__(
            self,
            curPointsLayerFrom,
            curPointsLayerTo,
            curFNIdFrom,
            curFNLink,
            curFNIdTo,
            curResultLayerName,
            parent=None):
        QtGui.QDialog.__init__(self, parent)

        self.resize(500, 200)

        self.setWindowTitle(QgisPlugin().pluginName)
        self.__mainLayout = QtGui.QVBoxLayout(self)
        self.__layout = QtGui.QGridLayout(self)

        l1 = QtGui.QLabel(self.tr(u"Point layer 'FROM'") + ":")
        l1.setSizePolicy(
            QtGui.QSizePolicy.Preferred,
            QtGui.QSizePolicy.Fixed
        )
        self.__layout.addWidget(l1, 0, 0)
        self.pointsLayerFrom = QgsMapLayerComboBox()
        self.pointsLayerFrom.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.pointsLayerFrom.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.pointsLayerFrom.setEditable(True)
        # self.pointsLayerFrom.setEditText(curPointsLayerFrom)
        self.pointsLayerFrom.layerChanged.connect(self.choozeLayerFrom)
        self.__layout.addWidget(self.pointsLayerFrom, 0, 1)

        l2 = QtGui.QLabel(self.tr(u"Point layer 'TO'") + ":")
        l2.setSizePolicy(
            QtGui.QSizePolicy.Preferred,
            QtGui.QSizePolicy.Fixed
        )
        self.__layout.addWidget(l2, 1, 0)
        self.pointsLayerTo = QgsMapLayerComboBox()
        self.pointsLayerTo.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.pointsLayerTo.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.pointsLayerTo.setEditable(True)
        # self.pointsLayerTo.setEditText(curPointsLayerTo)
        self.pointsLayerTo.layerChanged.connect(self.choozeLayerTo)
        self.__layout.addWidget(self.pointsLayerTo, 1, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Point 'FROM' id field") + ":"),
            2, 0
        )
        self.fnIdFrom = QgsFieldComboBox()
        self.fnIdFrom.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnIdFrom.setEditable(True)
        # self.fnIdFrom.setEditText(curFNIdFrom)
        self.fnIdFrom.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnIdFrom, 2, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Link field") + ":"),
            3, 0
        )
        self.fnLink = QgsFieldComboBox()
        self.fnLink.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnLink.setEditable(True)
        # self.fnLink.setEditText(curFNLink)
        self.fnLink.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnLink, 3, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Point 'TO' id field") + ":"), 4, 0)
        self.fnIdTo = QgsFieldComboBox()
        self.fnIdTo.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnIdTo.setEditable(True)
        # self.fnIdTo.setEditText(curFNIdTo)
        self.fnIdTo.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnIdTo, 4, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Save result in layer") + ":"),
            5, 0
        )
        self.linesLayer = QgsMapLayerComboBox()
        self.linesLayer.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.linesLayer.setFilters(QgsMapLayerProxyModel.LineLayer)
        self.linesLayer.setEditable(True)
        self.linesLayer.layerChanged.connect(self.choozeResultLayer)
        self.__layout.addWidget(self.linesLayer, 5, 1)

        # self.__layout4resultFileChoose = QtGui.QHBoxLayout()
        # self.leResultFilename = QtGui.QLineEdit(curResultFilename)
        # self.__layout4resultFileChoose.addWidget(self.leResultFilename)
        # self.pbChooseResultFilename = QtGui.QPushButton(u"Выбрать")
#.........这里部分代码省略.........
开发者ID:nextgis,项目名称:qgis.connect_points,代码行数:101,代码来源:dialog.py


示例8: Dialog

class Dialog(QtGui.QDialog):
    def __init__(
            self,
            curPointsLayerFrom,
            curPointsLayerTo,
            curFNIdFrom,
            curFNLink,
            curFNIdTo,
            curResultLayerName,
            parent=None):
        QtGui.QDialog.__init__(self, parent)

        self.resize(500, 200)

        self.setWindowTitle(QgisPlugin().pluginName)
        self.__mainLayout = QtGui.QVBoxLayout(self)
        self.__layout = QtGui.QGridLayout(self)

        l1 = QtGui.QLabel(self.tr(u"Point layer 'FROM'") + ":")
        l1.setSizePolicy(
            QtGui.QSizePolicy.Preferred,
            QtGui.QSizePolicy.Fixed
        )
        self.__layout.addWidget(l1, 0, 0)
        self.pointsLayerFrom = QgsMapLayerComboBox()
        self.pointsLayerFrom.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.pointsLayerFrom.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.pointsLayerFrom.setEditable(True)
        # self.pointsLayerFrom.setEditText(curPointsLayerFrom)
        self.pointsLayerFrom.layerChanged.connect(self.choozeLayerFrom)
        self.__layout.addWidget(self.pointsLayerFrom, 0, 1)

        l2 = QtGui.QLabel(self.tr(u"Point layer 'TO'") + ":")
        l2.setSizePolicy(
            QtGui.QSizePolicy.Preferred,
            QtGui.QSizePolicy.Fixed
        )
        self.__layout.addWidget(l2, 1, 0)
        self.pointsLayerTo = QgsMapLayerComboBox()
        self.pointsLayerTo.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.pointsLayerTo.setFilters(QgsMapLayerProxyModel.PointLayer)
        self.pointsLayerTo.setEditable(True)
        # self.pointsLayerTo.setEditText(curPointsLayerTo)
        self.pointsLayerTo.layerChanged.connect(self.choozeLayerTo)
        self.__layout.addWidget(self.pointsLayerTo, 1, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Point 'FROM' id field") + ":"),
            2, 0
        )
        self.fnIdFrom = QgsFieldComboBox()
        self.fnIdFrom.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnIdFrom.setEditable(True)
        # self.fnIdFrom.setEditText(curFNIdFrom)
        self.fnIdFrom.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnIdFrom, 2, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Link field") + ":"),
            3, 0
        )
        self.fnLink = QgsFieldComboBox()
        self.fnLink.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnLink.setEditable(True)
        # self.fnLink.setEditText(curFNLink)
        self.fnLink.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnLink, 3, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Point 'TO' id field") + ":"), 4, 0)
        self.fnIdTo = QgsFieldComboBox()
        self.fnIdTo.setFilters(QgsFieldProxyModel.Int | QgsFieldProxyModel.LongLong)
        self.fnIdTo.setEditable(True)
        # self.fnIdTo.setEditText(curFNIdTo)
        self.fnIdTo.fieldChanged.connect(self.filedChooze)
        self.__layout.addWidget(self.fnIdTo, 4, 1)

        self.__layout.addWidget(
            QtGui.QLabel(self.tr(u"Save result in layer") + ":"),
            5, 0
        )
        self.linesLayer = QgsMapLayerComboBox()
        self.linesLayer.setSizePolicy(
            QtGui.QSizePolicy.Expanding,
            QtGui.QSizePolicy.Fixed
        )
        self.linesLayer.setFilters(QgsMapLayerProxyModel.LineLayer)
        self.linesLayer.setEditable(True)
        self.linesLayer.layerChanged.connect(self.choozeResultLayer)
        self.__layout.addWidget(self.linesLayer, 5, 1)

        # self.__layout4resultFileChoose = QtGui.QHBoxLayout()
        # self.leResultFilename = QtGui.QLineEdit(curResultFilename)
        # self.__layout4resultFileChoose.addWidget(self.leResultFilename)
#.........这里部分代码省略.........
开发者ID:nextgis,项目名称:qgis.connect_points,代码行数:101,代码来源:dialog.py


示例9: setupUi

    def setupUi(self, Autocorrelation):
        Autocorrelation.setObjectName(_fromUtf8("Autocorrelation"))
        Autocorrelation.setWindowModality(QtCore.Qt.NonModal)
        Autocorrelation.resize(674, 462)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Autocorrelation.sizePolicy().hasHeightForWidth())
        Autocorrelation.setSizePolicy(sizePolicy)
        Autocorrelation.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.verticalLayout = QtGui.QVBoxLayout(Autocorrelation)
        self.verticalLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.formLayout = QtGui.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.label = QtGui.QLabel(Autocorrelation)
        self.label.setObjectName(_fromUtf8("label"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label)
        self.cbx_aggregation_layer = QgsMapLayerComboBox(Autocorrelation)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cbx_aggregation_layer.sizePolicy().hasHeightForWidth())
        self.cbx_aggregation_layer.setSizePolicy(sizePolicy)
        self.cbx_aggregation_layer.setObjectName(_fromUtf8("cbx_aggregation_layer"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.cbx_aggregation_layer)
        self.label_4 = QtGui.QLabel(Autocorrelation)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_4)
        self.cbx_indicator_field = QgsFieldComboBox(Autocorrelation)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cbx_indicator_field.sizePolicy().hasHeightForWidth())
        self.cbx_indicator_field.setSizePolicy(sizePolicy)
        self.cbx_indicator_field.setObjectName(_fromUtf8("cbx_indicator_field"))
        self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.cbx_indicator_field)
        self.horizontalLayout_6 = QtGui.QHBoxLayout()
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.le_output_filepath = QtGui.QLineEdit(Autocorrelation)
        self.le_output_filepath.setObjectName(_fromUtf8("le_output_filepath"))
        self.horizontalLayout_6.addWidget(self.le_output_filepath)
        self.button_browse = QtGui.QPushButton(Autocorrelation)
        self.button_browse.setObjectName(_fromUtf8("button_browse"))
        self.horizontalLayout_6.addWidget(self.button_browse)
        self.formLayout.setLayout(12, QtGui.QFormLayout.FieldRole, self.horizontalLayout_6)
        self.label_3 = QtGui.QLabel(Autocorrelation)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.formLayout.setWidget(8, QtGui.QFormLayout.LabelRole, self.label_3)
        self.cbx_contiguity = QtGui.QComboBox(Autocorrelation)
        self.cbx_contiguity.setEnabled(True)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cbx_contiguity.sizePolicy().hasHeightForWidth())
        self.cbx_contiguity.setSizePolicy(sizePolicy)
        self.cbx_contiguity.setMinimumSize(QtCore.QSize(104, 0))
        self.cbx_contiguity.setObjectName(_fromUtf8("cbx_contiguity"))
        self.cbx_contiguity.addItem(_fromUtf8(""))
        self.cbx_contiguity.addItem(_fromUtf8(""))
        self.formLayout.setWidget(8, QtGui.QFormLayout.FieldRole, self.cbx_contiguity)
        self.label_8 = QtGui.QLabel(Autocorrelation)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.formLayout.setWidget(12, QtGui.QFormLayout.LabelRole, self.label_8)
        self.verticalLayout.addLayout(self.formLayout)
        self.button_box_ok = QtGui.QDialogButtonBox(Autocorrelation)
        self.button_box_ok.setOrientation(QtCore.Qt.Horizontal)
        self.button_box_ok.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.button_box_ok.setObjectName(_fromUtf8("button_box_ok"))
        self.verticalLayout.addWidget(self.button_box_ok)

        self.retranslateUi(Autocorrelation)
        QtCore.QObject.connect(self.cbx_aggregation_layer, QtCore.SIGNAL(_fromUtf8("layerChanged(QgsMapLayer*)")), self.cbx_indicator_field.setLayer)
        QtCore.QMetaObject.connectSlotsByName(Autocorrelation)
开发者ID:ePublicHealth,项目名称:GeoPublicHealth,代码行数:75,代码来源:autocorrelation.py


示例10: setupUi

    def setupUi(self, Composite_Index):
        Composite_Index.setObjectName(_fromUtf8("Composite_Index"))
        Composite_Index.resize(814, 754)
        self.verticalLayout = QtGui.QVBoxLayout(Composite_Index)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.formLayout = QtGui.QFormLayout()
        self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.label = QtGui.QLabel(Composite_Index)
        self.label.setObjectName(_fromUtf8("label"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label)
        self.cbx_aggregation_layer = QgsMapLayerComboBox(Composite_Index)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cbx_aggregation_layer.sizePolicy().hasHeightForWidth())
        self.cbx_aggregation_layer.setSizePolicy(sizePolicy)
        self.cbx_aggregation_layer.setObjectName(_fromUtf8("cbx_aggregation_layer"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.cbx_aggregation_layer)
        self.label_4 = QtGui.QLabel(Composite_Index)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_4)
        self.cbx_indicator_field = QgsFieldComboBox(Composite_Index)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cbx_indicator_field.sizePolicy().hasHeightForWidth())
        self.cbx_indicator_field.setSizePolicy(sizePolicy)
        self.cbx_indicator_field.setObjectName(_fromUtf8("cbx_indicator_field"))
        self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.cbx_indicator_field)
        self.label_3 = QtGui.QLabel(Composite_Index)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.formLayout.setWidget(11, QtGui.QFormLayout.LabelRole, self.label_3)
        self.label_8 = QtGui.QLabel(Composite_Index)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.formLayout.setWidget(12, QtGui.QFormLayout.LabelRole, self.label_8)
        self.horizontalLayout_6 = QtGui.QHBoxLayout()
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.le_output_filepath = QtGui.QLineEdit(Composite_Index)
        self.le_output_filepath.setObjectName(_fromUtf8("le_output_filepath"))
        self.horizontalLayout_6.addWidget(self.le_output_filepath)
        self.button_browse = QtGui.QPushButton(Composite_Index)
        self.button_browse.setObjectName(_fromUtf8("button_browse"))
        self.horizontalLayout_6.addWidget(self.button_browse)
        self.formLayout.setLayout(12, QtGui.QFormLayout.FieldRole, self.horizontalLayout_6)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.formLayout.setLayout(13, QtGui.QFormLayout.FieldRole, self.horizontalLayout)
        self.radioButton_vector_positive = QtGui.QRadioButton(Composite_Index)
        self.radioButton_vector_positive.setChecked(True)
        self.radioButton_vector_positive.setObjectName(_fromUtf8("radioButton_vector_positive"))
        self.buttonGroup_2 = QtGui.QButtonGroup(Composite_Index)
        self.buttonGroup_2.setObjectName(_fromUtf8("buttonGroup_2"))
        self.buttonGroup_2.addButton(self.radioButton_vector_positive)
        self.formLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.radioButton_vector_positive)
        self.radioButton_vector_negative = QtGui.QRadioButton(Composite_Index)
        self.radioButton_vector_negative.setObjectName(_fromUtf8("radioButton_vector_negative"))
        self.buttonGroup_2.addButton(self.radioButton_vector_negative)
        self.formLayout.setWidget(6, QtGui.QFormLayout.FieldRole, self.radioButton_vector_negative)
        self.le_new_column = QtGui.QLineEdit(Composite_Index)
        self.le_new_column.setMaxLength(10)
        self.le_new_column.setObjectName(_fromUtf8("le_new_column"))
        self.formLayout.setWidget(11, QtGui.QFormLayout.FieldRole, self.le_new_column)
        self.cbx_list_indicators = QtGui.QListWidget(Composite_Index)
        self.cbx_list_indicators.setObjectName(_fromUtf8("cbx_list_indicators"))
        self.formLayout.setWidget(10, QtGui.QFormLayout.FieldRole, self.cbx_list_indicators)
        self.command_link_button = QtGui.QCommandLinkButton(Composite_Index)
        self.command_link_button.setObjectName(_fromUtf8("command_link_button"))
        self.formLayout.setWidget(8, QtGui.QFormLayout.FieldRole, self.command_link_button)
        self.label_2 = QtGui.QLabel(Composite_Index)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.label_2)
        self.verticalLayout.addLayout(self.formLayout)
        self.symbology = QgsCollapsibleGroupBox(Composite_Index)
        self.symbology.setCheckable(True)
        self.symbology.setProperty("collapsed", False)
        self.symbology.setObjectName(_fromUtf8("symbology"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.symbology)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.label_9 = QtGui.QLabel(self.symbology)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.horizontalLayout_3.addWidget(self.label_9)
        self.color_low_value = QgsColorButtonV2(self.symbology)
        self.color_low_value.setProperty("color", QtGui.QColor(50, 164, 46))
        self.color_low_value.setObjectName(_fromUtf8("color_low_value"))
        self.horizontalLayout_3.addWidget(self.color_low_value)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem)
        self.label_10 = QtGui.QLabel(self.symbology)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.horizontalLayout_3.addWidget(self.label_10)
        self.color_high_value = QgsColorButtonV2(self.symbology)
        self.color_high_value.setProperty("color", QtGui.QColor(202, 33, 36))
        self.color_high_value.setObjectName(_fromUtf8("color_high_value"))
        self.horizontalLayout_3.addWidget(self.color_high_value)
        self.verticalLayout_3.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
#.........这里部分代码省略.........
开发者ID:ePublicHealth,项目名称:GeoPublicHealth,代码行数:101,代码来源:composite_index.py



注:本文中的qgis.gui.QgsFieldComboBox类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python gui.QgsFieldExpressionWidget类代码示例发布时间:2022-05-26
下一篇:
Python gui.QgsExpressionLineEdit类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap