本文整理汇总了Python中processing.gui.ParametersPanel.ParametersPanel类的典型用法代码示例。如果您正苦于以下问题:Python ParametersPanel类的具体用法?Python ParametersPanel怎么用?Python ParametersPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ParametersPanel类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, parent, alg):
ParametersPanel.__init__(self, parent, alg)
item = self.layoutMain.itemAt(self.layoutMain.count() - 1)
if isinstance(item, QSpacerItem):
self.layoutMain.removeItem(item)
item = None
示例2: updateDependentFields
def updateDependentFields(self):
sender = self.sender()
if not isinstance(sender, QComboBox):
return
if sender.name not in self.dependentItems:
return
layer = sender.itemData(sender.currentIndex())
children = self.dependentItems[sender.name]
for child in children:
widget = self.valueItems[child.name]
if isinstance(widget, FieldsMappingPanel):
widget.setLayer(layer)
ParametersPanel.updateDependentFields(self)
示例3: __init__
def __init__(self, parent, alg):
ParametersPanel.__init__(self, parent, alg)
w = QWidget()
layout = QVBoxLayout()
layout.setMargin(0)
layout.setSpacing(6)
label = QLabel()
label.setText(self.tr("GDAL/OGR console call"))
layout.addWidget(label)
self.text = QPlainTextEdit()
self.text.setReadOnly(True)
layout.addWidget(self.text)
w.setLayout(layout)
self.layoutMain.addWidget(w)
self.connectParameterSignals()
self.parametersHaveChanged()
示例4: getWidgetFromParameter
def getWidgetFromParameter(self, param):
if isinstance(param, ParameterFieldsMapping):
item = FieldsMappingPanel()
if param.parent in self.dependentItems:
items = self.dependentItems[param.parent]
else:
items = []
self.dependentItems[param.parent] = items
items.append(param.name)
parent = self.alg.getParameterFromName(param.parent)
if isinstance(parent, ParameterVector):
layers = dataobjects.getVectorLayers(parent.shapetype)
else:
layers = dataobjects.getTables()
if len(layers) > 0:
item.setLayer(layers[0])
return item
return ParametersPanel.getWidgetFromParameter(self, param)
示例5: getWidgetFromParameter
def getWidgetFromParameter(self, param):
if param.name in self.customParam.keys():
return self.customParam[param.name]
return ParametersPanel.getWidgetFromParameter(self, param)
示例6: __init__
def __init__(self, parent, alg):
self.customParam = CustomParam().getCustomParam()
ParametersPanel.__init__(self, parent, alg)
示例7: somethingDependsOnThisParameter
def somethingDependsOnThisParameter(self, parent):
for param in self.alg.parameters:
if isinstance(param, ParameterFieldsMapping):
if param.parent == parent.name:
return True
return ParametersPanel.somethingDependsOnThisParameter(self, parent)