def __init__(self, dialog, parent=None): PropertyPage.__init__(self, PAGE_DEM, dialog, parent) Ui_DEMPropertiesWidget.setupUi(self, self) # set read only to line edits of spin boxes self.spinBox_Size.findChild(QLineEdit).setReadOnly(True) self.spinBox_Roughening.findChild(QLineEdit).setReadOnly(True) self.isPrimary = False self.layer = None self.demWidth = self.demHeight = 0 self.layerImageIds = [] dispTypeButtons = [self.radioButton_MapCanvas, self.radioButton_LayerImage, self.radioButton_ImageFile, self.radioButton_SolidColor] widgets = [self.comboBox_DEMLayer, self.spinBox_demtransp] widgets += [self.radioButton_Simple, self.horizontalSlider_Resolution] widgets += [self.checkBox_Surroundings, self.spinBox_Size, self.spinBox_Roughening] widgets += [self.radioButton_Advanced, self.spinBox_Height, self.lineEdit_centerX, self.lineEdit_centerY, self.lineEdit_rectWidth, self.lineEdit_rectHeight] widgets += dispTypeButtons widgets += [self.checkBox_TransparentBackground, self.lineEdit_ImageFile, self.lineEdit_Color, self.comboBox_TextureSize, self.checkBox_Shading] widgets += [self.checkBox_Clip, self.comboBox_ClipLayer] widgets += [self.checkBox_Sides, self.checkBox_Frame] self.registerPropertyWidgets(widgets) self.initLayerComboBox() self.initTextureSizeComboBox() self.comboBox_DEMLayer.currentIndexChanged.connect(self.demLayerChanged) self.horizontalSlider_Resolution.valueChanged.connect(self.resolutionSliderChanged) self.radioButton_Simple.toggled.connect(self.samplingModeChanged) self.checkBox_Surroundings.toggled.connect(self.surroundingsToggled) self.spinBox_Roughening.valueChanged.connect(self.rougheningChanged) self.spinBox_Height.valueChanged.connect(self.updateQuads) for radioButton in dispTypeButtons: radioButton.toggled.connect(self.dispTypeChanged) self.toolButton_SelectLayer.clicked.connect(self.selectLayerClicked) self.toolButton_ImageFile.clicked.connect(self.browseClicked) self.toolButton_Color.clicked.connect(self.colorButtonClicked) self.toolButton_PointTool.clicked.connect(dialog.startPointSelection)
def __init__(self, dialog, parent=None): PropertyPage.__init__(self, PAGE_DEM, dialog, parent) Ui_DEMPropertiesWidget.setupUi(self, self) # set read only to line edits of spin boxes self.spinBox_Size.findChild(QLineEdit).setReadOnly(True) self.spinBox_Roughening.findChild(QLineEdit).setReadOnly(True) self.isPrimary = False self.layer = None self.demWidth = self.demHeight = 0 dispTypeButtons = [self.radioButton_MapCanvas, self.radioButton_ImageFile, self.radioButton_SolidColor, self.radioButton_Wireframe] widgets = [self.comboBox_DEMLayer, self.spinBox_demtransp, self.spinBox_sidetransp] widgets += [self.radioButton_Simple, self.horizontalSlider_Resolution] widgets += [self.checkBox_Surroundings, self.spinBox_Size, self.spinBox_Roughening] widgets += [self.radioButton_Advanced, self.spinBox_Height, self.lineEdit_xmin, self.lineEdit_ymin, self.lineEdit_xmax, self.lineEdit_ymax] widgets += dispTypeButtons widgets += [self.lineEdit_ImageFile, self.lineEdit_Color] widgets += [self.checkBox_Sides, self.checkBox_Frame] self.setPropertyWidgets(widgets) self.initDEMLayerList() self.comboBox_DEMLayer.currentIndexChanged.connect(self.demLayerChanged) self.horizontalSlider_Resolution.valueChanged.connect(self.calculateResolution) self.radioButton_Simple.toggled.connect(self.samplingModeChanged) self.checkBox_Surroundings.toggled.connect(self.surroundingsToggled) self.spinBox_Roughening.valueChanged.connect(self.rougheningChanged) self.spinBox_Height.valueChanged.connect(self.updateQuads) for radioButton in dispTypeButtons: radioButton.toggled.connect(self.dispTypeChanged) self.toolButton_ImageFile.clicked.connect(self.browseClicked) self.toolButton_Color.clicked.connect(self.colorButtonClicked) self.checkBox_Sides.toggled.connect(self.sidesToggled) self.toolButton_PointTool.clicked.connect(dialog.startPointSelection)