本文整理匯總了Python中qgis.gui.QgsMapLayerComboBox.setSizePolicy方法的典型用法代碼示例。如果您正苦於以下問題:Python QgsMapLayerComboBox.setSizePolicy方法的具體用法?Python QgsMapLayerComboBox.setSizePolicy怎麽用?Python QgsMapLayerComboBox.setSizePolicy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qgis.gui.QgsMapLayerComboBox
的用法示例。
在下文中一共展示了QgsMapLayerComboBox.setSizePolicy方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Ui_ui_quick_query
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_ui_quick_query(object):
def setupUi(self, ui_quick_query):
ui_quick_query.setObjectName(_fromUtf8("ui_quick_query"))
ui_quick_query.resize(644, 805)
self.verticalLayout_3 = QtGui.QVBoxLayout(ui_quick_query)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.scrollArea = QtGui.QScrollArea(ui_quick_query)
self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
self.scrollArea.setFrameShadow(QtGui.QFrame.Plain)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 636, 797))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.pushButton_mapFeatures = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.pushButton_mapFeatures.setObjectName(_fromUtf8("pushButton_mapFeatures"))
self.horizontalLayout_4.addWidget(self.pushButton_mapFeatures)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem)
self.buttonBox = QtGui.QDialogButtonBox(self.scrollAreaWidgetContents)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Reset)
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.horizontalLayout_4.addWidget(self.buttonBox)
self.verticalLayout.addLayout(self.horizontalLayout_4)
self.formLayout = QtGui.QFormLayout()
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.label = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label.setObjectName(_fromUtf8("label"))
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label)
self.comboBox_key = QtGui.QComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_key.sizePolicy().hasHeightForWidth())
self.comboBox_key.setSizePolicy(sizePolicy)
self.comboBox_key.setEditable(True)
self.comboBox_key.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.comboBox_key.setObjectName(_fromUtf8("comboBox_key"))
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.comboBox_key)
self.label_2 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_2)
self.comboBox_value = QtGui.QComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_value.sizePolicy().hasHeightForWidth())
self.comboBox_value.setSizePolicy(sizePolicy)
self.comboBox_value.setEditable(True)
self.comboBox_value.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
self.comboBox_value.setObjectName(_fromUtf8("comboBox_value"))
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.comboBox_value)
self.radioButton_place = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_place.setText(_fromUtf8(""))
self.radioButton_place.setChecked(True)
self.radioButton_place.setObjectName(_fromUtf8("radioButton_place"))
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.radioButton_place)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.comboBox_in_around = QtGui.QComboBox(self.scrollAreaWidgetContents)
self.comboBox_in_around.setObjectName(_fromUtf8("comboBox_in_around"))
self.horizontalLayout_8.addWidget(self.comboBox_in_around)
self.lineEdit_nominatim = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.lineEdit_nominatim.setText(_fromUtf8(""))
self.lineEdit_nominatim.setObjectName(_fromUtf8("lineEdit_nominatim"))
self.horizontalLayout_8.addWidget(self.lineEdit_nominatim)
self.spinBox_distance_point = QtGui.QSpinBox(self.scrollAreaWidgetContents)
self.spinBox_distance_point.setMinimum(1)
self.spinBox_distance_point.setMaximum(999999999)
self.spinBox_distance_point.setSingleStep(100)
self.spinBox_distance_point.setProperty("value", 1000)
self.spinBox_distance_point.setObjectName(_fromUtf8("spinBox_distance_point"))
self.horizontalLayout_8.addWidget(self.spinBox_distance_point)
self.label_distance_point = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_distance_point.setText(_fromUtf8("m"))
self.label_distance_point.setObjectName(_fromUtf8("label_distance_point"))
self.horizontalLayout_8.addWidget(self.label_distance_point)
self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.horizontalLayout_8)
self.radioButton_extentMapCanvas = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentMapCanvas.setText(_fromUtf8(""))
self.radioButton_extentMapCanvas.setObjectName(_fromUtf8("radioButton_extentMapCanvas"))
self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.radioButton_extentMapCanvas)
self.label_13 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_13.setObjectName(_fromUtf8("label_13"))
self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.label_13)
self.radioButton_extentLayer = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentLayer.setText(_fromUtf8(""))
self.radioButton_extentLayer.setObjectName(_fromUtf8("radioButton_extentLayer"))
self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.radioButton_extentLayer)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.label_15 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_15.setObjectName(_fromUtf8("label_15"))
self.horizontalLayout_5.addWidget(self.label_15)
self.comboBox_extentLayer = QgsMapLayerComboBox(self.scrollAreaWidgetContents)
#.........這裏部分代碼省略.........
示例2: Ui_ui_my_queries
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_ui_my_queries(object):
def setupUi(self, ui_my_queries):
ui_my_queries.setObjectName(_fromUtf8("ui_my_queries"))
ui_my_queries.resize(727, 794)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(ui_my_queries.sizePolicy().hasHeightForWidth())
ui_my_queries.setSizePolicy(sizePolicy)
ui_my_queries.setMinimumSize(QtCore.QSize(225, 262))
self.verticalLayout_3 = QtGui.QVBoxLayout(ui_my_queries)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.scrollArea = QtGui.QScrollArea(ui_my_queries)
self.scrollArea.setFrameShape(QtGui.QFrame.NoFrame)
self.scrollArea.setFrameShadow(QtGui.QFrame.Plain)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 719, 786))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.verticalLayout = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.lineEdit_search = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.lineEdit_search.setObjectName(_fromUtf8("lineEdit_search"))
self.verticalLayout.addWidget(self.lineEdit_search)
self.treeQueries = QtGui.QTreeWidget(self.scrollAreaWidgetContents)
self.treeQueries.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.treeQueries.setColumnCount(1)
self.treeQueries.setObjectName(_fromUtf8("treeQueries"))
self.treeQueries.header().setVisible(False)
self.verticalLayout.addWidget(self.treeQueries)
self.formLayout = QtGui.QFormLayout()
self.formLayout.setObjectName(_fromUtf8("formLayout"))
self.label_2 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_2.setText(_fromUtf8("{{geocodeArea:}}"))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_2)
self.lineEdit_nominatim = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.lineEdit_nominatim.setObjectName(_fromUtf8("lineEdit_nominatim"))
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.lineEdit_nominatim)
self.label_5 = QtGui.QLabel(self.scrollAreaWidgetContents)
self.label_5.setText(_fromUtf8("{{bbox}}"))
self.label_5.setObjectName(_fromUtf8("label_5"))
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_5)
self.radioButton_extentMapCanvas = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentMapCanvas.setChecked(True)
self.radioButton_extentMapCanvas.setObjectName(_fromUtf8("radioButton_extentMapCanvas"))
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.radioButton_extentMapCanvas)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.radioButton_extentLayer = QtGui.QRadioButton(self.scrollAreaWidgetContents)
self.radioButton_extentLayer.setObjectName(_fromUtf8("radioButton_extentLayer"))
self.horizontalLayout_5.addWidget(self.radioButton_extentLayer)
self.comboBox_extentLayer = QgsMapLayerComboBox(self.scrollAreaWidgetContents)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_extentLayer.sizePolicy().hasHeightForWidth())
self.comboBox_extentLayer.setSizePolicy(sizePolicy)
self.comboBox_extentLayer.setObjectName(_fromUtf8("comboBox_extentLayer"))
self.horizontalLayout_5.addWidget(self.comboBox_extentLayer)
self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.horizontalLayout_5)
self.verticalLayout.addLayout(self.formLayout)
self.groupBox = QgsCollapsibleGroupBox(self.scrollAreaWidgetContents)
self.groupBox.setChecked(False)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.formLayout_4 = QtGui.QFormLayout()
self.formLayout_4.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout_4.setObjectName(_fromUtf8("formLayout_4"))
self.label_7 = QtGui.QLabel(self.groupBox)
self.label_7.setText(_fromUtf8(""))
self.label_7.setObjectName(_fromUtf8("label_7"))
self.formLayout_4.setWidget(6, QtGui.QFormLayout.FieldRole, self.label_7)
self.label_3 = QtGui.QLabel(self.groupBox)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.formLayout_4.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_3)
self.label_10 = QtGui.QLabel(self.groupBox)
self.label_10.setText(_fromUtf8("Points"))
self.label_10.setObjectName(_fromUtf8("label_10"))
self.formLayout_4.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_10)
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.checkBox_points = QtGui.QCheckBox(self.groupBox)
self.checkBox_points.setText(_fromUtf8(""))
self.checkBox_points.setChecked(True)
self.checkBox_points.setObjectName(_fromUtf8("checkBox_points"))
self.horizontalLayout_4.addWidget(self.checkBox_points)
self.lineEdit_csv_points = QtGui.QLineEdit(self.groupBox)
self.lineEdit_csv_points.setInputMask(_fromUtf8(""))
self.lineEdit_csv_points.setText(_fromUtf8(""))
self.lineEdit_csv_points.setPlaceholderText(_fromUtf8("col1,col2,col3"))
self.lineEdit_csv_points.setObjectName(_fromUtf8("lineEdit_csv_points"))
self.horizontalLayout_4.addWidget(self.lineEdit_csv_points)
self.formLayout_4.setLayout(2, QtGui.QFormLayout.FieldRole, self.horizontalLayout_4)
self.horizontalLayout_6 = QtGui.QHBoxLayout()
self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
self.checkBox_lines = QtGui.QCheckBox(self.groupBox)
self.checkBox_lines.setText(_fromUtf8(""))
#.........這裏部分代碼省略.........
示例3: Ui_apisSearchDialog
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_apisSearchDialog(object):
def setupUi(self, apisSearchDialog):
apisSearchDialog.setObjectName(_fromUtf8("apisSearchDialog"))
apisSearchDialog.resize(314, 557)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/APIS/icons/apis.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
apisSearchDialog.setWindowIcon(icon)
self.dockWidgetContents = QtGui.QWidget()
self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
self.verticalLayout = QtGui.QVBoxLayout(self.dockWidgetContents)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.uiSearchTab = QtGui.QTabWidget(self.dockWidgetContents)
self.uiSearchTab.setEnabled(True)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.uiSearchTab.sizePolicy().hasHeightForWidth())
self.uiSearchTab.setSizePolicy(sizePolicy)
self.uiSearchTab.setObjectName(_fromUtf8("uiSearchTab"))
self.tab_9 = QtGui.QWidget()
self.tab_9.setObjectName(_fromUtf8("tab_9"))
self.verticalLayout_8 = QtGui.QVBoxLayout(self.tab_9)
self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8"))
self.uiSearchImageRBtn = QtGui.QRadioButton(self.tab_9)
self.uiSearchImageRBtn.setChecked(True)
self.uiSearchImageRBtn.setObjectName(_fromUtf8("uiSearchImageRBtn"))
self.verticalLayout_8.addWidget(self.uiSearchImageRBtn)
self.uiSearchSiteRBtn = QtGui.QRadioButton(self.tab_9)
self.uiSearchSiteRBtn.setObjectName(_fromUtf8("uiSearchSiteRBtn"))
self.verticalLayout_8.addWidget(self.uiSearchSiteRBtn)
self.uiSearchFindspotRBtn = QtGui.QRadioButton(self.tab_9)
self.uiSearchFindspotRBtn.setObjectName(_fromUtf8("uiSearchFindspotRBtn"))
self.verticalLayout_8.addWidget(self.uiSearchFindspotRBtn)
self.line_8 = QtGui.QFrame(self.tab_9)
self.line_8.setFrameShape(QtGui.QFrame.HLine)
self.line_8.setFrameShadow(QtGui.QFrame.Sunken)
self.line_8.setObjectName(_fromUtf8("line_8"))
self.verticalLayout_8.addWidget(self.line_8)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.uiSpatialSearchBtn = QtGui.QPushButton(self.tab_9)
self.uiSpatialSearchBtn.setText(_fromUtf8(""))
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/APIS/icons/search.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.uiSpatialSearchBtn.setIcon(icon1)
self.uiSpatialSearchBtn.setIconSize(QtCore.QSize(24, 24))
self.uiSpatialSearchBtn.setObjectName(_fromUtf8("uiSpatialSearchBtn"))
self.horizontalLayout_8.addWidget(self.uiSpatialSearchBtn)
self.label_13 = QtGui.QLabel(self.tab_9)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_13.sizePolicy().hasHeightForWidth())
self.label_13.setSizePolicy(sizePolicy)
self.label_13.setObjectName(_fromUtf8("label_13"))
self.horizontalLayout_8.addWidget(self.label_13)
self.verticalLayout_8.addLayout(self.horizontalLayout_8)
self.line_9 = QtGui.QFrame(self.tab_9)
self.line_9.setFrameShape(QtGui.QFrame.HLine)
self.line_9.setFrameShadow(QtGui.QFrame.Sunken)
self.line_9.setObjectName(_fromUtf8("line_9"))
self.verticalLayout_8.addWidget(self.line_9)
self.label = QtGui.QLabel(self.tab_9)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout_8.addWidget(self.label)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.uiSearchByMapLayerCombo = QgsMapLayerComboBox(self.tab_9)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.uiSearchByMapLayerCombo.sizePolicy().hasHeightForWidth())
self.uiSearchByMapLayerCombo.setSizePolicy(sizePolicy)
self.uiSearchByMapLayerCombo.setObjectName(_fromUtf8("uiSearchByMapLayerCombo"))
self.horizontalLayout.addWidget(self.uiSearchByMapLayerCombo)
self.uiSearchByMapLayerBtn = QtGui.QPushButton(self.tab_9)
self.uiSearchByMapLayerBtn.setEnabled(True)
self.uiSearchByMapLayerBtn.setText(_fromUtf8(""))
self.uiSearchByMapLayerBtn.setIcon(icon1)
self.uiSearchByMapLayerBtn.setObjectName(_fromUtf8("uiSearchByMapLayerBtn"))
self.horizontalLayout.addWidget(self.uiSearchByMapLayerBtn)
self.verticalLayout_8.addLayout(self.horizontalLayout)
self.line_10 = QtGui.QFrame(self.tab_9)
self.line_10.setFrameShape(QtGui.QFrame.HLine)
self.line_10.setFrameShadow(QtGui.QFrame.Sunken)
self.line_10.setObjectName(_fromUtf8("line_10"))
self.verticalLayout_8.addWidget(self.line_10)
self.label_7 = QtGui.QLabel(self.tab_9)
self.label_7.setObjectName(_fromUtf8("label_7"))
self.verticalLayout_8.addWidget(self.label_7)
self.horizontalLayout_10 = QtGui.QHBoxLayout()
self.horizontalLayout_10.setObjectName(_fromUtf8("horizontalLayout_10"))
self.uiSearchByCadastralCommunityCombo = QtGui.QComboBox(self.tab_9)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.uiSearchByCadastralCommunityCombo.sizePolicy().hasHeightForWidth())
self.uiSearchByCadastralCommunityCombo.setSizePolicy(sizePolicy)
self.uiSearchByCadastralCommunityCombo.setEditable(True)
self.uiSearchByCadastralCommunityCombo.setObjectName(_fromUtf8("uiSearchByCadastralCommunityCombo"))
#.........這裏部分代碼省略.........
示例4: SettingsDialog
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
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)
示例5: Dialog
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Dialog(QtGui.QDialog):
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)
def layerChooze1(self, qgsMapLayer):
self.pointsLayersComboBox.setEditText(qgsMapLayer.name())
def layerChooze2(self, qgsMapLayer):
self.polygonsLayersComboBox.setEditText(qgsMapLayer.name())
def filedChooze(self, fieldName):
self.sender().setEditText(fieldName)
# def layernameSave(self, csTargetLayerName):
# if csTargetLayerName == u"":
# return
# setCSLayerName(csTargetLayerName)
def getSettings(self):
return [
self.pointsLayersComboBox.currentText(),
self.polygonsLayersComboBox.currentText(),
self.fieldName.currentText()
]
示例6: Dialog
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
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)
#.........這裏部分代碼省略.........
示例7: Ui_DsgRasterInfoTool
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_DsgRasterInfoTool(object):
def setupUi(self, DsgRasterInfoTool):
DsgRasterInfoTool.setObjectName(_fromUtf8("DsgRasterInfoTool"))
DsgRasterInfoTool.resize(309, 49)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(DsgRasterInfoTool.sizePolicy().hasHeightForWidth())
DsgRasterInfoTool.setSizePolicy(sizePolicy)
DsgRasterInfoTool.setMinimumSize(QtCore.QSize(0, 20))
DsgRasterInfoTool.setMaximumSize(QtCore.QSize(468, 50))
DsgRasterInfoTool.setToolTip(_fromUtf8(""))
self.gridLayout = QtGui.QGridLayout(DsgRasterInfoTool)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.rasterInfoPushButton = QtGui.QPushButton(DsgRasterInfoTool)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rasterInfoPushButton.sizePolicy().hasHeightForWidth())
self.rasterInfoPushButton.setSizePolicy(sizePolicy)
self.rasterInfoPushButton.setMinimumSize(QtCore.QSize(32, 20))
self.rasterInfoPushButton.setMaximumSize(QtCore.QSize(32, 32))
self.rasterInfoPushButton.setText(_fromUtf8(""))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/rasterToolTip.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.rasterInfoPushButton.setIcon(icon)
self.rasterInfoPushButton.setIconSize(QtCore.QSize(20, 28))
self.rasterInfoPushButton.setCheckable(True)
self.rasterInfoPushButton.setObjectName(_fromUtf8("rasterInfoPushButton"))
self.gridLayout.addWidget(self.rasterInfoPushButton, 0, 0, 1, 1)
self.splitter = QtGui.QSplitter(DsgRasterInfoTool)
self.splitter.setOrientation(QtCore.Qt.Horizontal)
self.splitter.setObjectName(_fromUtf8("splitter"))
self.rasterComboBox = QgsMapLayerComboBox(self.splitter)
self.rasterComboBox.setFilters(QgsMapLayerProxyModel.RasterLayer)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.rasterComboBox.sizePolicy().hasHeightForWidth())
self.rasterComboBox.setSizePolicy(sizePolicy)
self.rasterComboBox.setMinimumSize(QtCore.QSize(0, 20))
self.rasterComboBox.setMaximumSize(QtCore.QSize(16777215, 32))
self.rasterComboBox.setObjectName(_fromUtf8("rasterComboBox"))
self.bandTooltipButton = QtGui.QPushButton(self.splitter)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.bandTooltipButton.sizePolicy().hasHeightForWidth())
self.bandTooltipButton.setSizePolicy(sizePolicy)
self.bandTooltipButton.setMinimumSize(QtCore.QSize(32, 20))
self.bandTooltipButton.setMaximumSize(QtCore.QSize(32, 32))
self.bandTooltipButton.setText(_fromUtf8(""))
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/band_tooltip.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.bandTooltipButton.setIcon(icon1)
self.bandTooltipButton.setIconSize(QtCore.QSize(20, 20))
self.bandTooltipButton.setCheckable(True)
self.bandTooltipButton.setObjectName(_fromUtf8("bandTooltipButton"))
self.dynamicHistogramButton = QtGui.QPushButton(self.splitter)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.dynamicHistogramButton.sizePolicy().hasHeightForWidth())
self.dynamicHistogramButton.setSizePolicy(sizePolicy)
self.dynamicHistogramButton.setMinimumSize(QtCore.QSize(32, 20))
self.dynamicHistogramButton.setMaximumSize(QtCore.QSize(32, 32))
self.dynamicHistogramButton.setText(_fromUtf8(""))
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/histogram.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.dynamicHistogramButton.setIcon(icon2)
self.dynamicHistogramButton.setIconSize(QtCore.QSize(20, 20))
self.dynamicHistogramButton.setCheckable(True)
self.dynamicHistogramButton.setObjectName(_fromUtf8("dynamicHistogramButton"))
self.gridLayout.addWidget(self.splitter, 0, 1, 1, 1)
self.valueSetterButton = QtGui.QPushButton(self.splitter)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.valueSetterButton.sizePolicy().hasHeightForWidth())
self.valueSetterButton.setSizePolicy(sizePolicy)
self.valueSetterButton.setMinimumSize(QtCore.QSize(32, 20))
self.valueSetterButton.setMaximumSize(QtCore.QSize(32, 32))
self.valueSetterButton.setText(_fromUtf8(""))
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/valueSetter.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.valueSetterButton.setIcon(icon2)
self.valueSetterButton.setIconSize(QtCore.QSize(40, 40))
self.valueSetterButton.setCheckable(True)
self.valueSetterButton.setObjectName(_fromUtf8("valueSetterButton"))
self.gridLayout.addWidget(self.splitter, 0, 2, 1, 1)
self.retranslateUi(DsgRasterInfoTool)
QtCore.QMetaObject.connectSlotsByName(DsgRasterInfoTool)
def retranslateUi(self, DsgRasterInfoTool):
DsgRasterInfoTool.setWindowTitle(_translate("DsgRasterInfoTool", "Form", None))
self.rasterInfoPushButton.setToolTip(_translate("DsgRasterInfoTool", "Raster Info Tool", None))
示例8: Ui_Autocorrelation
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_Autocorrelation(object):
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)
def retranslateUi(self, Autocorrelation):
Autocorrelation.setWindowTitle(_translate("Autocorrelation", "Autocorrelation", None))
self.label.setText(_translate("Autocorrelation", "Layer", None))
self.label_4.setText(_translate("Autocorrelation", "Field", None))
self.le_output_filepath.setPlaceholderText(_translate("Autocorrelation", "Save to temporary file", None))
self.button_browse.setText(_translate("Autocorrelation", "Browse", None))
self.label_3.setText(_translate("Autocorrelation", "Contiguity", None))
self.cbx_contiguity.setItemText(0, _translate("Autocorrelation", "Queen", None))
self.cbx_contiguity.setItemText(1, _translate("Autocorrelation", "Rook", None))
self.label_8.setText(_translate("Autocorrelation", "Output", None))
示例9: Ui_ui_query
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
#.........這裏部分代碼省略.........
self.checkBox_multilinestrings.setObjectName(_fromUtf8("checkBox_multilinestrings"))
self.horizontalLayout_7.addWidget(self.checkBox_multilinestrings)
self.lineEdit_csv_multilinestrings = QtGui.QLineEdit(self.groupBox)
self.lineEdit_csv_multilinestrings.setPlaceholderText(_fromUtf8(""))
self.lineEdit_csv_multilinestrings.setObjectName(_fromUtf8("lineEdit_csv_multilinestrings"))
self.horizontalLayout_7.addWidget(self.lineEdit_csv_multilinestrings)
self.formLayout_4.setLayout(7, QtGui.QFormLayout.FieldRole, self.horizontalLayout_7)
self.label_12 = QtGui.QLabel(self.groupBox)
self.label_12.setText(_fromUtf8("Multipolygons"))
self.label_12.setObjectName(_fromUtf8("label_12"))
self.formLayout_4.setWidget(8, QtGui.QFormLayout.LabelRole, self.label_12)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.checkBox_multipolygons = QtGui.QCheckBox(self.groupBox)
self.checkBox_multipolygons.setText(_fromUtf8(""))
self.checkBox_multipolygons.setChecked(True)
self.checkBox_multipolygons.setObjectName(_fromUtf8("checkBox_multipolygons"))
self.horizontalLayout_8.addWidget(self.checkBox_multipolygons)
self.lineEdit_csv_multipolygons = QtGui.QLineEdit(self.groupBox)
self.lineEdit_csv_multipolygons.setPlaceholderText(_fromUtf8(""))
self.lineEdit_csv_multipolygons.setObjectName(_fromUtf8("lineEdit_csv_multipolygons"))
self.horizontalLayout_8.addWidget(self.lineEdit_csv_multipolygons)
self.formLayout_4.setLayout(8, QtGui.QFormLayout.FieldRole, self.horizontalLayout_8)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.radioButton_extentLayer = QtGui.QRadioButton(self.groupBox)
self.radioButton_extentLayer.setObjectName(_fromUtf8("radioButton_extentLayer"))
self.horizontalLayout_3.addWidget(self.radioButton_extentLayer)
self.comboBox_extentLayer = QgsMapLayerComboBox(self.groupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.comboBox_extentLayer.sizePolicy().hasHeightForWidth())
self.comboBox_extentLayer.setSizePolicy(sizePolicy)
self.comboBox_extentLayer.setObjectName(_fromUtf8("comboBox_extentLayer"))
self.horizontalLayout_3.addWidget(self.comboBox_extentLayer)
self.formLayout_4.setLayout(3, QtGui.QFormLayout.FieldRole, self.horizontalLayout_3)
self.verticalLayout_2.addLayout(self.formLayout_4)
self.formLayout_2 = QtGui.QFormLayout()
self.formLayout_2.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
self.label_4 = QtGui.QLabel(self.groupBox)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_4)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.lineEdit_browseDir = QtGui.QLineEdit(self.groupBox)
self.lineEdit_browseDir.setObjectName(_fromUtf8("lineEdit_browseDir"))
self.horizontalLayout.addWidget(self.lineEdit_browseDir)
self.pushButton_browse_output_file = QtGui.QPushButton(self.groupBox)
self.pushButton_browse_output_file.setObjectName(_fromUtf8("pushButton_browse_output_file"))
self.horizontalLayout.addWidget(self.pushButton_browse_output_file)
self.formLayout_2.setLayout(0, QtGui.QFormLayout.FieldRole, self.horizontalLayout)
self.label_6 = QtGui.QLabel(self.groupBox)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_6)
self.lineEdit_filePrefix = QtGui.QLineEdit(self.groupBox)
self.lineEdit_filePrefix.setObjectName(_fromUtf8("lineEdit_filePrefix"))
self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.lineEdit_filePrefix)
self.verticalLayout_2.addLayout(self.formLayout_2)
self.verticalLayout.addWidget(self.groupBox)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.pushButton_generateQuery = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.pushButton_generateQuery.setObjectName(_fromUtf8("pushButton_generateQuery"))
示例10: Ui_Composite_Index
# 需要導入模塊: from qgis.gui import QgsMapLayerComboBox [as 別名]
# 或者: from qgis.gui.QgsMapLayerComboBox import setSizePolicy [as 別名]
class Ui_Composite_Index(object):
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()
#.........這裏部分代碼省略.........