class QgsTextAnnotationDialog(QDialog):
    def __init__(self, item):
        QDialog.__init__(self)
        self.gridLayout = QGridLayout(self)
        self.gridLayout.setObjectName(("gridLayout"))
        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setObjectName(("horizontalLayout"))
        self.mFontComboBox = QFontComboBox(self)
        self.mFontComboBox.setObjectName(("mFontComboBox"))
        self.horizontalLayout.addWidget(self.mFontComboBox)
        spacerItem = QSpacerItem(38, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.mFontSizeSpinBox = QSpinBox(self)
        self.mFontSizeSpinBox.setObjectName(("mFontSizeSpinBox"))
        self.horizontalLayout.addWidget(self.mFontSizeSpinBox)
        self.mBoldPushButton = QPushButton(self)
        self.mBoldPushButton.setMinimumSize(QSize(50, 0))
        self.mBoldPushButton.setCheckable(True)
        self.mBoldPushButton.setObjectName(("mBoldPushButton"))
        self.horizontalLayout.addWidget(self.mBoldPushButton)
        self.mItalicsPushButton = QPushButton(self)
        self.mItalicsPushButton.setMinimumSize(QSize(50, 0))
        self.mItalicsPushButton.setCheckable(True)
        self.mItalicsPushButton.setObjectName(("mItalicsPushButton"))
        self.horizontalLayout.addWidget(self.mItalicsPushButton)
        self.mFontColorButton = QgsColorButton(self)
        self.mFontColorButton.setText((""))
        self.mFontColorButton.setAutoDefault(False)
        self.mFontColorButton.setObjectName(("mFontColorButton"))
        self.horizontalLayout.addWidget(self.mFontColorButton)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.mButtonBox = QDialogButtonBox(self)
        self.mButtonBox.setOrientation(Qt.Horizontal)
        self.mButtonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Ok)
        self.mButtonBox.setObjectName(("mButtonBox"))
        self.gridLayout.addWidget(self.mButtonBox, 3, 0, 1, 1)
        self.mTextEdit = QTextEdit(self)
        self.mTextEdit.setObjectName(("mTextEdit"))
        self.gridLayout.addWidget(self.mTextEdit, 1, 0, 1, 1)
        self.mStackedWidget = QStackedWidget(self)
        self.mStackedWidget.setObjectName(("mStackedWidget"))
        self.page = QWidget()
        self.page.setObjectName(("page"))
        self.mStackedWidget.addWidget(self.page)
        self.page_2 = QWidget()
        self.page_2.setObjectName(("page_2"))
        self.mStackedWidget.addWidget(self.page_2)
        self.gridLayout.addWidget(self.mStackedWidget, 2, 0, 1, 1)
        self.setLayout(self.gridLayout)
        
        self.mStackedWidget.setCurrentIndex(0)
        QObject.connect(self.mButtonBox, SIGNAL(("accepted()")), self.accept)
        QObject.connect(self.mButtonBox, SIGNAL(("rejected()")), self.reject)
        
        self.setTabOrder(self.mFontComboBox, self.mFontSizeSpinBox)
        self.setTabOrder(self.mFontSizeSpinBox, self.mBoldPushButton)
        self.setTabOrder(self.mBoldPushButton, self.mItalicsPushButton)
        self.setTabOrder(self.mItalicsPushButton, self.mFontColorButton)
        self.setTabOrder(self.mFontColorButton, self.mTextEdit)
        self.setTabOrder(self.mTextEdit, self.mButtonBox)
        
        self.setWindowTitle("Annotation text")
        self.mBoldPushButton.setText("B")
        self.mItalicsPushButton.setText("I")
        
        self.mTextDocument = None
        self.mItem = item
        self.mEmbeddedWidget = QgsAnnotationWidget(self, self.mItem )
        self.mEmbeddedWidget.show()
        self.mStackedWidget.addWidget( self.mEmbeddedWidget )
        self.mStackedWidget.setCurrentWidget( self.mEmbeddedWidget )
        if ( self.mItem != None ):
            self.mTextDocument = self.mItem.document()
            self.mTextEdit.setDocument( self.mTextDocument )
        self.mFontColorButton.setColorDialogTitle(  "Select font color"  )
        self.mFontColorButton.setColorDialogOptions( QColorDialog.ShowAlphaChannel )
        self.setCurrentFontPropertiesToGui()
        QObject.connect( self.mButtonBox, SIGNAL("accepted()"), self.applyTextToItem)
#         QObject.connect( self.mFontComboBox, SIGNAL( "currentFontChanged(QFont())"), self.changeCurrentFormat)
        self.mFontComboBox.currentFontChanged.connect(self.changeCurrentFormat)
        QObject.connect( self.mFontSizeSpinBox, SIGNAL( "valueChanged( int )" ), self.changeCurrentFormat ) 
        QObject.connect( self.mBoldPushButton, SIGNAL( "toggled( bool )" ), self.changeCurrentFormat)
        QObject.connect( self.mItalicsPushButton, SIGNAL( "toggled( bool )" ), self.changeCurrentFormat)
        QObject.connect( self.mTextEdit, SIGNAL( "cursorPositionChanged()" ), self.setCurrentFontPropertiesToGui )
        
#         QObject.connect( self.mButtonBox, SIGNAL( "accepted()" ), self.applySettingsToItem)
        deleteButton = QPushButton( "Delete" )
        QObject.connect( deleteButton, SIGNAL( "clicked()" ), self.deleteItem )
        self.mButtonBox.addButton( deleteButton, QDialogButtonBox.RejectRole )
    def applyTextToItem(self):
        if ( self.mItem  != None and self.mTextDocument !=None ):
            if ( self.mEmbeddedWidget != None):
                self.mEmbeddedWidget.apply()
            self.mItem.setDocument( self.mTextDocument )
            self.mItem.update()
    def changeCurrentFormat(self):
        newFont = QFont()
        newFont.setFamily( self.mFontComboBox.currentFont().family() )
        #bold
        if ( self.mBoldPushButton.isChecked() ):
            newFont.setBold( True )
        else:
            newFont.setBold( False )
        #italic
        if ( self.mItalicsPushButton.isChecked() ):
            newFont.setItalic( True )
        else:
            newFont.setItalic( False )
        #size
        newFont.setPointSize( self.mFontSizeSpinBox.value() )
        self.mTextEdit.setCurrentFont( newFont )
        #color
        self.mTextEdit.setTextColor( self.mFontColorButton.color() )
        
    def on_mFontColorButton_colorChanged(self, color ):
        self.changeCurrentFormat()
    def setCurrentFontPropertiesToGui(self):
        self.blockAllSignals( True )
        currentFont = self.mTextEdit.currentFont()
        self.mFontComboBox.setCurrentFont( currentFont )
        self.mFontSizeSpinBox.setValue( currentFont.pointSize() )
        self.mBoldPushButton.setChecked( currentFont.bold() )
        self.mItalicsPushButton.setChecked( currentFont.italic() )
        self.mFontColorButton.setColor( self.mTextEdit.textColor() )
        self.blockAllSignals( False )
        
    def blockAllSignals(self, block ):
        self.mFontComboBox.blockSignals( block )
        self.mFontSizeSpinBox.blockSignals( block )
        self.mBoldPushButton.blockSignals( block )
        self.mItalicsPushButton.blockSignals( block )
        self.mFontColorButton.blockSignals( block )
    
    def deleteItem(self):
        scene = self.mItem.scene()
        if ( scene != None ):
            scene.removeItem( self.mItem )
        self.mItem = None
Exemplo n.º 2
0
class Ui_frmRptTitleBase(object):
    def setupUi(self, frmRptTitleBase):
        frmRptTitleBase.setObjectName(_fromUtf8("frmRptTitleBase"))
        frmRptTitleBase.resize(347, 495)
        self.gridLayout = QtGui.QGridLayout(frmRptTitleBase)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.scrollArea = QtGui.QScrollArea(frmRptTitleBase)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
        self.scrollAreaWidgetContents = QtGui.QWidget(self.scrollArea)
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 327, 475))
        self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
        self.verticalLayout = QtGui.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label_10 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_10.setObjectName(_fromUtf8("label_10"))
        self.verticalLayout.addWidget(self.label_10)
        self.cboBorder = QtGui.QComboBox(self.scrollAreaWidgetContents)
        self.cboBorder.setObjectName(_fromUtf8("cboBorder"))
        self.cboBorder.addItem(_fromUtf8(""))
        self.cboBorder.addItem(_fromUtf8(""))
        self.cboBorder.addItem(_fromUtf8(""))
        self.cboBorder.addItem(_fromUtf8(""))
        self.cboBorder.addItem(_fromUtf8(""))
        self.cboBorder.addItem(_fromUtf8(""))
        self.verticalLayout.addWidget(self.cboBorder)
        self.label = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.btnTitleColor = QgsColorButton(self.scrollAreaWidgetContents)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.btnTitleColor.sizePolicy().hasHeightForWidth())
        self.btnTitleColor.setSizePolicy(sizePolicy)
        self.btnTitleColor.setMinimumSize(QtCore.QSize(32, 0))
        self.btnTitleColor.setMaximumSize(QtCore.QSize(1000, 16777215))
        self.btnTitleColor.setText(_fromUtf8(""))
        self.btnTitleColor.setObjectName(_fromUtf8("btnTitleColor"))
        self.verticalLayout.addWidget(self.btnTitleColor)
        self.label_2 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout.addWidget(self.label_2)
        self.btnTitleFont = QtGui.QPushButton(self.scrollAreaWidgetContents)
        self.btnTitleFont.setObjectName(_fromUtf8("btnTitleFont"))
        self.verticalLayout.addWidget(self.btnTitleFont)
        self.label_3 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.verticalLayout.addWidget(self.label_3)
        self.txtTitleHeight = QtGui.QLineEdit(self.scrollAreaWidgetContents)
        self.txtTitleHeight.setObjectName(_fromUtf8("txtTitleHeight"))
        self.verticalLayout.addWidget(self.txtTitleHeight)
        self.label_4 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.verticalLayout.addWidget(self.label_4)
        self.cboTitleHAlign = QtGui.QComboBox(self.scrollAreaWidgetContents)
        self.cboTitleHAlign.setObjectName(_fromUtf8("cboTitleHAlign"))
        self.cboTitleHAlign.addItem(_fromUtf8(""))
        self.cboTitleHAlign.addItem(_fromUtf8(""))
        self.cboTitleHAlign.addItem(_fromUtf8(""))
        self.verticalLayout.addWidget(self.cboTitleHAlign)
        self.label_5 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.verticalLayout.addWidget(self.label_5)
        self.txtTitleLeft = QtGui.QLineEdit(self.scrollAreaWidgetContents)
        self.txtTitleLeft.setObjectName(_fromUtf8("txtTitleLeft"))
        self.verticalLayout.addWidget(self.txtTitleLeft)
        self.label_6 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.verticalLayout.addWidget(self.label_6)
        self.txtTitleText = QtGui.QLineEdit(self.scrollAreaWidgetContents)
        self.txtTitleText.setObjectName(_fromUtf8("txtTitleText"))
        self.verticalLayout.addWidget(self.txtTitleText)
        self.label_7 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.verticalLayout.addWidget(self.label_7)
        self.txtTitleTop = QtGui.QLineEdit(self.scrollAreaWidgetContents)
        self.txtTitleTop.setObjectName(_fromUtf8("txtTitleTop"))
        self.verticalLayout.addWidget(self.txtTitleTop)
        self.label_8 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.verticalLayout.addWidget(self.label_8)
        self.cboTitleVAlign = QtGui.QComboBox(self.scrollAreaWidgetContents)
        self.cboTitleVAlign.setObjectName(_fromUtf8("cboTitleVAlign"))
        self.cboTitleVAlign.addItem(_fromUtf8(""))
        self.cboTitleVAlign.addItem(_fromUtf8(""))
        self.cboTitleVAlign.addItem(_fromUtf8(""))
        self.verticalLayout.addWidget(self.cboTitleVAlign)
        self.label_9 = QtGui.QLabel(self.scrollAreaWidgetContents)
        self.label_9.setObjectName(_fromUtf8("label_9"))
        self.verticalLayout.addWidget(self.label_9)
        self.txtTitleWidth = QtGui.QLineEdit(self.scrollAreaWidgetContents)
        self.txtTitleWidth.setObjectName(_fromUtf8("txtTitleWidth"))
        self.verticalLayout.addWidget(self.txtTitleWidth)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gridLayout.addWidget(self.scrollArea, 0, 0, 1, 1)

        self.retranslateUi(frmRptTitleBase)
        QtCore.QMetaObject.connectSlotsByName(frmRptTitleBase)

    def retranslateUi(self, frmRptTitleBase):
        frmRptTitleBase.setWindowTitle(QtGui.QApplication.translate("frmRptTitleBase", "Form", None, QtGui.QApplication.UnicodeUTF8))
        self.label_10.setText(QtGui.QApplication.translate("frmRptTitleBase", "Border", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(0, QtGui.QApplication.translate("frmRptTitleBase", "None", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(1, QtGui.QApplication.translate("frmRptTitleBase", "All", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(2, QtGui.QApplication.translate("frmRptTitleBase", "Top", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(3, QtGui.QApplication.translate("frmRptTitleBase", "Right", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(4, QtGui.QApplication.translate("frmRptTitleBase", "Bottom", None, QtGui.QApplication.UnicodeUTF8))
        self.cboBorder.setItemText(5, QtGui.QApplication.translate("frmRptTitleBase", "Left", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("frmRptTitleBase", "Fore Color", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("frmRptTitleBase", "Font", None, QtGui.QApplication.UnicodeUTF8))
        self.btnTitleFont.setText(QtGui.QApplication.translate("frmRptTitleBase", "Select Font...", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("frmRptTitleBase", "Height (cm)", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("frmRptTitleBase", "Horizontal Alignment", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleHAlign.setItemText(0, QtGui.QApplication.translate("frmRptTitleBase", "Left", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleHAlign.setItemText(1, QtGui.QApplication.translate("frmRptTitleBase", "Right", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleHAlign.setItemText(2, QtGui.QApplication.translate("frmRptTitleBase", "Center", None, QtGui.QApplication.UnicodeUTF8))
        self.label_5.setText(QtGui.QApplication.translate("frmRptTitleBase", "Left (cm)", None, QtGui.QApplication.UnicodeUTF8))
        self.label_6.setText(QtGui.QApplication.translate("frmRptTitleBase", "Text", None, QtGui.QApplication.UnicodeUTF8))
        self.label_7.setText(QtGui.QApplication.translate("frmRptTitleBase", "Top (cm)", None, QtGui.QApplication.UnicodeUTF8))
        self.label_8.setText(QtGui.QApplication.translate("frmRptTitleBase", "Vertical Alignment", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleVAlign.setItemText(0, QtGui.QApplication.translate("frmRptTitleBase", "Top", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleVAlign.setItemText(1, QtGui.QApplication.translate("frmRptTitleBase", "Middle", None, QtGui.QApplication.UnicodeUTF8))
        self.cboTitleVAlign.setItemText(2, QtGui.QApplication.translate("frmRptTitleBase", "Bottom", None, QtGui.QApplication.UnicodeUTF8))
        self.label_9.setText(QtGui.QApplication.translate("frmRptTitleBase", "Width (cm)", None, QtGui.QApplication.UnicodeUTF8))
class QgsAnnotationWidget(QWidget):
    def __init__(self, parent, item):
        QWidget.__init__(self, parent)
        self.gridLayout_2 = QGridLayout(self)
        self.gridLayout_2.setObjectName(("gridLayout_2"))
        self.mMapPositionFixedCheckBox = QCheckBox(self)
        self.mMapPositionFixedCheckBox.setObjectName(
            ("mMapPositionFixedCheckBox"))
        self.gridLayout_2.addWidget(self.mMapPositionFixedCheckBox, 0, 0, 1, 1)
        self.gridLayout = QGridLayout()
        self.gridLayout.setObjectName(("gridLayout"))
        self.mFrameColorButton = QgsColorButton(self)
        self.mFrameColorButton.setText((""))
        self.mFrameColorButton.setObjectName(("mFrameColorButton"))
        self.gridLayout.addWidget(self.mFrameColorButton, 3, 1, 1, 1)
        self.mFrameColorButton.colorChanged.connect(
            self.on_mFrameColorButton_colorChanged)
        self.mBackgroundColorLabel = QLabel(self)
        self.mBackgroundColorLabel.setObjectName(("mBackgroundColorLabel"))
        self.gridLayout.addWidget(self.mBackgroundColorLabel, 2, 0, 1, 1)
        self.mMapMarkerLabel = QLabel(self)
        self.mMapMarkerLabel.setObjectName(("mMapMarkerLabel"))
        self.gridLayout.addWidget(self.mMapMarkerLabel, 0, 0, 1, 1)
        self.mBackgroundColorButton = QgsColorButton(self)
        self.mBackgroundColorButton.setText((""))
        self.mBackgroundColorButton.setObjectName(("mBackgroundColorButton"))
        self.gridLayout.addWidget(self.mBackgroundColorButton, 2, 1, 1, 1)
        self.mBackgroundColorButton.colorChanged.connect(
            self.on_mBackgroundColorButton_colorChanged)
        self.mMapMarkerButton = QPushButton(self)
        self.mMapMarkerButton.setText((""))
        self.mMapMarkerButton.setObjectName(("mMapMarkerButton"))
        self.gridLayout.addWidget(self.mMapMarkerButton, 0, 1, 1, 1)
        self.mMapMarkerButton.clicked.connect(self.on_mMapMarkerButton_clicked)
        self.mFrameWidthLabel = QLabel(self)
        self.mFrameWidthLabel.setObjectName(("mFrameWidthLabel"))
        self.gridLayout.addWidget(self.mFrameWidthLabel, 1, 0, 1, 1)
        self.mFrameWidthSpinBox = QDoubleSpinBox(self)
        self.mFrameWidthSpinBox.setObjectName(("mFrameWidthSpinBox"))
        self.gridLayout.addWidget(self.mFrameWidthSpinBox, 1, 1, 1, 1)
        self.mFrameColorLabel = QLabel(self)
        self.mFrameColorLabel.setObjectName(("mFrameColorLabel"))
        self.gridLayout.addWidget(self.mFrameColorLabel, 3, 0, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)
        self.mMapMarkerLabel.setBuddy(self.mMapMarkerButton)
        self.mFrameWidthLabel.setBuddy(self.mFrameWidthSpinBox)

        self.setWindowTitle("QgsAnnotationWidgetBase")
        self.mMapPositionFixedCheckBox.setText("Fixed map position")
        self.mBackgroundColorLabel.setText("Background color")
        self.mMapMarkerLabel.setText("Map marker")
        self.mFrameWidthLabel.setText("Frame width")
        self.mFrameColorLabel.setText("Frame color")
        self.setLayout(self.gridLayout_2)
        self.mItem = item
        if (self.mItem != None):
            self.blockAllSignals(True)

            if (self.mItem.mapPositionFixed()):
                self.mMapPositionFixedCheckBox.setCheckState(Qt.Checked)
            else:
                self.mMapPositionFixedCheckBox.setCheckState(Qt.Unchecked)

            self.mFrameWidthSpinBox.setValue(self.mItem.frameBorderWidth())
            self.mFrameColorButton.setColor(self.mItem.frameColor())
            self.mFrameColorButton.setColorDialogTitle("Select frame color")
            self.mFrameColorButton.setColorDialogOptions(
                QColorDialog.ShowAlphaChannel)
            self.mBackgroundColorButton.setColor(
                self.mItem.frameBackgroundColor())
            self.mBackgroundColorButton.setColorDialogTitle(
                "Select background color")
            self.mBackgroundColorButton.setColorDialogOptions(
                QColorDialog.ShowAlphaChannel)
            self.symbol = self.mItem.markerSymbol()
            if (self.symbol != None):
                self.mMarkerSymbol = self.symbol.clone()
                self.updateCenterIcon()
            self.blockAllSignals(False)

    def apply(self):
        if (self.mItem != None):
            self.mItem.setMapPositionFixed(
                self.mMapPositionFixedCheckBox.checkState() == Qt.Checked)
            self.mItem.setFrameBorderWidth(self.mFrameWidthSpinBox.value())
            self.mItem.setFrameColor(self.mFrameColorButton.color())
            self.mItem.setFrameBackgroundColor(
                self.mBackgroundColorButton.color())
            self.mItem.setMarkerSymbol(self.mMarkerSymbol)
            self.mMarkerSymbol = None  #//item takes ownership
            self.mItem.update()

    def blockAllSignals(self, block):
        self.mMapPositionFixedCheckBox.blockSignals(block)
        self.mMapMarkerButton.blockSignals(block)
        self.mFrameWidthSpinBox.blockSignals(block)
        self.mFrameColorButton.blockSignals(block)

    def on_mMapMarkerButton_clicked(self):
        if (self.mMarkerSymbol == None):
            return
        markerSymbol = self.mMarkerSymbol.clone()
        dlg = QgsSymbolV2SelectorDialog(markerSymbol,
                                        QgsStyleV2.defaultStyle(), None, self)
        if (dlg.exec_() != QDialog.Rejected):
            self.mMarkerSymbol = markerSymbol
            self.updateCenterIcon()

    def on_mFrameColorButton_colorChanged(self, color):
        if (self.mItem == None):
            return
        self.mItem.setFrameColor(color)

    def updateCenterIcon(self):
        if (self.mMarkerSymbol == None):
            return
        icon = QgsSymbolLayerV2Utils.symbolPreviewIcon(
            self.mMarkerSymbol, self.mMapMarkerButton.iconSize())
        self.mMapMarkerButton.setIcon(icon)

    def on_mBackgroundColorButton_colorChanged(self, color):
        if (self.mItem == None):
            return
        self.mItem.setFrameBackgroundColor(color)
class Ui_VectorScaleBoxOptionsDialog(object):
    def setupUi(self, VectorScaleBoxOptionsDialog):
        VectorScaleBoxOptionsDialog.setObjectName(_fromUtf8("VectorScaleBoxOptionsDialog"))
        VectorScaleBoxOptionsDialog.resize(399, 274)
        self.uMainLayout = QtGui.QVBoxLayout(VectorScaleBoxOptionsDialog)
        self.uMainLayout.setObjectName(_fromUtf8("uMainLayout"))
        self.uLocationGroup = QtGui.QGroupBox(VectorScaleBoxOptionsDialog)
        self.uLocationGroup.setObjectName(_fromUtf8("uLocationGroup"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.uLocationGroup)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.uLocationLayout = QtGui.QVBoxLayout()
        self.uLocationLayout.setObjectName(_fromUtf8("uLocationLayout"))
        self.uPositionLayout_2 = QtGui.QHBoxLayout()
        self.uPositionLayout_2.setObjectName(_fromUtf8("uPositionLayout_2"))
        self.uPositionLabel = QtGui.QLabel(self.uLocationGroup)
        self.uPositionLabel.setObjectName(_fromUtf8("uPositionLabel"))
        self.uPositionLayout_2.addWidget(self.uPositionLabel)
        self.uRadioTL = QtGui.QRadioButton(self.uLocationGroup)
        self.uRadioTL.setObjectName(_fromUtf8("uRadioTL"))
        self.uPositionLayout_2.addWidget(self.uRadioTL)
        self.uRadioTR = QtGui.QRadioButton(self.uLocationGroup)
        self.uRadioTR.setObjectName(_fromUtf8("uRadioTR"))
        self.uPositionLayout_2.addWidget(self.uRadioTR)
        self.uRadioBL = QtGui.QRadioButton(self.uLocationGroup)
        self.uRadioBL.setObjectName(_fromUtf8("uRadioBL"))
        self.uPositionLayout_2.addWidget(self.uRadioBL)
        self.uRadioBR = QtGui.QRadioButton(self.uLocationGroup)
        self.uRadioBR.setChecked(True)
        self.uRadioBR.setObjectName(_fromUtf8("uRadioBR"))
        self.uPositionLayout_2.addWidget(self.uRadioBR)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.uPositionLayout_2.addItem(spacerItem)
        self.uLocationLayout.addLayout(self.uPositionLayout_2)
        self.verticalLayout_2.addLayout(self.uLocationLayout)
        self.uPositionLayout = QtGui.QHBoxLayout()
        self.uPositionLayout.setObjectName(_fromUtf8("uPositionLayout"))
        self.uOffsetXLabel = QtGui.QLabel(self.uLocationGroup)
        self.uOffsetXLabel.setObjectName(_fromUtf8("uOffsetXLabel"))
        self.uPositionLayout.addWidget(self.uOffsetXLabel)
        self.uOffsetX = QtGui.QSpinBox(self.uLocationGroup)
        self.uOffsetX.setMaximum(300)
        self.uOffsetX.setObjectName(_fromUtf8("uOffsetX"))
        self.uPositionLayout.addWidget(self.uOffsetX)
        self.uOffsetYLabel = QtGui.QLabel(self.uLocationGroup)
        self.uOffsetYLabel.setObjectName(_fromUtf8("uOffsetYLabel"))
        self.uPositionLayout.addWidget(self.uOffsetYLabel)
        self.uOffsetY = QtGui.QSpinBox(self.uLocationGroup)
        self.uOffsetY.setMaximum(300)
        self.uOffsetY.setObjectName(_fromUtf8("uOffsetY"))
        self.uPositionLayout.addWidget(self.uOffsetY)
        self.uArrowSizeLabel = QtGui.QLabel(self.uLocationGroup)
        self.uArrowSizeLabel.setObjectName(_fromUtf8("uArrowSizeLabel"))
        self.uPositionLayout.addWidget(self.uArrowSizeLabel)
        self.uArrowSizePercent = QtGui.QSpinBox(self.uLocationGroup)
        self.uArrowSizePercent.setMaximum(30)
        self.uArrowSizePercent.setObjectName(_fromUtf8("uArrowSizePercent"))
        self.uPositionLayout.addWidget(self.uArrowSizePercent)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.uPositionLayout.addItem(spacerItem1)
        self.verticalLayout_2.addLayout(self.uPositionLayout)
        self.uMainLayout.addWidget(self.uLocationGroup)
        self.uBoxGroup = QtGui.QGroupBox(VectorScaleBoxOptionsDialog)
        self.uBoxGroup.setObjectName(_fromUtf8("uBoxGroup"))
        self.horizontalLayout_6 = QtGui.QHBoxLayout(self.uBoxGroup)
        self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6"))
        self.uShowBoxLabel = QtGui.QLabel(self.uBoxGroup)
        self.uShowBoxLabel.setObjectName(_fromUtf8("uShowBoxLabel"))
        self.horizontalLayout_6.addWidget(self.uShowBoxLabel)
        self.uShowBox = QtGui.QCheckBox(self.uBoxGroup)
        self.uShowBox.setText(_fromUtf8(""))
        self.uShowBox.setObjectName(_fromUtf8("uShowBox"))
        self.horizontalLayout_6.addWidget(self.uShowBox)
        self.uFillBoxLabel = QtGui.QLabel(self.uBoxGroup)
        self.uFillBoxLabel.setObjectName(_fromUtf8("uFillBoxLabel"))
        self.horizontalLayout_6.addWidget(self.uFillBoxLabel)
        self.uFillBox = QtGui.QCheckBox(self.uBoxGroup)
        self.uFillBox.setText(_fromUtf8(""))
        self.uFillBox.setObjectName(_fromUtf8("uFillBox"))
        self.horizontalLayout_6.addWidget(self.uFillBox)
        spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_6.addItem(spacerItem2)
        self.uPenColor = QgsColorButton(self.uBoxGroup)
        self.uPenColor.setObjectName(_fromUtf8("uPenColor"))
        self.horizontalLayout_6.addWidget(self.uPenColor)
        self.uBrushColor = QgsColorButton(self.uBoxGroup)
        self.uBrushColor.setObjectName(_fromUtf8("uBrushColor"))
        self.horizontalLayout_6.addWidget(self.uBrushColor)
        self.uMainLayout.addWidget(self.uBoxGroup)
        self.uTextGroup = QtGui.QGroupBox(VectorScaleBoxOptionsDialog)
        self.uTextGroup.setObjectName(_fromUtf8("uTextGroup"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.uTextGroup)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.uTitleLabel = QtGui.QLabel(self.uTextGroup)
        self.uTitleLabel.setObjectName(_fromUtf8("uTitleLabel"))
        self.horizontalLayout_3.addWidget(self.uTitleLabel)
        self.uTitle = QtGui.QLineEdit(self.uTextGroup)
        self.uTitle.setObjectName(_fromUtf8("uTitle"))
        self.horizontalLayout_3.addWidget(self.uTitle)
        self.uTitleFont = QtGui.QPushButton(self.uTextGroup)
        self.uTitleFont.setObjectName(_fromUtf8("uTitleFont"))
        self.horizontalLayout_3.addWidget(self.uTitleFont)
        self.uScaleFont = QtGui.QPushButton(self.uTextGroup)
        self.uScaleFont.setObjectName(_fromUtf8("uScaleFont"))
        self.horizontalLayout_3.addWidget(self.uScaleFont)
        self.uMainLayout.addWidget(self.uTextGroup)
        self.uButtonBox = QtGui.QDialogButtonBox(VectorScaleBoxOptionsDialog)
        self.uButtonBox.setOrientation(QtCore.Qt.Horizontal)
        self.uButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Help|QtGui.QDialogButtonBox.Ok)
        self.uButtonBox.setObjectName(_fromUtf8("uButtonBox"))
        self.uMainLayout.addWidget(self.uButtonBox)
        self.uPositionLabel.setBuddy(self.uRadioTL)
        self.uOffsetXLabel.setBuddy(self.uOffsetX)
        self.uOffsetYLabel.setBuddy(self.uOffsetY)
        self.uArrowSizeLabel.setBuddy(self.uArrowSizePercent)
        self.uShowBoxLabel.setBuddy(self.uShowBox)
        self.uFillBoxLabel.setBuddy(self.uFillBox)
        self.uTitleLabel.setBuddy(self.uTitle)

        self.retranslateUi(VectorScaleBoxOptionsDialog)
        QtCore.QObject.connect(self.uButtonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), VectorScaleBoxOptionsDialog.accept)
        QtCore.QObject.connect(self.uButtonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), VectorScaleBoxOptionsDialog.reject)
        QtCore.QMetaObject.connectSlotsByName(VectorScaleBoxOptionsDialog)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uRadioTL, self.uRadioTR)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uRadioTR, self.uRadioBL)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uRadioBL, self.uRadioBR)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uRadioBR, self.uOffsetX)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uOffsetX, self.uOffsetY)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uOffsetY, self.uArrowSizePercent)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uArrowSizePercent, self.uShowBox)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uShowBox, self.uFillBox)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uFillBox, self.uPenColor)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uPenColor, self.uBrushColor)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uBrushColor, self.uTitle)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uTitle, self.uTitleFont)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uTitleFont, self.uScaleFont)
        VectorScaleBoxOptionsDialog.setTabOrder(self.uScaleFont, self.uButtonBox)

    def retranslateUi(self, VectorScaleBoxOptionsDialog):
        VectorScaleBoxOptionsDialog.setWindowTitle(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Vector scale box options", None, QtGui.QApplication.UnicodeUTF8))
        self.uLocationGroup.setTitle(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Location", None, QtGui.QApplication.UnicodeUTF8))
        self.uPositionLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Position:", None, QtGui.QApplication.UnicodeUTF8))
        self.uRadioTL.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Top left", None, QtGui.QApplication.UnicodeUTF8))
        self.uRadioTR.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Top right", None, QtGui.QApplication.UnicodeUTF8))
        self.uRadioBL.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Bottom left", None, QtGui.QApplication.UnicodeUTF8))
        self.uRadioBR.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Bottom right", None, QtGui.QApplication.UnicodeUTF8))
        self.uOffsetXLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Offset: X", None, QtGui.QApplication.UnicodeUTF8))
        self.uOffsetYLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "   Y", None, QtGui.QApplication.UnicodeUTF8))
        self.uArrowSizeLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "     Approx arrow size (%)", None, QtGui.QApplication.UnicodeUTF8))
        self.uBoxGroup.setTitle(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Box", None, QtGui.QApplication.UnicodeUTF8))
        self.uShowBoxLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Draw box?", None, QtGui.QApplication.UnicodeUTF8))
        self.uFillBoxLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Fill box?", None, QtGui.QApplication.UnicodeUTF8))
        self.uPenColor.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Border color", None, QtGui.QApplication.UnicodeUTF8))
        self.uBrushColor.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Fill color", None, QtGui.QApplication.UnicodeUTF8))
        self.uTextGroup.setTitle(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Text", None, QtGui.QApplication.UnicodeUTF8))
        self.uTitleLabel.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Title: ", None, QtGui.QApplication.UnicodeUTF8))
        self.uTitleFont.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Title font", None, QtGui.QApplication.UnicodeUTF8))
        self.uScaleFont.setText(QtGui.QApplication.translate("VectorScaleBoxOptionsDialog", "Scale font", None, QtGui.QApplication.UnicodeUTF8))
Exemplo n.º 5
0
class Ui_DEMPropertiesWidget(object):
    def setupUi(self, DEMPropertiesWidget):
        DEMPropertiesWidget.setObjectName("DEMPropertiesWidget")
        DEMPropertiesWidget.resize(335, 533)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(DEMPropertiesWidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox_Geometry = QtWidgets.QGroupBox(DEMPropertiesWidget)
        self.groupBox_Geometry.setObjectName("groupBox_Geometry")
        self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.groupBox_Geometry)
        self.verticalLayout_6.setContentsMargins(-1, 6, -1, 6)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.horizontalLayout_Resampling = QtWidgets.QHBoxLayout()
        self.horizontalLayout_Resampling.setObjectName("horizontalLayout_Resampling")
        self.label_Resampling = QtWidgets.QLabel(self.groupBox_Geometry)
        self.label_Resampling.setObjectName("label_Resampling")
        self.horizontalLayout_Resampling.addWidget(self.label_Resampling)
        self.horizontalSlider_DEMSize = QtWidgets.QSlider(self.groupBox_Geometry)
        self.horizontalSlider_DEMSize.setEnabled(True)
        self.horizontalSlider_DEMSize.setMinimum(1)
        self.horizontalSlider_DEMSize.setMaximum(6)
        self.horizontalSlider_DEMSize.setSingleStep(1)
        self.horizontalSlider_DEMSize.setPageStep(1)
        self.horizontalSlider_DEMSize.setProperty("value", 2)
        self.horizontalSlider_DEMSize.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider_DEMSize.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.horizontalSlider_DEMSize.setTickInterval(1)
        self.horizontalSlider_DEMSize.setObjectName("horizontalSlider_DEMSize")
        self.horizontalLayout_Resampling.addWidget(self.horizontalSlider_DEMSize)
        self.label_ResamplingLevel = QtWidgets.QLabel(self.groupBox_Geometry)
        self.label_ResamplingLevel.setMinimumSize(QtCore.QSize(10, 0))
        self.label_ResamplingLevel.setObjectName("label_ResamplingLevel")
        self.horizontalLayout_Resampling.addWidget(self.label_ResamplingLevel)
        self.verticalLayout_6.addLayout(self.horizontalLayout_Resampling)
        self.verticalLayout_Surroundings = QtWidgets.QVBoxLayout()
        self.verticalLayout_Surroundings.setObjectName("verticalLayout_Surroundings")
        self.checkBox_Surroundings = QtWidgets.QCheckBox(self.groupBox_Geometry)
        self.checkBox_Surroundings.setObjectName("checkBox_Surroundings")
        self.verticalLayout_Surroundings.addWidget(self.checkBox_Surroundings)
        self.gridLayout_Surroundings = QtWidgets.QGridLayout()
        self.gridLayout_Surroundings.setObjectName("gridLayout_Surroundings")
        self.label_3 = QtWidgets.QLabel(self.groupBox_Geometry)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout_Surroundings.addWidget(self.label_3, 0, 2, 1, 1)
        self.spinBox_Roughening = QtWidgets.QSpinBox(self.groupBox_Geometry)
        self.spinBox_Roughening.setMinimumSize(QtCore.QSize(70, 0))
        self.spinBox_Roughening.setMaximum(64)
        self.spinBox_Roughening.setProperty("value", 1)
        self.spinBox_Roughening.setObjectName("spinBox_Roughening")
        self.gridLayout_Surroundings.addWidget(self.spinBox_Roughening, 0, 3, 1, 1)
        self.spinBox_Size = QtWidgets.QSpinBox(self.groupBox_Geometry)
        self.spinBox_Size.setMinimumSize(QtCore.QSize(70, 0))
        self.spinBox_Size.setMinimum(3)
        self.spinBox_Size.setMaximum(9)
        self.spinBox_Size.setSingleStep(2)
        self.spinBox_Size.setProperty("value", 3)
        self.spinBox_Size.setObjectName("spinBox_Size")
        self.gridLayout_Surroundings.addWidget(self.spinBox_Size, 0, 1, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.groupBox_Geometry)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout_Surroundings.addWidget(self.label_2, 0, 0, 1, 1)
        self.verticalLayout_Surroundings.addLayout(self.gridLayout_Surroundings)
        self.verticalLayout_6.addLayout(self.verticalLayout_Surroundings)
        self.verticalLayout_Clip = QtWidgets.QVBoxLayout()
        self.verticalLayout_Clip.setObjectName("verticalLayout_Clip")
        self.checkBox_Clip = QtWidgets.QCheckBox(self.groupBox_Geometry)
        self.checkBox_Clip.setObjectName("checkBox_Clip")
        self.verticalLayout_Clip.addWidget(self.checkBox_Clip)
        self.comboBox_ClipLayer = QtWidgets.QComboBox(self.groupBox_Geometry)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBox_ClipLayer.sizePolicy().hasHeightForWidth())
        self.comboBox_ClipLayer.setSizePolicy(sizePolicy)
        self.comboBox_ClipLayer.setMaximumSize(QtCore.QSize(220, 16777215))
        self.comboBox_ClipLayer.setObjectName("comboBox_ClipLayer")
        self.verticalLayout_Clip.addWidget(self.comboBox_ClipLayer)
        self.verticalLayout_6.addLayout(self.verticalLayout_Clip)
        self.verticalLayout_2.addWidget(self.groupBox_Geometry)
        self.groupBox_Material = QtWidgets.QGroupBox(DEMPropertiesWidget)
        self.groupBox_Material.setObjectName("groupBox_Material")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBox_Material)
        self.verticalLayout_4.setContentsMargins(-1, 6, -1, 6)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.label_5 = QtWidgets.QLabel(self.groupBox_Material)
        self.label_5.setObjectName("label_5")
        self.verticalLayout_4.addWidget(self.label_5)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setContentsMargins(6, -1, -1, -1)
        self.verticalLayout.setSpacing(4)
        self.verticalLayout.setObjectName("verticalLayout")
        self.radioButton_MapCanvas = QtWidgets.QRadioButton(self.groupBox_Material)
        self.radioButton_MapCanvas.setChecked(True)
        self.radioButton_MapCanvas.setObjectName("radioButton_MapCanvas")
        self.verticalLayout.addWidget(self.radioButton_MapCanvas)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.radioButton_LayerImage = QtWidgets.QRadioButton(self.groupBox_Material)
        self.radioButton_LayerImage.setObjectName("radioButton_LayerImage")
        self.horizontalLayout_5.addWidget(self.radioButton_LayerImage)
        self.label_LayerImage = QtWidgets.QLabel(self.groupBox_Material)
        self.label_LayerImage.setEnabled(False)
        self.label_LayerImage.setText("")
        self.label_LayerImage.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_LayerImage.setObjectName("label_LayerImage")
        self.horizontalLayout_5.addWidget(self.label_LayerImage)
        self.toolButton_SelectLayer = QtWidgets.QToolButton(self.groupBox_Material)
        self.toolButton_SelectLayer.setEnabled(False)
        self.toolButton_SelectLayer.setObjectName("toolButton_SelectLayer")
        self.horizontalLayout_5.addWidget(self.toolButton_SelectLayer)
        self.verticalLayout.addLayout(self.horizontalLayout_5)
        self.horizontalLayout_ImageFile = QtWidgets.QHBoxLayout()
        self.horizontalLayout_ImageFile.setObjectName("horizontalLayout_ImageFile")
        self.radioButton_ImageFile = QtWidgets.QRadioButton(self.groupBox_Material)
        self.radioButton_ImageFile.setEnabled(True)
        self.radioButton_ImageFile.setObjectName("radioButton_ImageFile")
        self.horizontalLayout_ImageFile.addWidget(self.radioButton_ImageFile)
        self.lineEdit_ImageFile = QtWidgets.QLineEdit(self.groupBox_Material)
        self.lineEdit_ImageFile.setEnabled(False)
        self.lineEdit_ImageFile.setObjectName("lineEdit_ImageFile")
        self.horizontalLayout_ImageFile.addWidget(self.lineEdit_ImageFile)
        self.toolButton_ImageFile = QtWidgets.QToolButton(self.groupBox_Material)
        self.toolButton_ImageFile.setEnabled(False)
        self.toolButton_ImageFile.setObjectName("toolButton_ImageFile")
        self.horizontalLayout_ImageFile.addWidget(self.toolButton_ImageFile)
        self.verticalLayout.addLayout(self.horizontalLayout_ImageFile)
        self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_7.setObjectName("horizontalLayout_7")
        self.radioButton_SolidColor = QtWidgets.QRadioButton(self.groupBox_Material)
        self.radioButton_SolidColor.setObjectName("radioButton_SolidColor")
        self.horizontalLayout_7.addWidget(self.radioButton_SolidColor)
        self.colorButton_Color = QgsColorButton(self.groupBox_Material)
        self.colorButton_Color.setEnabled(False)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.colorButton_Color.sizePolicy().hasHeightForWidth())
        self.colorButton_Color.setSizePolicy(sizePolicy)
        self.colorButton_Color.setObjectName("colorButton_Color")
        self.horizontalLayout_7.addWidget(self.colorButton_Color)
        self.verticalLayout.addLayout(self.horizontalLayout_7)
        self.verticalLayout_4.addLayout(self.verticalLayout)
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalSlider_Opacity = QtWidgets.QSlider(self.groupBox_Material)
        self.horizontalSlider_Opacity.setMaximum(100)
        self.horizontalSlider_Opacity.setProperty("value", 100)
        self.horizontalSlider_Opacity.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider_Opacity.setObjectName("horizontalSlider_Opacity")
        self.gridLayout.addWidget(self.horizontalSlider_Opacity, 2, 2, 1, 1)
        self.label_17 = QtWidgets.QLabel(self.groupBox_Material)
        self.label_17.setObjectName("label_17")
        self.gridLayout.addWidget(self.label_17, 2, 0, 1, 1)
        self.label_TextureSize = QtWidgets.QLabel(self.groupBox_Material)
        self.label_TextureSize.setObjectName("label_TextureSize")
        self.gridLayout.addWidget(self.label_TextureSize, 0, 0, 1, 1)
        self.spinBox_Opacity = QtWidgets.QSpinBox(self.groupBox_Material)
        self.spinBox_Opacity.setEnabled(True)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.spinBox_Opacity.sizePolicy().hasHeightForWidth())
        self.spinBox_Opacity.setSizePolicy(sizePolicy)
        self.spinBox_Opacity.setPrefix("")
        self.spinBox_Opacity.setMinimum(0)
        self.spinBox_Opacity.setMaximum(100)
        self.spinBox_Opacity.setSingleStep(1)
        self.spinBox_Opacity.setProperty("value", 100)
        self.spinBox_Opacity.setObjectName("spinBox_Opacity")
        self.gridLayout.addWidget(self.spinBox_Opacity, 2, 3, 1, 1)
        self.comboBox_TextureSize = QtWidgets.QComboBox(self.groupBox_Material)
        self.comboBox_TextureSize.setObjectName("comboBox_TextureSize")
        self.gridLayout.addWidget(self.comboBox_TextureSize, 0, 1, 1, 3)
        self.verticalLayout_4.addLayout(self.gridLayout)
        self.checkBox_TransparentBackground = QtWidgets.QCheckBox(self.groupBox_Material)
        self.checkBox_TransparentBackground.setObjectName("checkBox_TransparentBackground")
        self.verticalLayout_4.addWidget(self.checkBox_TransparentBackground)
        self.checkBox_Shading = QtWidgets.QCheckBox(self.groupBox_Material)
        self.checkBox_Shading.setChecked(True)
        self.checkBox_Shading.setObjectName("checkBox_Shading")
        self.verticalLayout_4.addWidget(self.checkBox_Shading)
        self.verticalLayout_2.addWidget(self.groupBox_Material)
        self.groupBox_Others = QtWidgets.QGroupBox(DEMPropertiesWidget)
        self.groupBox_Others.setObjectName("groupBox_Others")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.groupBox_Others)
        self.verticalLayout_5.setContentsMargins(-1, 6, -1, 6)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.checkBox_Sides = QtWidgets.QCheckBox(self.groupBox_Others)
        self.checkBox_Sides.setChecked(True)
        self.checkBox_Sides.setObjectName("checkBox_Sides")
        self.horizontalLayout.addWidget(self.checkBox_Sides)
        self.toolButton_SideColor = QgsColorButton(self.groupBox_Others)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolButton_SideColor.sizePolicy().hasHeightForWidth())
        self.toolButton_SideColor.setSizePolicy(sizePolicy)
        self.toolButton_SideColor.setText("")
        self.toolButton_SideColor.setObjectName("toolButton_SideColor")
        self.horizontalLayout.addWidget(self.toolButton_SideColor)
        self.verticalLayout_5.addLayout(self.horizontalLayout)
        self.checkBox_Frame = QtWidgets.QCheckBox(self.groupBox_Others)
        self.checkBox_Frame.setObjectName("checkBox_Frame")
        self.verticalLayout_5.addWidget(self.checkBox_Frame)
        self.checkBox_Visible = QtWidgets.QCheckBox(self.groupBox_Others)
        self.checkBox_Visible.setChecked(True)
        self.checkBox_Visible.setObjectName("checkBox_Visible")
        self.verticalLayout_5.addWidget(self.checkBox_Visible)
        self.verticalLayout_2.addWidget(self.groupBox_Others)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)

        self.retranslateUi(DEMPropertiesWidget)
        self.checkBox_Clip.toggled['bool'].connect(self.comboBox_ClipLayer.setVisible)
        self.radioButton_LayerImage.toggled['bool'].connect(self.label_LayerImage.setEnabled)
        self.radioButton_LayerImage.toggled['bool'].connect(self.toolButton_SelectLayer.setEnabled)
        self.radioButton_ImageFile.toggled['bool'].connect(self.lineEdit_ImageFile.setEnabled)
        self.radioButton_ImageFile.toggled['bool'].connect(self.toolButton_ImageFile.setEnabled)
        self.checkBox_Clip.toggled['bool'].connect(self.checkBox_Frame.setDisabled)
        self.horizontalSlider_DEMSize.valueChanged['int'].connect(self.label_ResamplingLevel.setNum)
        self.horizontalSlider_Opacity.valueChanged['int'].connect(self.spinBox_Opacity.setValue)
        self.spinBox_Opacity.valueChanged['int'].connect(self.horizontalSlider_Opacity.setValue)
        self.radioButton_SolidColor.toggled['bool'].connect(self.colorButton_Color.setEnabled)
        self.checkBox_Sides.toggled['bool'].connect(self.toolButton_SideColor.setEnabled)
        QtCore.QMetaObject.connectSlotsByName(DEMPropertiesWidget)
        DEMPropertiesWidget.setTabOrder(self.horizontalSlider_DEMSize, self.checkBox_Surroundings)
        DEMPropertiesWidget.setTabOrder(self.checkBox_Surroundings, self.spinBox_Size)
        DEMPropertiesWidget.setTabOrder(self.spinBox_Size, self.spinBox_Roughening)
        DEMPropertiesWidget.setTabOrder(self.spinBox_Roughening, self.checkBox_Clip)
        DEMPropertiesWidget.setTabOrder(self.checkBox_Clip, self.comboBox_ClipLayer)
        DEMPropertiesWidget.setTabOrder(self.comboBox_ClipLayer, self.radioButton_MapCanvas)
        DEMPropertiesWidget.setTabOrder(self.radioButton_MapCanvas, self.radioButton_LayerImage)
        DEMPropertiesWidget.setTabOrder(self.radioButton_LayerImage, self.toolButton_SelectLayer)
        DEMPropertiesWidget.setTabOrder(self.toolButton_SelectLayer, self.radioButton_ImageFile)
        DEMPropertiesWidget.setTabOrder(self.radioButton_ImageFile, self.lineEdit_ImageFile)
        DEMPropertiesWidget.setTabOrder(self.lineEdit_ImageFile, self.toolButton_ImageFile)
        DEMPropertiesWidget.setTabOrder(self.toolButton_ImageFile, self.radioButton_SolidColor)
        DEMPropertiesWidget.setTabOrder(self.radioButton_SolidColor, self.colorButton_Color)
        DEMPropertiesWidget.setTabOrder(self.colorButton_Color, self.comboBox_TextureSize)
        DEMPropertiesWidget.setTabOrder(self.comboBox_TextureSize, self.horizontalSlider_Opacity)
        DEMPropertiesWidget.setTabOrder(self.horizontalSlider_Opacity, self.spinBox_Opacity)
        DEMPropertiesWidget.setTabOrder(self.spinBox_Opacity, self.checkBox_TransparentBackground)
        DEMPropertiesWidget.setTabOrder(self.checkBox_TransparentBackground, self.checkBox_Shading)
        DEMPropertiesWidget.setTabOrder(self.checkBox_Shading, self.checkBox_Sides)
        DEMPropertiesWidget.setTabOrder(self.checkBox_Sides, self.toolButton_SideColor)
        DEMPropertiesWidget.setTabOrder(self.toolButton_SideColor, self.checkBox_Frame)
        DEMPropertiesWidget.setTabOrder(self.checkBox_Frame, self.checkBox_Visible)

    def retranslateUi(self, DEMPropertiesWidget):
        _translate = QtCore.QCoreApplication.translate
        DEMPropertiesWidget.setWindowTitle(_translate("DEMPropertiesWidget", "Form"))
        self.groupBox_Geometry.setTitle(_translate("DEMPropertiesWidget", "&Geometry"))
        self.label_Resampling.setText(_translate("DEMPropertiesWidget", "Resampling level"))
        self.label_ResamplingLevel.setText(_translate("DEMPropertiesWidget", "2"))
        self.checkBox_Surroundings.setText(_translate("DEMPropertiesWidget", "Surrounding blocks"))
        self.label_3.setText(_translate("DEMPropertiesWidget", "Roughness"))
        self.label_2.setText(_translate("DEMPropertiesWidget", "Size"))
        self.checkBox_Clip.setText(_translate("DEMPropertiesWidget", "Clip DEM with polygon layer"))
        self.groupBox_Material.setTitle(_translate("DEMPropertiesWidget", "&Material"))
        self.label_5.setText(_translate("DEMPropertiesWidget", "Display type"))
        self.radioButton_MapCanvas.setText(_translate("DEMPropertiesWidget", "Map canvas image"))
        self.radioButton_LayerImage.setText(_translate("DEMPropertiesWidget", "Layer image"))
        self.toolButton_SelectLayer.setText(_translate("DEMPropertiesWidget", "Select layer(s)..."))
        self.radioButton_ImageFile.setText(_translate("DEMPropertiesWidget", "Image file"))
        self.toolButton_ImageFile.setText(_translate("DEMPropertiesWidget", "Browse..."))
        self.radioButton_SolidColor.setText(_translate("DEMPropertiesWidget", "Solid color"))
        self.label_17.setText(_translate("DEMPropertiesWidget", "Opacity (%)"))
        self.label_TextureSize.setText(_translate("DEMPropertiesWidget", "Resolution"))
        self.checkBox_TransparentBackground.setText(_translate("DEMPropertiesWidget", "Transparent background"))
        self.checkBox_Shading.setText(_translate("DEMPropertiesWidget", "Enable shading"))
        self.groupBox_Others.setTitle(_translate("DEMPropertiesWidget", "&Other Options"))
        self.checkBox_Sides.setText(_translate("DEMPropertiesWidget", "Build sides"))
        self.checkBox_Frame.setText(_translate("DEMPropertiesWidget", "Build frame"))
        self.checkBox_Visible.setText(_translate("DEMPropertiesWidget", "Visible on load"))
class Ui_AnimationLayoutItemProps(object):
    def setupUi(self, AnimationLayoutItemProps):
        AnimationLayoutItemProps.setObjectName(_fromUtf8("AnimationLayoutItemProps"))
        AnimationLayoutItemProps.resize(475, 175)
        self.formLayout = QtGui.QFormLayout(AnimationLayoutItemProps)
        self.formLayout.setObjectName(_fromUtf8("formLayout"))
        self.lblLabel = QtGui.QLabel(AnimationLayoutItemProps)
        self.lblLabel.setObjectName(_fromUtf8("lblLabel"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.lblLabel)
        self.editLabel = QtGui.QLineEdit(AnimationLayoutItemProps)
        self.editLabel.setObjectName(_fromUtf8("editLabel"))
        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.editLabel)
        self.lblTimeFormat = QtGui.QLabel(AnimationLayoutItemProps)
        self.lblTimeFormat.setObjectName(_fromUtf8("lblTimeFormat"))
        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.lblTimeFormat)
        self.cboTimeFormat = QtGui.QComboBox(AnimationLayoutItemProps)
        self.cboTimeFormat.setObjectName(_fromUtf8("cboTimeFormat"))
        self.cboTimeFormat.addItem(_fromUtf8(""))
        self.cboTimeFormat.addItem(_fromUtf8(""))
        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.cboTimeFormat)
        self.lblText = QtGui.QLabel(AnimationLayoutItemProps)
        self.lblText.setObjectName(_fromUtf8("lblText"))
        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.lblText)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.btnFont = QtGui.QPushButton(AnimationLayoutItemProps)
        self.btnFont.setObjectName(_fromUtf8("btnFont"))
        self.horizontalLayout.addWidget(self.btnFont)
        self.btnTextColor = QgsColorButton(AnimationLayoutItemProps)
        self.btnTextColor.setText(_fromUtf8(""))
        self.btnTextColor.setObjectName(_fromUtf8("btnTextColor"))
        self.horizontalLayout.addWidget(self.btnTextColor)
        self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.horizontalLayout)
        self.lblBackground = QtGui.QLabel(AnimationLayoutItemProps)
        self.lblBackground.setObjectName(_fromUtf8("lblBackground"))
        self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.lblBackground)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.chkBackground = QtGui.QCheckBox(AnimationLayoutItemProps)
        self.chkBackground.setText(_fromUtf8(""))
        self.chkBackground.setObjectName(_fromUtf8("chkBackground"))
        self.horizontalLayout_2.addWidget(self.chkBackground)
        self.btnBackgroundColor = QgsColorButton(AnimationLayoutItemProps)
        self.btnBackgroundColor.setText(_fromUtf8(""))
        self.btnBackgroundColor.setObjectName(_fromUtf8("btnBackgroundColor"))
        self.horizontalLayout_2.addWidget(self.btnBackgroundColor)
        self.formLayout.setLayout(3, QtGui.QFormLayout.FieldRole, self.horizontalLayout_2)
        self.lblPosition = QtGui.QLabel(AnimationLayoutItemProps)
        self.lblPosition.setObjectName(_fromUtf8("lblPosition"))
        self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.lblPosition)
        self.cboPosition = QtGui.QComboBox(AnimationLayoutItemProps)
        self.cboPosition.setObjectName(_fromUtf8("cboPosition"))
        self.cboPosition.addItem(_fromUtf8(""))
        self.cboPosition.addItem(_fromUtf8(""))
        self.cboPosition.addItem(_fromUtf8(""))
        self.cboPosition.addItem(_fromUtf8(""))
        self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.cboPosition)

        self.retranslateUi(AnimationLayoutItemProps)
        QtCore.QMetaObject.connectSlotsByName(AnimationLayoutItemProps)
        AnimationLayoutItemProps.setTabOrder(self.editLabel, self.cboTimeFormat)
        AnimationLayoutItemProps.setTabOrder(self.cboTimeFormat, self.btnBackgroundColor)
        AnimationLayoutItemProps.setTabOrder(self.btnBackgroundColor, self.cboPosition)

    def retranslateUi(self, AnimationLayoutItemProps):
        AnimationLayoutItemProps.setWindowTitle(_translate("AnimationLayoutItemProps", "Form", None))
        self.lblLabel.setText(_translate("AnimationLayoutItemProps", "Label", None))
        self.lblTimeFormat.setText(_translate("AnimationLayoutItemProps", "Format", None))
        self.cboTimeFormat.setItemText(0, _translate("AnimationLayoutItemProps", "hh:mm:ss.ss", None))
        self.cboTimeFormat.setItemText(1, _translate("AnimationLayoutItemProps", "hh.hhh", None))
        self.lblText.setText(_translate("AnimationLayoutItemProps", "Text", None))
        self.btnFont.setText(_translate("AnimationLayoutItemProps", "Font...", None))
        self.lblBackground.setText(_translate("AnimationLayoutItemProps", "Background", None))
        self.lblPosition.setText(_translate("AnimationLayoutItemProps", "Position", None))
        self.cboPosition.setItemText(0, _translate("AnimationLayoutItemProps", "Top-left", None))
        self.cboPosition.setItemText(1, _translate("AnimationLayoutItemProps", "Top-right", None))
        self.cboPosition.setItemText(2, _translate("AnimationLayoutItemProps", "Bottom-left", None))
        self.cboPosition.setItemText(3, _translate("AnimationLayoutItemProps", "Bottom-right", None))