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

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

from PyQt5 import QtCore, QtGui, QtWidgets

#Scaling based on the screen resolution
import ctypes
user32 = ctypes.windll.user32
screensize = user32.GetSystemMetrics(0), user32.GetSystemMetrics(1)

f1 = screensize[0]*2.5/3840
f2 = screensize[1]*2.5/2160

class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(round(f1*731), round(f2*626))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(round(f1*420), round(f2*520), round(f1*211), round(f2*21)))
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(round(f1*420), round(f2*550), round(f1*211), round(f2*21)))
        self.pushButton_2.setObjectName("pushButton_2")
        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox.setGeometry(QtCore.QRect(round(f1*20), round(f2*6), round(f1*441), round(f2*121)))
        self.groupBox.setObjectName("groupBox")
        self.lineEdit = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit.setGeometry(QtCore.QRect(round(f1*130), round(f2*26), round(f1*41), round(f2*20)))
        self.lineEdit.setObjectName("lineEdit")
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setGeometry(QtCore.QRect(round(f1*100), round(f2*26), round(f1*21), round(f2*16)))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setGeometry(QtCore.QRect(round(f1*110), round(f2*56), round(f1*16), round(f2*16)))
        self.label_2.setObjectName("label_2")
        self.lineEdit_2 = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit_2.setGeometry(QtCore.QRect(round(f1*130), round(f2*56), round(f1*41), round(f2*20)))
        self.lineEdit_2.setObjectName("lineEdit_2")
        self.label_3 = QtWidgets.QLabel(self.groupBox)
        self.label_3.setGeometry(QtCore.QRect(round(f1*50), round(f2*95), round(f1*71), round(f2*20)))
        self.label_3.setObjectName("label_3")
        self.label_17 = QtWidgets.QLabel(self.groupBox)
        self.label_17.setGeometry(QtCore.QRect(round(f1*29), round(f2*80), round(f1*100), round(f2*20)))
        self.label_17.setObjectName("label_17")
        self.lineEdit_18 = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit_18.setGeometry(QtCore.QRect(round(f1*130), round(f2*86), round(f1*41), round(f2*20)))
        self.lineEdit_18.setObjectName("lineEdit_18")
        self.lineEdit_15 = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit_15.setGeometry(QtCore.QRect(round(f1*370), round(f2*70), round(f1*41), round(f2*20)))
        self.lineEdit_15.setObjectName("lineEdit_15")
        self.lineEdit_3 = QtWidgets.QLineEdit(self.groupBox)
        self.lineEdit_3.setGeometry(QtCore.QRect(round(f1*370), round(f2*40), round(f1*41), round(f2*20)))
        self.lineEdit_3.setObjectName("lineEdit_3")
        self.label_10 = QtWidgets.QLabel(self.groupBox)
        self.label_10.setGeometry(QtCore.QRect(round(f1*230), round(f2*60), round(f1*141), round(f2*41)))
        self.label_10.setObjectName("label_10")
        self.label_5 = QtWidgets.QLabel(self.groupBox)
        self.label_5.setGeometry(QtCore.QRect(round(f1*222), round(f2*40), round(f1*151), round(f2*20)))
        self.label_5.setObjectName("label_5")
        self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_3.setGeometry(QtCore.QRect(round(f1*80), round(f2*546), round(f1*91), round(f2*40)))
        self.pushButton_3.setObjectName("pushButton_3")
        self.lineEdit_14 = QtWidgets.QLineEdit(self.centralwidget)
        self.lineEdit_14.setGeometry(QtCore.QRect(round(f1*490), round(f2*490), round(f1*171), round(f2*21)))
        self.lineEdit_14.setObjectName("lineEdit_14")
        self.pushButton_5 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_5.setGeometry(QtCore.QRect(round(f1*400), round(f2*490), round(f1*81), round(f2*21)))
        self.pushButton_5.setObjectName("pushButton_5")
        self.pushButton_6 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_6.setGeometry(QtCore.QRect(round(f1*180), round(f2*546), round(f1*91), round(f2*40)))
        self.pushButton_6.setObjectName("pushButton_6")
        self.lineEdit_21 = QtWidgets.QLineEdit(self.centralwidget)
        self.lineEdit_21.setGeometry(QtCore.QRect(round(f1*153), round(f2*516), round(f1*171), round(f2*19)))
        self.lineEdit_21.setObjectName("lineEdit_21")
        self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_4.setGeometry(QtCore.QRect(round(f1*420), round(f2*580), round(f1*211), round(f2*21)))
        self.pushButton_4.setObjectName("pushButton_4")
        self.groupBox_4 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_4.setGeometry(QtCore.QRect(round(f1*11), round(f2*330), round(f1*271), round(f2*141)))
        self.groupBox_4.setObjectName("groupBox_4")
        self.radioButton = QtWidgets.QRadioButton(self.groupBox_4)
        self.radioButton.setGeometry(QtCore.QRect(round(f1*20), round(f2*30), round(f1*211), round(f2*21)))
        self.radioButton.setObjectName("radioButton")
        self.lineEdit_22 = QtWidgets.QLineEdit(self.groupBox_4)
        self.lineEdit_22.setEnabled(False)
        self.lineEdit_22.setGeometry(QtCore.QRect(round(f1*220), round(f2*80), round(f1*41), round(f2*20)))
        self.lineEdit_22.setObjectName("lineEdit_22")
        self.label_23 = QtWidgets.QLabel(self.groupBox_4)
        self.label_23.setGeometry(QtCore.QRect(round(f1*20), round(f2*80), round(f1*121), round(f2*16)))
        self.label_23.setObjectName("label_23")
        self.label_11 = QtWidgets.QLabel(self.groupBox_4)
        self.label_11.setGeometry(QtCore.QRect(round(f1*40), round(f2*50), round(f1*191), round(f2*16)))
        self.label_11.setObjectName("label_11")
        self.lineEdit_19 = QtWidgets.QLineEdit(self.groupBox_4)
        self.lineEdit_19.setEnabled(False)
        self.lineEdit_19.setGeometry(QtCore.QRect(round(f1*220), round(f2*110), round(f1*41), round(f2*20)))
        self.lineEdit_19.setObjectName("lineEdit_19")
        self.label_18 = QtWidgets.QLabel(self.groupBox_4)
        self.label_18.setGeometry(QtCore.QRect(round(f1*20), round(f2*110), round(f1*191), round(f2*21)))
        self.label_18.setObjectName("label_18")
        self.groupBox_5 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_5.setGeometry(QtCore.QRect(round(f1*301), round(f2*330), round(f1*421), round(f2*141)))
        self.groupBox_5.setObjectName("groupBox_5")
        self.label_20 = QtWidgets.QLabel(self.groupBox_5)
        self.label_20.setGeometry(QtCore.QRect(round(f1*10), round(f2*45), round(f1*401), round(f2*21)))
        self.label_20.setObjectName("label_20")
        self.lineEdit_23 = QtWidgets.QLineEdit(self.groupBox_5)
        self.lineEdit_23.setEnabled(False)
        self.lineEdit_23.setGeometry(QtCore.QRect(round(f1*10), round(f2*65), round(f1*391), round(f2*20)))
        self.lineEdit_23.setObjectName("lineEdit_23")
        self.label_25 = QtWidgets.QLabel(self.groupBox_5)
        self.label_25.setGeometry(QtCore.QRect(round(f1*10), round(f2*89), round(f1*331), round(f2*21)))
        self.label_25.setObjectName("label_25")
        self.lineEdit_24 = QtWidgets.QLineEdit(self.groupBox_5)
        self.lineEdit_24.setEnabled(False)
        self.lineEdit_24.setGeometry(QtCore.QRect(round(f1*10), round(f2*109), round(f1*391), round(f2*20)))
        self.lineEdit_24.setText("")
        self.lineEdit_24.setObjectName("lineEdit_24")
        self.radioButton_2 = QtWidgets.QRadioButton(self.groupBox_5)
        self.radioButton_2.setGeometry(QtCore.QRect(round(f1*10), round(f2*23), round(f1*141), round(f2*21)))
        self.radioButton_2.setObjectName("radioButton_2")
        self.label_26 = QtWidgets.QLabel(self.groupBox_5)
        self.label_26.setGeometry(QtCore.QRect(round(f1*170), round(f2*25), round(f1*231), round(f2*16)))
        self.label_26.setObjectName("label_26")
        self.lineEdit_25 = QtWidgets.QLineEdit(self.groupBox_5)
        self.lineEdit_25.setEnabled(False)
        self.lineEdit_25.setGeometry(QtCore.QRect(round(f1*360), round(f2*23), round(f1*41), round(f2*20)))
        self.lineEdit_25.setObjectName("lineEdit_25")
        self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_2.setGeometry(QtCore.QRect(round(f1*520), round(f2*136), round(f1*161), round(f2*181)))
        self.groupBox_2.setObjectName("groupBox_2")
        self.lineEdit_4 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_4.setGeometry(QtCore.QRect(round(f1*104), round(f2*61), round(f1*41), round(f2*20)))
        self.lineEdit_4.setObjectName("lineEdit_4")
        self.label_6 = QtWidgets.QLabel(self.groupBox_2)
        self.label_6.setGeometry(QtCore.QRect(round(f1*20), round(f2*61), round(f1*81), round(f2*16)))
        self.label_6.setObjectName("label_6")
        self.lineEdit_5 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_5.setGeometry(QtCore.QRect(round(f1*104), round(f2*31), round(f1*41), round(f2*20)))
        self.lineEdit_5.setObjectName("lineEdit_5")
        self.label_4 = QtWidgets.QLabel(self.groupBox_2)
        self.label_4.setGeometry(QtCore.QRect(round(f1*14), round(f2*31), round(f1*91), round(f2*20)))
        self.label_4.setObjectName("label_4")
        self.label_16 = QtWidgets.QLabel(self.groupBox_2)
        self.label_16.setGeometry(QtCore.QRect(round(f1*30), round(f2*91), round(f1*71), round(f2*16)))
        self.label_16.setObjectName("label_16")
        self.lineEdit_17 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_17.setGeometry(QtCore.QRect(round(f1*104), round(f2*91), round(f1*41), round(f2*20)))
        self.lineEdit_17.setObjectName("lineEdit_17")
        self.lineEdit_20 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_20.setGeometry(QtCore.QRect(round(f1*104), round(f2*121), round(f1*41), round(f2*20)))
        self.lineEdit_20.setObjectName("lineEdit_20")
        self.label_19 = QtWidgets.QLabel(self.groupBox_2)
        self.label_19.setGeometry(QtCore.QRect(round(f1*30), round(f2*121), round(f1*71), round(f2*16)))
        self.label_19.setObjectName("label_19")
        self.lineEdit_12 = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit_12.setGeometry(QtCore.QRect(round(f1*104), round(f2*151), round(f1*41), round(f2*20)))
        self.lineEdit_12.setObjectName("lineEdit_12")
        self.label_13 = QtWidgets.QLabel(self.groupBox_2)
        self.label_13.setGeometry(QtCore.QRect(round(f1*60), round(f2*151), round(f1*16), round(f2*20)))
        self.label_13.setObjectName("label_13")
        self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_3.setGeometry(QtCore.QRect(round(f1*530), round(f2*16), round(f1*141), round(f2*91)))
        self.groupBox_3.setObjectName("groupBox_3")
        self.lineEdit_11 = QtWidgets.QLineEdit(self.groupBox_3)
        self.lineEdit_11.setGeometry(QtCore.QRect(round(f1*70), round(f2*60), round(f1*41), round(f2*20)))
        self.lineEdit_11.setObjectName("lineEdit_11")
        self.lineEdit_13 = QtWidgets.QLineEdit(self.groupBox_3)
        self.lineEdit_13.setGeometry(QtCore.QRect(round(f1*70), round(f2*30), round(f1*41), round(f2*20)))
        self.lineEdit_13.setObjectName("lineEdit_13")
        self.label_9 = QtWidgets.QLabel(self.groupBox_3)
        self.label_9.setGeometry(QtCore.QRect(round(f1*25), round(f2*60), round(f1*41), round(f2*20)))
        self.label_9.setObjectName("label_9")
        self.label_24 = QtWidgets.QLabel(self.groupBox_3)
        self.label_24.setGeometry(QtCore.QRect(round(f1*30), round(f2*30), round(f1*31), round(f2*21)))
        self.label_24.setObjectName("label_24")
        self.label_15 = QtWidgets.QLabel(self.centralwidget)
        self.label_15.setGeometry(QtCore.QRect(round(f1*60), round(f2*516), round(f1* 91), round(f2*16)))
        self.label_15.setObjectName("label_15")
        self.groupBox_6 = QtWidgets.QGroupBox(self.centralwidget)
        self.groupBox_6.setGeometry(QtCore.QRect(round(f1*20), round(f2*146), round(f1*441), round(f2*171)))
        self.groupBox_6.setObjectName("groupBox_6")
        self.label_14 = QtWidgets.QLabel(self.groupBox_6)
        self.label_14.setGeometry(QtCore.QRect(round(f1*10), round(f2*60), round(f1*141), round(f2*21)))
        self.label_14.setObjectName("label_14")
        self.lineEdit_16 = QtWidgets.QLineEdit(self.groupBox_6)
        self.lineEdit_16.setGeometry(QtCore.QRect(round(f1*150), round(f2*60), round(f1*41), round(f2*20)))
        self.lineEdit_16.setObjectName("lineEdit_16")
        self.comboBox_2 = QtWidgets.QComboBox(self.groupBox_6)
        self.comboBox_2.setEnabled(True)
        self.comboBox_2.setGeometry(QtCore.QRect(round(f1*100), round(f2*30), round(f1*131), round(f2*21)))
        self.comboBox_2.setEditable(False)
        self.comboBox_2.setDuplicatesEnabled(True)
        self.comboBox_2.setObjectName("comboBox_2")
        self.comboBox_2.addItem("")
        self.comboBox_2.addItem("")
        self.pushButton_8 = QtWidgets.QPushButton(self.groupBox_6)
        self.pushButton_8.setGeometry(QtCore.QRect(round(f1*250), round(f2*75), round(f1*181), round(f2*31)))
        self.pushButton_8.setObjectName("pushButton_8")
        self.comboBox = QtWidgets.QComboBox(self.groupBox_6)
        self.comboBox.setEnabled(True)
        self.comboBox.setGeometry(QtCore.QRect(round(f1*100), round(f2*90), round(f1*131), round(f2*21)))
        self.comboBox.setEditable(False)
        self.comboBox.setDuplicatesEnabled(True)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.label_12 = QtWidgets.QLabel(self.groupBox_6)
        self.label_12.setGeometry(QtCore.QRect(round(f1*10), round(f2*90), round(f1*71), round(f2*20)))
        self.label_12.setObjectName("label_12")
        self.pushButton_7 = QtWidgets.QPushButton(self.groupBox_6)
        self.pushButton_7.setEnabled(True)
        self.pushButton_7.setGeometry(QtCore.QRect(round(f1*80), round(f2*120), round(f1*101), round(f2*41)))
        self.pushButton_7.setObjectName("pushButton_7")
        self.line = QtWidgets.QFrame(self.groupBox_6)
        self.line.setGeometry(QtCore.QRect(round(f1*239), round(f2*19), round(f1*20), round(f2*151)))
        self.line.setFrameShadow(QtWidgets.QFrame.Plain)
        self.line.setLineWidth(1)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setObjectName("line")
        self.label_21 = QtWidgets.QLabel(self.groupBox_6)
        self.label_21.setGeometry(QtCore.QRect(round(f1*10), round(f2*30), round(f1*81), round(f2*20)))
        self.label_21.setObjectName("label_21")
        self.groupBox.raise_()
        self.pushButton.raise_()
        self.pushButton_2.raise_()
        self.pushButton_3.raise_()
        self.lineEdit_14.raise_()
        self.pushButton_5.raise_()
        self.pushButton_6.raise_()
        self.lineEdit_21.raise_()
        self.pushButton_4.raise_()
        self.groupBox_4.raise_()
        self.groupBox_5.raise_()
        self.groupBox_2.raise_()
        self.groupBox_3.raise_()
        self.label_15.raise_()
        self.groupBox_6.raise_()
        MainWindow.setCentralWidget(self.centralwidget)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.comboBox_2.setCurrentIndex(0)
        self.comboBox.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "PyFocus"))
        self.pushButton.setText(_translate("MainWindow", "Save text with used parameters"))
        self.pushButton_2.setText(_translate("MainWindow", "Save intensity on XZ and XY planes"))
        self.groupBox.setTitle(_translate("MainWindow", "Optical system"))
        self.lineEdit.setText(_translate("MainWindow", "1.4"))
        self.label.setText(_translate("MainWindow", "NA"))
        self.label_2.setText(_translate("MainWindow", "n"))
        self.lineEdit_2.setText(_translate("MainWindow", "1.5"))
        self.label_3.setText(_translate("MainWindow", "radius (mm)"))
        self.label_17.setText(_translate("MainWindow", "Objective aperture"))
        self.lineEdit_18.setText(_translate("MainWindow", "3"))
        self.lineEdit_15.setText(_translate("MainWindow", "1"))
        self.lineEdit_3.setText(_translate("MainWindow", "640"))
        self.label_10.setText(_translate("MainWindow", "Laser intensity (mW/cm^2)"))
        self.label_5.setText(_translate("MainWindow", "Wavelength at vacuum (nm)"))
        self.pushButton_3.setText(_translate("MainWindow", "Simulate"))
        self.lineEdit_14.setText(_translate("MainWindow", "(leave like this for local folder)"))
        self.pushButton_5.setText(_translate("MainWindow", "Saving folder"))
        self.pushButton_6.setText(_translate("MainWindow", "Clear images"))
        self.lineEdit_21.setText(_translate("MainWindow", "VP mask simulation"))
        self.pushButton_4.setText(_translate("MainWindow", "Save amplitudes on the XY plane"))
        self.groupBox_4.setTitle(_translate("MainWindow", "Field propagation"))
        self.radioButton.setText(_translate("MainWindow", "Simulate field propagation between "))
        self.lineEdit_22.setText(_translate("MainWindow", "5"))
        self.label_23.setText(_translate("MainWindow", "Phase mask radius (mm)"))
        self.label_11.setText(_translate("MainWindow", "phase mask and objective"))
        self.lineEdit_19.setText(_translate("MainWindow", "1000"))
        self.label_18.setText(_translate("MainWindow", "Phase mask - objective distance (mm)"))
        self.groupBox_5.setTitle(_translate("MainWindow", "Multilayer system"))
        self.label_20.setText(_translate("MainWindow", "Refractive indices: n1,n2,...,ni with n1 the first medium and ni the last medium"))
        self.lineEdit_23.setText(_translate("MainWindow", "1.5,1.33"))
        self.label_25.setText(_translate("MainWindow", "Layer thicknesses: d2,...,di-1 in nm, first and last are semi-infinite"))
        self.radioButton_2.setText(_translate("MainWindow", "Simulate a multilayer"))
        self.label_26.setText(_translate("MainWindow", "Axial position of the multilayer (nm)"))
        self.lineEdit_25.setText(_translate("MainWindow", "0"))
        self.groupBox_2.setTitle(_translate("MainWindow", "Range and resolution (nm)"))
        self.lineEdit_4.setText(_translate("MainWindow", "10"))
        self.label_6.setText(_translate("MainWindow", "Axial resolution"))
        self.lineEdit_5.setText(_translate("MainWindow", "5"))
        self.label_4.setText(_translate("MainWindow", "Radial resolution "))
        self.label_16.setText(_translate("MainWindow", "Radial range"))
        self.lineEdit_17.setText(_translate("MainWindow", "1000"))
        self.lineEdit_20.setText(_translate("MainWindow", "2000"))
        self.label_19.setText(_translate("MainWindow", "Axial range"))
        self.lineEdit_12.setText(_translate("MainWindow", "0"))
        self.label_13.setText(_translate("MainWindow", "z"))
        self.groupBox_3.setTitle(_translate("MainWindow", "Polarization (degrees)"))
        self.lineEdit_11.setText(_translate("MainWindow", "45"))
        self.lineEdit_13.setText(_translate("MainWindow", "90"))
        self.label_9.setText(_translate("MainWindow", "<html><head/><body><p>Gamma</p></body></html>"))
        self.label_24.setText(_translate("MainWindow", "Beta"))
        self.label_15.setText(_translate("MainWindow", "Simulation name:"))
        self.groupBox_6.setTitle(_translate("MainWindow", "Incident field"))
        self.label_14.setText(_translate("MainWindow", "Gaussian beam radius (mm)"))
        self.lineEdit_16.setText(_translate("MainWindow", "5"))
        self.comboBox_2.setItemText(0, _translate("MainWindow", "Gaussian beam"))
        self.comboBox_2.setItemText(1, _translate("MainWindow", "Uniform field"))
        self.pushButton_8.setText(_translate("MainWindow", "Load custom field from .txt file"))
        self.comboBox.setItemText(0, _translate("MainWindow", "VP (Vortical 0-2pi)"))
        self.comboBox.setItemText(1, _translate("MainWindow", "Null mask"))
        self.comboBox.setItemText(2, _translate("MainWindow", "Custom mask"))
        self.label_12.setText(_translate("MainWindow", "Phase mask:"))
        self.pushButton_7.setText(_translate("MainWindow", "Select custom\n"
"phase mask"))
        self.label_21.setText(_translate("MainWindow", "Entrance beam:"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())

