Пример #1
0
    def __init__(self, setting, widget, allow_alpha: bool = False, dialog_title: str = None):
        color_widget = QgsColorButton(widget)
        color_widget.setColorDialogTitle(dialog_title)
        signal = color_widget.colorChanged

        SettingWidget.__init__(self, setting, color_widget, signal)
        self.widget.setAllowOpacity(allow_alpha)
Пример #2
0
    def __init__(self,
                 setting,
                 widget,
                 allow_alpha: bool = False,
                 dialog_title: str = None):
        color_widget = QgsColorButton(widget)
        color_widget.setColorDialogTitle(dialog_title)
        signal = color_widget.colorChanged

        SettingWidget.__init__(self, setting, color_widget, signal)
        self.widget.setAllowOpacity(allow_alpha)
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
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)
Пример #5
0
class Ui_Settings(object):
    def setupUi(self, Settings):
        Settings.setObjectName("Settings")
        Settings.resize(292, 223)
        self.gridLayout = QtWidgets.QGridLayout(Settings)
        self.gridLayout.setObjectName("gridLayout")
        self.label_2 = QtWidgets.QLabel(Settings)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
        self.label = QtWidgets.QLabel(Settings)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 4, 0, 1, 1)
        self.saveSelectionInProject = QtWidgets.QCheckBox(Settings)
        self.saveSelectionInProject.setChecked(True)
        self.saveSelectionInProject.setObjectName("saveSelectionInProject")
        self.gridLayout.addWidget(self.saveSelectionInProject, 1, 0, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem, 5, 0, 1, 1)
        self.rubberWidth = QtWidgets.QDoubleSpinBox(Settings)
        self.rubberWidth.setToolTip("")
        self.rubberWidth.setDecimals(1)
        self.rubberWidth.setSingleStep(1.0)
        self.rubberWidth.setProperty("value", 2.0)
        self.rubberWidth.setObjectName("rubberWidth")
        self.gridLayout.addWidget(self.rubberWidth, 3, 1, 1, 1)
        self.scale = QtWidgets.QSpinBox(Settings)
        self.scale.setMinimum(1)
        self.scale.setMaximum(15)
        self.scale.setProperty("value", 5)
        self.scale.setObjectName("scale")
        self.gridLayout.addWidget(self.scale, 2, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(Settings)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.buttonBox = QtWidgets.QDialogButtonBox(Settings)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.gridLayout.addWidget(self.buttonBox, 6, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(Settings)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1)
        self.dockArea = QtWidgets.QComboBox(Settings)
        self.dockArea.setObjectName("dockArea")
        self.dockArea.addItem("")
        self.dockArea.addItem("")
        self.gridLayout.addWidget(self.dockArea, 0, 1, 1, 1)
        self.rubberColor = QgsColorButton(Settings)
        self.rubberColor.setObjectName("rubberColor")
        self.gridLayout.addWidget(self.rubberColor, 4, 1, 1, 1)

        self.retranslateUi(Settings)
        self.buttonBox.accepted.connect(Settings.accept)
        self.buttonBox.rejected.connect(Settings.reject)
        QtCore.QMetaObject.connectSlotsByName(Settings)

    def retranslateUi(self, Settings):
        _translate = QtCore.QCoreApplication.translate
        Settings.setWindowTitle(_translate("Settings", "Item Browser :: settings"))
        self.label_2.setText(_translate("Settings", "Rubberband size"))
        self.label.setText(_translate("Settings", "Rubberband color"))
        self.saveSelectionInProject.setText(_translate("Settings", "save selection in project"))
        self.label_3.setText(_translate("Settings", "Scaling"))
        self.label_4.setText(_translate("Settings", "Dock area"))
        self.dockArea.setItemText(0, _translate("Settings", "left"))
        self.dockArea.setItemText(1, _translate("Settings", "right"))
        self.rubberColor.setColorDialogTitle(_translate("Settings", "Select Color for rubber band"))
Пример #6
0
class QrCodeLayoutItemWidget(QgsLayoutItemBaseWidget):  # pylint: disable=too-few-public-methods
    """Widget for configuring a QrCodeLayoutItem."""
    def __init__(self, parent, layout_object):
        super().__init__(parent, layout_object)
        self._qrcode_item = layout_object
        self.message_bar = None

        self.setPanelTitle(self.tr('QR Code Properties'))
        self._init_widgets(layout_object)
        self._update_gui_values()

    def _init_widgets(self, layout_object):
        """Initialize widgets"""
        lbl_title = QLabel()
        lbl_title.setStyleSheet(
            'padding: 2px; font-weight: bold; background-color: '
            'rgb(200, 200, 200);')
        lbl_title.setText(self.tr('QR Code'))
        self._cd_value_widget = CodeValueWidget(self)
        self._cd_value_widget.value_changed.connect(
            self._on_code_value_changed)
        value_groupbox = QgsCollapsibleGroupBoxBasic(self.tr('Data'))
        gp_layout = QVBoxLayout()
        gp_layout.setContentsMargins(0, 0, 0, 0)
        gp_layout.addWidget(self._cd_value_widget)
        value_groupbox.setLayout(gp_layout)

        # Item appearance
        appearance_groupbox = QgsCollapsibleGroupBoxBasic(
            self.tr('Appearance'))
        appearance_layout = QGridLayout()

        # Data color
        lbl_data_clr = QLabel(self.tr('Data color'))
        self._data_clr_btn = QgsColorButton()
        self._data_clr_btn.setColorDialogTitle(self.tr('Select Data Color'))
        self._data_clr_btn.setContext('composer')
        self._data_clr_btn.setAllowOpacity(False)
        self._data_clr_btn.colorChanged.connect(self.on_data_color_changed)
        appearance_layout.addWidget(lbl_data_clr, 0, 0)
        appearance_layout.addWidget(self._data_clr_btn, 0, 1)
        appearance_layout.setColumnStretch(2, 1)

        # Background color
        lbl_background_clr = QLabel(self.tr('Background color'))
        self._background_clr_btn = QgsColorButton()
        self._background_clr_btn.setColorDialogTitle(
            self.tr('Select Background Color'))
        self._background_clr_btn.setContext('composer')
        self._background_clr_btn.setAllowOpacity(False)
        self._background_clr_btn.colorChanged.connect(
            self.on_background_color_changed)
        appearance_layout.addWidget(lbl_background_clr, 1, 0)
        appearance_layout.addWidget(self._background_clr_btn, 1, 1)

        appearance_groupbox.setLayout(appearance_layout)

        # Properties widget
        self._prop_widget = QgsLayoutItemPropertiesWidget(self, layout_object)
        self._prop_widget.showBackgroundGroup(False)

        # Add widgets to layout
        layout = QVBoxLayout()
        layout.setContentsMargins(0, 0, 0, 0)
        layout.addWidget(lbl_title)
        layout.addWidget(value_groupbox)
        layout.addWidget(appearance_groupbox)
        layout.addWidget(self._prop_widget)

        # Set layout
        self.setLayout(layout)

    def _on_code_value_changed(self, txt):
        # Slot raised when the code value changes.
        self._qrcode_item.beginCommand(self.tr('Change code value'),
                                       QgsLayoutItem.UndoLabelText)
        self._qrcode_item.blockSignals(True)
        self._qrcode_item.code_value = txt
        self._qrcode_item.blockSignals(False)
        self._qrcode_item.endCommand()

    def setNewItem(self, item):
        """
        Set widget properties to sync with item properties.
        """
        if item.type() != QR_CODE_TYPE:
            return False

        self._qrcode_item = item
        self._prop_widget.setItem(self._qrcode_item)
        self._update_gui_values()

        return True

    def _update_gui_values(self):
        # Updates values of widgets based on item properties.
        self._cd_value_widget.block_value_widget_signals(True)
        self._cd_value_widget.code_value = self._qrcode_item.code_value
        self._cd_value_widget.value_text_edit.moveCursor(
            QTextCursor.End, QTextCursor.MoveAnchor)
        self._cd_value_widget.block_value_widget_signals(False)

        self._data_clr_btn.blockSignals(True)
        self._data_clr_btn.setColor(
            color_from_name(self._qrcode_item.data_color, '#000000'))
        self._data_clr_btn.blockSignals(False)

        self._background_clr_btn.blockSignals(True)
        self._background_clr_btn.setColor(
            color_from_name(self._qrcode_item.bg_color, '#FFFFFF'))
        self._background_clr_btn.blockSignals(False)

    def setDesignerInterface(self, iface):
        """
        Use iface to set the message_bar.
        """
        super().setDesignerInterface(iface)
        self.message_bar = iface.messageBar()

    def on_data_color_changed(self, color):
        """
        Slot raised when new data color is set.
        """
        self._qrcode_item.beginCommand(self.tr('Change data color'),
                                       QgsLayoutItem.UndoPictureFillColor)
        self._qrcode_item.blockSignals(True)
        self._qrcode_item.data_color = color.name()
        self._qrcode_item.blockSignals(False)
        self._qrcode_item.endCommand()

    def on_background_color_changed(self, color):
        """
        Slot raised when new background color is set.
        """
        self._qrcode_item.beginCommand(self.tr('Change background color'),
                                       QgsLayoutItem.UndoPictureFillColor)
        self._qrcode_item.blockSignals(True)
        self._qrcode_item.bg_color = color.name()
        self._qrcode_item.blockSignals(False)
        self._qrcode_item.endCommand()
class Ui_Mapmashup(object):
    def setupUi(self, Mapmashup):
        Mapmashup.setObjectName("Mapmashup")
        Mapmashup.resize(327, 427)
        self.verticalLayout = QtWidgets.QVBoxLayout(Mapmashup)
        self.verticalLayout.setObjectName("verticalLayout")
        self.hlImageFolder = QtWidgets.QHBoxLayout()
        self.hlImageFolder.setObjectName("hlImageFolder")
        self.leImageFolder = QtWidgets.QLineEdit(Mapmashup)
        self.leImageFolder.setObjectName("leImageFolder")
        self.hlImageFolder.addWidget(self.leImageFolder)
        self.butBrowseImg = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butBrowseImg.sizePolicy().hasHeightForWidth())
        self.butBrowseImg.setSizePolicy(sizePolicy)
        self.butBrowseImg.setMinimumSize(QtCore.QSize(100, 0))
        self.butBrowseImg.setMaximumSize(QtCore.QSize(100, 16777215))
        self.butBrowseImg.setObjectName("butBrowseImg")
        self.hlImageFolder.addWidget(self.butBrowseImg)
        self.verticalLayout.addLayout(self.hlImageFolder)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.leRegistrationFolder = QtWidgets.QLineEdit(Mapmashup)
        self.leRegistrationFolder.setObjectName("leRegistrationFolder")
        self.horizontalLayout_2.addWidget(self.leRegistrationFolder)
        self.butBrowseReg = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butBrowseReg.sizePolicy().hasHeightForWidth())
        self.butBrowseReg.setSizePolicy(sizePolicy)
        self.butBrowseReg.setMinimumSize(QtCore.QSize(100, 0))
        self.butBrowseReg.setMaximumSize(QtCore.QSize(100, 16777215))
        self.butBrowseReg.setObjectName("butBrowseReg")
        self.horizontalLayout_2.addWidget(self.butBrowseReg)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.cboRegistrations = QtWidgets.QComboBox(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.cboRegistrations.sizePolicy().hasHeightForWidth())
        self.cboRegistrations.setSizePolicy(sizePolicy)
        self.cboRegistrations.setObjectName("cboRegistrations")
        self.horizontalLayout_5.addWidget(self.cboRegistrations)
        self.butRefresh = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.MinimumExpanding,
            QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butRefresh.sizePolicy().hasHeightForWidth())
        self.butRefresh.setSizePolicy(sizePolicy)
        self.butRefresh.setMinimumSize(QtCore.QSize(100, 0))
        self.butRefresh.setMaximumSize(QtCore.QSize(100, 16777215))
        self.butRefresh.setObjectName("butRefresh")
        self.horizontalLayout_5.addWidget(self.butRefresh)
        self.verticalLayout.addLayout(self.horizontalLayout_5)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label_2 = QtWidgets.QLabel(Mapmashup)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout.addWidget(self.label_2)
        self.leName = QtWidgets.QLineEdit(Mapmashup)
        self.leName.setObjectName("leName")
        self.horizontalLayout.addWidget(self.leName)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.label = QtWidgets.QLabel(Mapmashup)
        self.label.setObjectName("label")
        self.horizontalLayout_3.addWidget(self.label)
        self.hsTransparency = QtWidgets.QSlider(Mapmashup)
        self.hsTransparency.setOrientation(QtCore.Qt.Horizontal)
        self.hsTransparency.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.hsTransparency.setTickInterval(10)
        self.hsTransparency.setObjectName("hsTransparency")
        self.horizontalLayout_3.addWidget(self.hsTransparency)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.groupBox = QtWidgets.QGroupBox(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setMinimumSize(QtCore.QSize(0, 61))
        self.groupBox.setMaximumSize(QtCore.QSize(3000, 61))
        self.groupBox.setObjectName("groupBox")
        self.cbTransparentColour = QtWidgets.QCheckBox(self.groupBox)
        self.cbTransparentColour.setGeometry(QtCore.QRect(10, 15, 211, 17))
        self.cbTransparentColour.setObjectName("cbTransparentColour")
        self.label_3 = QtWidgets.QLabel(self.groupBox)
        self.label_3.setGeometry(QtCore.QRect(10, 35, 56, 20))
        self.label_3.setObjectName("label_3")
        self.mcbTransparentColour = QgsColorButton(self.groupBox)
        self.mcbTransparentColour.setGeometry(QtCore.QRect(43, 33, 61, 25))
        self.mcbTransparentColour.setColor(QtGui.QColor(255, 255, 255))
        self.mcbTransparentColour.setDefaultColor(QtGui.QColor(255, 255, 255))
        self.mcbTransparentColour.setObjectName("mcbTransparentColour")
        self.verticalLayout.addWidget(self.groupBox)
        self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.leStyleFile = QtWidgets.QLineEdit(Mapmashup)
        self.leStyleFile.setObjectName("leStyleFile")
        self.horizontalLayout_6.addWidget(self.leStyleFile)
        self.pbBrowseStyleFile = QtWidgets.QPushButton(Mapmashup)
        self.pbBrowseStyleFile.setMinimumSize(QtCore.QSize(100, 0))
        self.pbBrowseStyleFile.setObjectName("pbBrowseStyleFile")
        self.horizontalLayout_6.addWidget(self.pbBrowseStyleFile)
        self.verticalLayout.addLayout(self.horizontalLayout_6)
        self.cbApplyStyle = QtWidgets.QCheckBox(Mapmashup)
        self.cbApplyStyle.setObjectName("cbApplyStyle")
        self.verticalLayout.addWidget(self.cbApplyStyle)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.butLoadImage = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butLoadImage.sizePolicy().hasHeightForWidth())
        self.butLoadImage.setSizePolicy(sizePolicy)
        self.butLoadImage.setMinimumSize(QtCore.QSize(30, 30))
        self.butLoadImage.setMaximumSize(QtCore.QSize(30, 30))
        self.butLoadImage.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("images/mashup.png"), QtGui.QIcon.Normal,
                       QtGui.QIcon.Off)
        self.butLoadImage.setIcon(icon)
        self.butLoadImage.setIconSize(QtCore.QSize(26, 26))
        self.butLoadImage.setObjectName("butLoadImage")
        self.horizontalLayout_4.addWidget(self.butLoadImage)
        self.butLoadImageFile = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butLoadImageFile.sizePolicy().hasHeightForWidth())
        self.butLoadImageFile.setSizePolicy(sizePolicy)
        self.butLoadImageFile.setMinimumSize(QtCore.QSize(30, 30))
        self.butLoadImageFile.setMaximumSize(QtCore.QSize(30, 30))
        self.butLoadImageFile.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("images/mashup2.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.butLoadImageFile.setIcon(icon1)
        self.butLoadImageFile.setIconSize(QtCore.QSize(26, 26))
        self.butLoadImageFile.setObjectName("butLoadImageFile")
        self.horizontalLayout_4.addWidget(self.butLoadImageFile)
        self.butLoadImageBrowse = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butLoadImageBrowse.sizePolicy().hasHeightForWidth())
        self.butLoadImageBrowse.setSizePolicy(sizePolicy)
        self.butLoadImageBrowse.setMinimumSize(QtCore.QSize(30, 30))
        self.butLoadImageBrowse.setMaximumSize(QtCore.QSize(30, 30))
        self.butLoadImageBrowse.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("images/mashup3.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.butLoadImageBrowse.setIcon(icon2)
        self.butLoadImageBrowse.setIconSize(QtCore.QSize(26, 26))
        self.butLoadImageBrowse.setObjectName("butLoadImageBrowse")
        self.horizontalLayout_4.addWidget(self.butLoadImageBrowse)
        self.butClearLast = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butClearLast.sizePolicy().hasHeightForWidth())
        self.butClearLast.setSizePolicy(sizePolicy)
        self.butClearLast.setMinimumSize(QtCore.QSize(30, 30))
        self.butClearLast.setMaximumSize(QtCore.QSize(30, 30))
        self.butClearLast.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap("images/removelayer.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.butClearLast.setIcon(icon3)
        self.butClearLast.setIconSize(QtCore.QSize(26, 26))
        self.butClearLast.setObjectName("butClearLast")
        self.horizontalLayout_4.addWidget(self.butClearLast)
        self.butClear = QtWidgets.QPushButton(Mapmashup)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.butClear.sizePolicy().hasHeightForWidth())
        self.butClear.setSizePolicy(sizePolicy)
        self.butClear.setMinimumSize(QtCore.QSize(30, 30))
        self.butClear.setMaximumSize(QtCore.QSize(30, 30))
        self.butClear.setText("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap("images/removelayers.png"),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.butClear.setIcon(icon4)
        self.butClear.setIconSize(QtCore.QSize(26, 26))
        self.butClear.setObjectName("butClear")
        self.horizontalLayout_4.addWidget(self.butClear)
        spacerItem = QtWidgets.QSpacerItem(40, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem)
        self.butHelp = QtWidgets.QPushButton(Mapmashup)
        self.butHelp.setMinimumSize(QtCore.QSize(30, 30))
        self.butHelp.setMaximumSize(QtCore.QSize(30, 30))
        self.butHelp.setText("")
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap("images/info.png"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.butHelp.setIcon(icon5)
        self.butHelp.setIconSize(QtCore.QSize(24, 24))
        self.butHelp.setObjectName("butHelp")
        self.horizontalLayout_4.addWidget(self.butHelp)
        self.butGithub = QtWidgets.QPushButton(Mapmashup)
        self.butGithub.setMinimumSize(QtCore.QSize(30, 30))
        self.butGithub.setMaximumSize(QtCore.QSize(30, 30))
        self.butGithub.setText("")
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap("images/github.png"), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
        self.butGithub.setIcon(icon6)
        self.butGithub.setIconSize(QtCore.QSize(24, 24))
        self.butGithub.setObjectName("butGithub")
        self.horizontalLayout_4.addWidget(self.butGithub)
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        spacerItem1 = QtWidgets.QSpacerItem(20, 150,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem1)
        self.groupBox.raise_()
        self.cbApplyStyle.raise_()

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

    def retranslateUi(self, Mapmashup):
        _translate = QtCore.QCoreApplication.translate
        Mapmashup.setWindowTitle(_translate("Mapmashup", "FSC QGIS plugin"))
        self.leImageFolder.setToolTip(
            _translate("Mapmashup", "Path of folder for temp image files"))
        self.butBrowseImg.setToolTip(
            _translate("Mapmashup", "Browse for image folder"))
        self.butBrowseImg.setText(_translate("Mapmashup", "Image folder"))
        self.leRegistrationFolder.setToolTip(
            _translate("Mapmashup", "Folder where WLD files are kept"))
        self.butBrowseReg.setToolTip(
            _translate("Mapmashup", "Browse for folder containing WLD files"))
        self.butBrowseReg.setText(
            _translate("Mapmashup", "Registration folder"))
        self.cboRegistrations.setToolTip(
            _translate("Mapmashup", "Select WLD registration info"))
        self.butRefresh.setToolTip(
            _translate("Mapmashup", "Refresh the list of WLD files"))
        self.butRefresh.setText(_translate("Mapmashup", "Refresh"))
        self.label_2.setText(_translate("Mapmashup", "Layer name"))
        self.leName.setToolTip(
            _translate("Mapmashup", "Text to be used in layer name"))
        self.label.setText(_translate("Mapmashup", "Global transparency"))
        self.hsTransparency.setToolTip(
            _translate("Mapmashup", "Set the layer\'s global transparency"))
        self.groupBox.setTitle(_translate("Mapmashup", "Transparent colour"))
        self.cbTransparentColour.setText(
            _translate("Mapmashup", "Set transparent background colour"))
        self.label_3.setText(_translate("Mapmashup", "Colour"))
        self.mcbTransparentColour.setToolTip(
            _translate("Mapmashup",
                       "Use this button to select transparent colour"))
        self.mcbTransparentColour.setColorDialogTitle(
            _translate("Mapmashup", "Select transparent colour"))
        self.leStyleFile.setToolTip(
            _translate("Mapmashup",
                       "Path of style file to apply to created maps"))
        self.pbBrowseStyleFile.setText(
            _translate("Mapmashup", "Browse style file"))
        self.cbApplyStyle.setText(_translate("Mapmashup", "Apply style"))
        self.butLoadImage.setToolTip(
            _translate(
                "Mapmashup",
                "Paste image from clipboard to map with specified registration"
            ))
        self.butLoadImageFile.setToolTip(
            _translate(
                "Mapmashup",
                "Paste most recent  image from image folder to map with specified registration"
            ))
        self.butLoadImageBrowse.setToolTip(
            _translate(
                "Mapmashup",
                "Browse for image to paste into map with specified registration"
            ))
        self.butClearLast.setToolTip(
            _translate("Mapmashup", "Remove last mashed map"))
        self.butClear.setToolTip(
            _translate("Mapmashup", "Remove all mashed maps"))
        self.butHelp.setToolTip(
            _translate(
                "Mapmashup",
                "<html><head/><body><p><span style=\" font-size:12pt;\">Get more information about this tool and help on using it. This links to a webpage with up-to-date information about the tool. </span></p></body></html>"
            ))
        self.butGithub.setToolTip(
            _translate(
                "Mapmashup",
                "<html><head/><body><p><span style=\" font-size:12pt; font-weight:600;\">Report an issue with this tool.</span><span style=\" font-size:12pt;\"> Using this channel is the best way to get attention quickly. Issues can be bug reports, enhancement requests or just questions. Anyone can view current issues, but to add a new issue you will need to sign up for a free Github account (very easy).</span></p></body></html>"
            ))