# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file './qcrop/qcrop.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_QCrop(object):
    def setupUi(self, QCrop):
        QCrop.setObjectName("QCrop")
        QCrop.resize(664, 576)
        QCrop.setSizeGripEnabled(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(QCrop)
        self.verticalLayout.setSpacing(6)
        self.verticalLayout.setObjectName("verticalLayout")
        self.toolbar = QtWidgets.QWidget(QCrop)
        self.toolbar.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.toolbar.setObjectName("toolbar")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.toolbar)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.labelX = QtWidgets.QLabel(self.toolbar)
        self.labelX.setObjectName("labelX")
        self.horizontalLayout.addWidget(self.labelX)
        self.spinBoxX = QtWidgets.QSpinBox(self.toolbar)
        self.spinBoxX.setMinimumSize(QtCore.QSize(72, 0))
        self.spinBoxX.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.spinBoxX.setObjectName("spinBoxX")
        self.horizontalLayout.addWidget(self.spinBoxX)
        self.labelY = QtWidgets.QLabel(self.toolbar)
        self.labelY.setObjectName("labelY")
        self.horizontalLayout.addWidget(self.labelY)
        self.spinBoxY = QtWidgets.QSpinBox(self.toolbar)
        self.spinBoxY.setMinimumSize(QtCore.QSize(72, 0))
        self.spinBoxY.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.spinBoxY.setObjectName("spinBoxY")
        self.horizontalLayout.addWidget(self.spinBoxY)
        self.labelW = QtWidgets.QLabel(self.toolbar)
        self.labelW.setObjectName("labelW")
        self.horizontalLayout.addWidget(self.labelW)
        self.spinBoxW = QtWidgets.QSpinBox(self.toolbar)
        self.spinBoxW.setMinimumSize(QtCore.QSize(72, 0))
        self.spinBoxW.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.spinBoxW.setObjectName("spinBoxW")
        self.horizontalLayout.addWidget(self.spinBoxW)
        self.labelH = QtWidgets.QLabel(self.toolbar)
        self.labelH.setObjectName("labelH")
        self.horizontalLayout.addWidget(self.labelH)
        self.spinBoxH = QtWidgets.QSpinBox(self.toolbar)
        self.spinBoxH.setMinimumSize(QtCore.QSize(72, 0))
        self.spinBoxH.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.spinBoxH.setObjectName("spinBoxH")
        self.horizontalLayout.addWidget(self.spinBoxH)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.pushButton = QtWidgets.QPushButton(self.toolbar)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.verticalLayout.addWidget(self.toolbar)
        self.line = QtWidgets.QFrame(QCrop)
        self.line.setFrameShape(QtWidgets.QFrame.HLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.scrollArea = QtWidgets.QScrollArea(QCrop)
        self.scrollArea.viewport().setProperty("cursor", QtGui.QCursor(QtCore.Qt.CrossCursor))
        self.scrollArea.setAutoFillBackground(True)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.workspace = Workspace()
        self.workspace.setGeometry(QtCore.QRect(0, 0, 638, 478))
        palette = QtGui.QPalette()
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(51, 51, 51))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(51, 51, 51))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
        brush = QtGui.QBrush(QtGui.QColor(51, 51, 51))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
        brush = QtGui.QBrush(QtGui.QColor(51, 51, 51))
        brush.setStyle(QtCore.Qt.SolidPattern)
        palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
        self.workspace.setPalette(palette)
        self.workspace.setObjectName("workspace")
        self.gridLayout = QtWidgets.QGridLayout(self.workspace)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        spacerItem1 = QtWidgets.QSpacerItem(20, 224, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem1, 2, 2, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(304, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 1, 3, 1, 1)
        self.frame = QtWidgets.QFrame(self.workspace)
        self.frame.setFrameShape(QtWidgets.QFrame.Box)
        self.frame.setFrameShadow(QtWidgets.QFrame.Plain)
        self.frame.setObjectName("frame")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.selector = AreaSelector(self.frame)
        self.selector.setStyleSheet("background:url(:/img/grid-pattern.png);")
        self.selector.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.selector.setText("")
        self.selector.setAlignment(QtCore.Qt.AlignCenter)
        self.selector.setObjectName("selector")
        self.verticalLayout_2.addWidget(self.selector)
        self.gridLayout.addWidget(self.frame, 1, 2, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(305, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem3, 1, 0, 1, 1)
        spacerItem4 = QtWidgets.QSpacerItem(20, 225, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem4, 0, 2, 1, 1)
        self.scrollArea.setWidget(self.workspace)
        self.verticalLayout.addWidget(self.scrollArea)
        self.buttonBox = QtWidgets.QDialogButtonBox(QCrop)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(QCrop)
        self.buttonBox.accepted.connect(QCrop.accept)
        self.buttonBox.rejected.connect(QCrop.reject)
        self.selector.area_changed.connect(QCrop.update_crop_values)
        self.spinBoxX.valueChanged['int'].connect(QCrop.update_crop_area)
        self.spinBoxY.valueChanged['int'].connect(QCrop.update_crop_area)
        self.spinBoxW.valueChanged['int'].connect(QCrop.update_crop_area)
        self.spinBoxH.valueChanged['int'].connect(QCrop.update_crop_area)
        self.pushButton.clicked.connect(QCrop.reset_crop_values)
        QtCore.QMetaObject.connectSlotsByName(QCrop)

    def retranslateUi(self, QCrop):
        _translate = QtCore.QCoreApplication.translate
        QCrop.setWindowTitle(_translate("QCrop", "QCrop"))
        self.labelX.setText(_translate("QCrop", "X:"))
        self.spinBoxX.setSuffix(_translate("QCrop", "px"))
        self.labelY.setText(_translate("QCrop", "Y:"))
        self.spinBoxY.setSuffix(_translate("QCrop", "px"))
        self.labelW.setText(_translate("QCrop", "Width:"))
        self.spinBoxW.setSuffix(_translate("QCrop", "px"))
        self.labelH.setText(_translate("QCrop", "Height:"))
        self.spinBoxH.setSuffix(_translate("QCrop", "px"))
        self.pushButton.setText(_translate("QCrop", "Reset"))
from qcrop.area_selector import AreaSelector, Workspace
from qcrop import assets_rc
