#This is part of the source code for the Paineira Graphical User Interface - Iguape
#The code is distributed under the GNU GPL-3.0 License. Please refer to the main page (https://github.com/cnpem/iguape) for more information

"""
Main GUI python script. This GUI was built with PyQt5. The .ui file can be found inside the GUI folder.
"""

from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_pk_window(object):
    def setupUi(self, pk_window):
        pk_window.setObjectName("pk_window")
        pk_window.resize(829, 594)
        self.verticalLayout = QtWidgets.QVBoxLayout(pk_window)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.theta_interval_label = QtWidgets.QLabel(pk_window)
        self.theta_interval_label.setObjectName("theta_interval_label")
        self.gridLayout.addWidget(self.theta_interval_label, 9, 0, 1, 1)
        self.preview_button = QtWidgets.QPushButton(pk_window)
        self.preview_button.setObjectName("preview_button")
        self.gridLayout.addWidget(self.preview_button, 3, 3, 1, 1)
        self.pk_button = QtWidgets.QPushButton(pk_window)
        self.pk_button.setObjectName("pk_button")
        self.gridLayout.addWidget(self.pk_button, 4, 3, 1, 1)
        self.pk_combo_box = QtWidgets.QComboBox(pk_window)
        self.pk_combo_box.setObjectName("pk_combo_box")
        self.pk_combo_box.addItem("")
        self.pk_combo_box.addItem("")
        self.gridLayout.addWidget(self.pk_combo_box, 6, 1, 1, 1)
        self.xrd_label = QtWidgets.QLabel(pk_window)
        self.xrd_label.setObjectName("xrd_label")
        self.gridLayout.addWidget(self.xrd_label, 3, 0, 1, 1)
        self.distance_label = QtWidgets.QLabel(pk_window)
        self.distance_label.setObjectName("distance_label")
        self.gridLayout.addWidget(self.distance_label, 6, 2, 1, 1)
        self.distance_spinBox = QtWidgets.QSpinBox(pk_window)
        self.distance_spinBox.setWrapping(False)
        self.distance_spinBox.setReadOnly(False)
        self.distance_spinBox.setMinimum(25)
        self.distance_spinBox.setObjectName("distance_spinBox")
        self.gridLayout.addWidget(self.distance_spinBox, 6, 3, 1, 1)
        self.interval_label = QtWidgets.QLabel(pk_window)
        self.interval_label.setText("")
        self.interval_label.setObjectName("interval_label")
        self.gridLayout.addWidget(self.interval_label, 9, 1, 1, 1)
        self.pk_label = QtWidgets.QLabel(pk_window)
        self.pk_label.setObjectName("pk_label")
        self.gridLayout.addWidget(self.pk_label, 6, 0, 1, 1)
        self.pk_frame = QtWidgets.QFrame(pk_window)
        self.pk_frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.pk_frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.pk_frame.setObjectName("pk_frame")
        self.gridLayout.addWidget(self.pk_frame, 1, 0, 2, 4)
        self.xrd_combo_box = QtWidgets.QComboBox(pk_window)
        self.xrd_combo_box.setObjectName("xrd_combo_box")
        self.gridLayout.addWidget(self.xrd_combo_box, 3, 1, 1, 1)
        self.bgk_label = QtWidgets.QLabel(pk_window)
        self.bgk_label.setObjectName("bgk_label")
        self.gridLayout.addWidget(self.bgk_label, 4, 0, 1, 1)
        self.bgk_combo_box = QtWidgets.QComboBox(pk_window)
        self.bgk_combo_box.setObjectName("bgk_combo_box")
        self.bgk_combo_box.addItem("")
        self.bgk_combo_box.addItem("")
        self.gridLayout.addWidget(self.bgk_combo_box, 4, 1, 1, 1)
        self.clear_plot_button = QtWidgets.QPushButton(pk_window)
        self.clear_plot_button.setObjectName("clear_plot_button")
        self.gridLayout.addWidget(self.clear_plot_button, 3, 2, 1, 1)
        self.height_label = QtWidgets.QLabel(pk_window)
        self.height_label.setObjectName("height_label")
        self.gridLayout.addWidget(self.height_label, 9, 2, 1, 1)
        self.height_spinBox = QtWidgets.QSpinBox(pk_window)
        self.height_spinBox.setMinimum(1)
        self.height_spinBox.setObjectName("height_spinBox")
        self.gridLayout.addWidget(self.height_spinBox, 9, 3, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)

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

    def retranslateUi(self, pk_window):
        _translate = QtCore.QCoreApplication.translate
        pk_window.setWindowTitle(_translate("pk_window", "Dialog"))
        self.theta_interval_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">2θ Interval Selected:</span></p></body></html>"))
        self.preview_button.setText(_translate("pk_window", "Preview"))
        self.pk_button.setText(_translate("pk_window", "Fit"))
        self.pk_combo_box.setItemText(0, _translate("pk_window", "PseudoVoigt Model"))
        self.pk_combo_box.setItemText(1, _translate("pk_window", "Split PseudoVoigt Model - 2x PseudoVoigt"))
        self.xrd_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">XRD pattern:</span></p></body></html>"))
        self.distance_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">Distance:</span></p></body></html>"))
        self.pk_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">Peak Profile:</span></p></body></html>"))
        self.bgk_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">Background Model:</span></p></body></html>"))
        self.bgk_combo_box.setItemText(0, _translate("pk_window", "Linear Model"))
        self.bgk_combo_box.setItemText(1, _translate("pk_window", "Spline Model"))
        self.clear_plot_button.setText(_translate("pk_window", "Clear Plot"))
        self.height_label.setText(_translate("pk_window", "<html><head/><body><p><span style=\" text-decoration: underline;\">Height (x1e+09 a.u.):</span></p></body></html>"))
