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

# Form implementation generated from reading ui file 'LDMP/gui\DlgCalculateSOC.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_DlgCalculateSOC(object):
    def setupUi(self, DlgCalculateSOC):
        DlgCalculateSOC.setObjectName("DlgCalculateSOC")
        DlgCalculateSOC.resize(1100, 758)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(DlgCalculateSOC.sizePolicy().hasHeightForWidth())
        DlgCalculateSOC.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(DlgCalculateSOC)
        self.verticalLayout.setObjectName("verticalLayout")
        self.splitter = QtWidgets.QSplitter(DlgCalculateSOC)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setHandleWidth(16)
        self.splitter.setObjectName("splitter")
        self.configurations = QtWidgets.QFrame(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(2)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.configurations.sizePolicy().hasHeightForWidth())
        self.configurations.setSizePolicy(sizePolicy)
        self.configurations.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.configurations.setFrameShadow(QtWidgets.QFrame.Raised)
        self.configurations.setObjectName("configurations")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.configurations)
        self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.scrollArea = QtWidgets.QScrollArea(self.configurations)
        self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 808, 707))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout_5.setObjectName("verticalLayout_5")
        self.setup_frame = QtWidgets.QFrame(self.scrollAreaWidgetContents)
        self.setup_frame.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setup_frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.setup_frame.setObjectName("setup_frame")
        self.verticalLayout_5.addWidget(self.setup_frame)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(5, -1, 9, 4)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.region_la = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.region_la.setText("")
        self.region_la.setWordWrap(True)
        self.region_la.setObjectName("region_la")
        self.horizontalLayout.addWidget(self.region_la)
        self.region_button = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.region_button.setObjectName("region_button")
        self.horizontalLayout.addWidget(self.region_button)
        self.verticalLayout_5.addLayout(self.horizontalLayout)
        self.execution_name_la = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.execution_name_la.setObjectName("execution_name_la")
        self.verticalLayout_5.addWidget(self.execution_name_la)
        self.execution_name_le = QtWidgets.QLineEdit(self.scrollAreaWidgetContents)
        self.execution_name_le.setObjectName("execution_name_le")
        self.verticalLayout_5.addWidget(self.execution_name_le)
        self.task_notes_la = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.task_notes_la.setObjectName("task_notes_la")
        self.verticalLayout_5.addWidget(self.task_notes_la)
        self.task_notes = QtWidgets.QTextEdit(self.scrollAreaWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.task_notes.sizePolicy().hasHeightForWidth())
        self.task_notes.setSizePolicy(sizePolicy)
        self.task_notes.setMinimumSize(QtCore.QSize(0, 0))
        self.task_notes.setMaximumSize(QtCore.QSize(16777215, 100))
        self.task_notes.setObjectName("task_notes")
        self.verticalLayout_5.addWidget(self.task_notes)
        self.advance_configurations = QgsCollapsibleGroupBox(self.scrollAreaWidgetContents)
        self.advance_configurations.setCollapsed(True)
        self.advance_configurations.setObjectName("advance_configurations")
        self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.advance_configurations)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.groupBox = QtWidgets.QGroupBox(self.advance_configurations)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.fl_radio_chooseRegime = QtWidgets.QRadioButton(self.groupBox)
        self.fl_radio_chooseRegime.setMinimumSize(QtCore.QSize(0, 30))
        self.fl_radio_chooseRegime.setObjectName("fl_radio_chooseRegime")
        self.gridLayout_2.addWidget(self.fl_radio_chooseRegime, 1, 0, 1, 1)
        self.fl_radio_custom = QtWidgets.QRadioButton(self.groupBox)
        self.fl_radio_custom.setMinimumSize(QtCore.QSize(0, 30))
        self.fl_radio_custom.setObjectName("fl_radio_custom")
        self.gridLayout_2.addWidget(self.fl_radio_custom, 2, 0, 1, 1)
        self.fl_chooseRegime_comboBox = QtWidgets.QComboBox(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.fl_chooseRegime_comboBox.sizePolicy().hasHeightForWidth())
        self.fl_chooseRegime_comboBox.setSizePolicy(sizePolicy)
        self.fl_chooseRegime_comboBox.setMinimumSize(QtCore.QSize(0, 30))
        self.fl_chooseRegime_comboBox.setObjectName("fl_chooseRegime_comboBox")
        self.gridLayout_2.addWidget(self.fl_chooseRegime_comboBox, 1, 1, 1, 1)
        self.fl_custom_lineEdit = QtWidgets.QLineEdit(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.fl_custom_lineEdit.sizePolicy().hasHeightForWidth())
        self.fl_custom_lineEdit.setSizePolicy(sizePolicy)
        self.fl_custom_lineEdit.setMinimumSize(QtCore.QSize(0, 30))
        self.fl_custom_lineEdit.setInputMethodHints(QtCore.Qt.ImhNone)
        self.fl_custom_lineEdit.setMaxLength(6)
        self.fl_custom_lineEdit.setPlaceholderText("")
        self.fl_custom_lineEdit.setObjectName("fl_custom_lineEdit")
        self.gridLayout_2.addWidget(self.fl_custom_lineEdit, 2, 1, 1, 1)
        self.fl_radio_default = QtWidgets.QRadioButton(self.groupBox)
        self.fl_radio_default.setMinimumSize(QtCore.QSize(0, 30))
        self.fl_radio_default.setChecked(True)
        self.fl_radio_default.setObjectName("fl_radio_default")
        self.gridLayout_2.addWidget(self.fl_radio_default, 0, 0, 1, 2)
        self.verticalLayout_4.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(self.advance_configurations)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
        self.groupBox_2.setSizePolicy(sizePolicy)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.download_annual_lc = QtWidgets.QCheckBox(self.groupBox_2)
        self.download_annual_lc.setMinimumSize(QtCore.QSize(0, 30))
        self.download_annual_lc.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.download_annual_lc.setObjectName("download_annual_lc")
        self.gridLayout_4.addWidget(self.download_annual_lc, 1, 0, 1, 1)
        self.verticalLayout_4.addWidget(self.groupBox_2)
        self.groupBox_custom_SOC = QtWidgets.QGroupBox(self.advance_configurations)
        self.groupBox_custom_SOC.setCheckable(True)
        self.groupBox_custom_SOC.setChecked(False)
        self.groupBox_custom_SOC.setObjectName("groupBox_custom_SOC")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_custom_SOC)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.comboBox_custom_soc = WidgetDataIOSelectTELayerImport(self.groupBox_custom_SOC)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBox_custom_soc.sizePolicy().hasHeightForWidth())
        self.comboBox_custom_soc.setSizePolicy(sizePolicy)
        self.comboBox_custom_soc.setMinimumSize(QtCore.QSize(0, 30))
        self.comboBox_custom_soc.setProperty("layer_type", "Soil organic carbon")
        self.comboBox_custom_soc.setObjectName("comboBox_custom_soc")
        self.verticalLayout_2.addWidget(self.comboBox_custom_soc)
        self.verticalLayout_4.addWidget(self.groupBox_custom_SOC)
        spacerItem = QtWidgets.QSpacerItem(20, 66, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_4.addItem(spacerItem)
        self.verticalLayout_5.addWidget(self.advance_configurations)
        spacerItem1 = QtWidgets.QSpacerItem(20, 427, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_5.addItem(spacerItem1)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.verticalLayout_3.addWidget(self.scrollArea)
        self.alg_help = QtWidgets.QTextBrowser(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.alg_help.sizePolicy().hasHeightForWidth())
        self.alg_help.setSizePolicy(sizePolicy)
        self.alg_help.setAccessibleName("")
        self.alg_help.setOpenExternalLinks(True)
        self.alg_help.setOpenLinks(True)
        self.alg_help.setObjectName("alg_help")
        self.verticalLayout.addWidget(self.splitter)
        self.button_box = QtWidgets.QDialogButtonBox(DlgCalculateSOC)
        self.button_box.setOrientation(QtCore.Qt.Horizontal)
        self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Help|QtWidgets.QDialogButtonBox.Ok)
        self.button_box.setObjectName("button_box")
        self.verticalLayout.addWidget(self.button_box)

        self.retranslateUi(DlgCalculateSOC)
        self.button_box.accepted.connect(DlgCalculateSOC.accept)
        self.button_box.rejected.connect(DlgCalculateSOC.reject)
        QtCore.QMetaObject.connectSlotsByName(DlgCalculateSOC)

    def retranslateUi(self, DlgCalculateSOC):
        _translate = QtCore.QCoreApplication.translate
        DlgCalculateSOC.setWindowTitle(_translate("DlgCalculateSOC", "Soil Organic Carbon | Land Degradation"))
        self.scrollArea.setToolTip(_translate("DlgCalculateSOC", "Input for the name that will be assigned to the execution task, if not filled the algorithm name will be used as the task name."))
        self.region_la.setToolTip(_translate("DlgCalculateSOC", "The current selected region of interest"))
        self.region_button.setToolTip(_translate("DlgCalculateSOC", "<html><head/><body><p>Opens settings dialog in order to change region of interest.</p></body></html>"))
        self.region_button.setText(_translate("DlgCalculateSOC", "Change region"))
        self.execution_name_la.setText(_translate("DlgCalculateSOC", "Execution name:"))
        self.execution_name_le.setToolTip(_translate("DlgCalculateSOC", "<html><head/><body><p>Input for the name that will be assigned to the execution task,if not filled the algorithm name will be used as the task name.</p></body></html>"))
        self.task_notes_la.setText(_translate("DlgCalculateSOC", "Notes:"))
        self.task_notes.setToolTip(_translate("DlgCalculateSOC", "User notes associated with the executed task."))
        self.advance_configurations.setTitle(_translate("DlgCalculateSOC", "Advanced configuration"))
        self.groupBox.setTitle(_translate("DlgCalculateSOC", "Climate regime"))
        self.fl_radio_chooseRegime.setText(_translate("DlgCalculateSOC", "Specify regime"))
        self.fl_radio_custom.setText(_translate("DlgCalculateSOC", "Custom value"))
        self.fl_radio_default.setText(_translate("DlgCalculateSOC", "Default (determined per-pixel using global climate data)"))
        self.groupBox_2.setTitle(_translate("DlgCalculateSOC", "Additional files to download"))
        self.download_annual_lc.setText(_translate("DlgCalculateSOC", "Download annual land cover layers (only first and last land cover layer are downloaded by default)"))
        self.groupBox_custom_SOC.setTitle(_translate("DlgCalculateSOC", "Custom initial soil organic carbon dataset"))
        self.alg_help.setHtml(_translate("DlgCalculateSOC", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Ubuntu\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<h3 style=\" margin-top:14px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:large; font-weight:600;\">Soil organic carbon</span></h3>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">The third sub-indicator for monitoring land degradation as part of the SDG process quantifies changes in soil organic carbon (SOC) over the reporting period. Changes in SOC are particularly difficult to assess for several reasons, some of them being the high spatial variability of soil properties, the time and cost intensiveness of conducting representative soil surveys and the lack of time series data on SOC for most regions of the world. To address some of the limitations, a combined land cover/SOC method is used in Trends.Earth to estimate changes in SOC and identify potentially degraded areas. The indicator is computed as follows:</p>\n"
"<ol style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Determine the SOC reference values. Trends.Earth uses SoilGrids 250m carbon stocks for the first 30 cm of the soil profile as the reference values for calculation (NOTE: SoilGrids uses information from a variety of data sources and ranging from many years to produce this product, therefore assigning a date for calculations purposes could cause inaccuracies in the stock change calculations).</li>\n"
"<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Reclassify the land cover maps to the 7 land cover classes needed for reporting to the UNCCD (forest, grassland, cropland, wetland, artificial area, bare land and water). Ideally annual land cover maps are preferred, but at least land cover maps for the starting and end years are needed.</li>\n"
"<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">To estimate the changes in C stocks for the reporting period C conversion coefficients for changes in land use, management and inputs are recommended by the IPCC and the UNCCD. However, spatially explicit information on management and C inputs is not available for most regions. As such, only land use conversion coefficient can be applied for estimating changes in C stocks (using land cover as a proxy for land use). The coefficients used were the result of a literature review performed by the UNCCD and are presented at the <a href=\"http://trends.earth/docs/en/background/understanding_indicators15.html#soil-organic-carbon\"><span style=\" text-decoration: underline; color:#0000ff;\">Trends.Earth website</span></a>. Those coefficients represent the proportional in C stocks after 20 years of land cover change.</li>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:1; text-indent:0px;\">Changes in SOC are better studied for land cover transitions involving agriculture, and for that reason there is a different set of coefficients for each of the main global climatic regions: Temperate Dry (f = 0.80), Temperate Moist (f = 0.69), Tropical Dry (f = 0.58), Tropical Moist (f = 0.48), and Tropical Montane (f = 0.64).</p>\n"
"<li style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Compute relative different in SOC between the baseline and the target period, areas which experienced a loss in SOC of 10% of more during the reporting period will be considered potentially degraded, and areas experiencing a gain of 10% or more as potentially improved.</li></ol>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"http://trends.earth/docs/en/background/understanding_indicators15.html#soil-organic-carbon\"><span style=\" text-decoration: underline; color:#0000ff;\">More information on the Soil Organic Carbon SDG 15.3.1 sub-indicator</span></a></p></body></html>"))
from LDMP.data_io import WidgetDataIOSelectTELayerImport
from qgis.gui import QgsCollapsibleGroupBox


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    DlgCalculateSOC = QtWidgets.QDialog()
    ui = Ui_DlgCalculateSOC()
    ui.setupUi(DlgCalculateSOC)
    DlgCalculateSOC.show()
    sys.exit(app.exec_())
