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

# Form implementation generated from reading ui file 'cpr_main.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# 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
from PyQt5.QtGui import QCursor

from mdownstream_cal import Ui_Downstream_Screen
from mupstream_cal import Ui_Upstream_Screen



class Ui_Screen1(object):
    def _screen1(self):
        self.screen1 = QtWidgets.QMainWindow()
        self.up = Ui_Downstream_Screen()
        self.up.setupUi(self.screen1)
        self.screen1.show()
        Screen1.hide()

    def _screen2(self):
        self.screen2 = QtWidgets.QMainWindow()
        self.up = Ui_Upstream_Screen()
        self.up.setupUi(self.screen2)
        self.screen2.show()
        Screen1.hide()


    def setupUi(self, Screen1):

        Screen1.setWindowIcon(QtGui.QIcon("unnamed.png"))
        Screen1.setObjectName("Screen1")
        Screen1.resize(691, 492)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Screen1.sizePolicy().hasHeightForWidth())
        Screen1.setSizePolicy(sizePolicy)
        Screen1.setMinimumSize(QtCore.QSize(691, 492))
        Screen1.setMaximumSize(QtCore.QSize(691, 492))
        self.Background_label = QtWidgets.QLabel(Screen1)
        self.Background_label.setGeometry(QtCore.QRect(0, 0, 691, 492))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.Background_label.sizePolicy().hasHeightForWidth())
        self.Background_label.setSizePolicy(sizePolicy)
        self.Background_label.setMinimumSize(QtCore.QSize(691, 492))
        self.Background_label.setMaximumSize(QtCore.QSize(691, 492))
        self.Background_label.setText("")
        self.Background_label.setPixmap(QtGui.QPixmap("f1.jpg"))
        self.Background_label.setScaledContents(True)
        self.Background_label.setObjectName("Background_label")
        self.ques_label = QtWidgets.QLabel(Screen1)
        self.ques_label.setGeometry(QtCore.QRect(205, 85, 471, 61))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ques_label.sizePolicy().hasHeightForWidth())
        self.ques_label.setSizePolicy(sizePolicy)
        self.ques_label.setMinimumSize(QtCore.QSize(471, 61))
        self.ques_label.setMaximumSize(QtCore.QSize(471, 61))
        font = QtGui.QFont()
        font.setFamily("Times New Roman")
        font.setPointSize(25)
        font.setBold(True)
        font.setWeight(100)
        self.ques_label.setFont(font)
        self.ques_label.setObjectName("ques_label")
        self.Up_pushButton = QtWidgets.QPushButton(Screen1)
        self.Up_pushButton.setGeometry(QtCore.QRect(255, 205, 371, 41))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.Up_pushButton.sizePolicy().hasHeightForWidth())
        self.Up_pushButton.setSizePolicy(sizePolicy)
        self.Up_pushButton.setMinimumSize(QtCore.QSize(371, 41))
        self.Up_pushButton.setMaximumSize(QtCore.QSize(371, 41))
        self.Up_pushButton.setCursor(QCursor(QtCore.Qt.PointingHandCursor))
        self.Up_pushButton.setStyleSheet("QPushButton::hover"
                                        "{"
                                        "background-color : lightyellow;"
                                        "}")
        font = QtGui.QFont()
        font.setFamily("Bookman Old Style")
        font.setPointSize(12)
        self.Up_pushButton.setFont(font)
        self.Up_pushButton.setObjectName("Up_pushButton")
        self.pushButton = QtWidgets.QPushButton(Screen1)
        self.pushButton.setGeometry(QtCore.QRect(255, 265, 371, 41))
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
        self.pushButton.setSizePolicy(sizePolicy)
        self.pushButton.setMinimumSize(QtCore.QSize(371, 41))
        self.pushButton.setMaximumSize(QtCore.QSize(371, 41))
        self.pushButton.setCursor(QCursor(QtCore.Qt.PointingHandCursor))
        self.pushButton.setStyleSheet("QPushButton::hover"
                                    "{"
                                    "background-color : lightyellow;"
                                    "}")
        font = QtGui.QFont()
        font.setFamily("Bookman Old Style")
        font.setPointSize(12)
        self.pushButton.setFont(font)
        self.pushButton.setObjectName("pushButton")


        self.pushButton.clicked.connect(self._screen1)
        self.Up_pushButton.clicked.connect(self._screen2)


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

    def retranslateUi(self, Screen1):
        _translate = QtCore.QCoreApplication.translate
        Screen1.setWindowTitle(_translate("Screen1", "Welcome to Choke Pressure Estimator!"))
        self.ques_label.setText(_translate("Screen1", "What would you like to calculate?"))
        self.Up_pushButton.setText(_translate("Screen1", "Upstream Pressure at choke for dry gases"))
        self.pushButton.setText(_translate("Screen1", "Downstream Pressure at choke for dry gases"))


if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    Screen1 = QtWidgets.QWidget()
    ui = Ui_Screen1()
    ui.setupUi(Screen1)
    Screen1.show()
    sys.exit(app.exec_())
