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

# Form implementation generated from reading ui file 'geral.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

### Import telas sistema ###
from cliente import Ui_FormCliente
from produto import Ui_FormProduto

import sys


class Ui_FormGeral(object):
    def setupUi(self, FormGeral):
        FormGeral.setObjectName("FormGeral")
        FormGeral.resize(514, 300)
        FormGeral.setStyleSheet("background-color: rgb(129, 181, 200);")
        self.bt_cliente = QtWidgets.QPushButton(FormGeral)
        self.bt_cliente.setGeometry(QtCore.QRect(40, 10, 111, 101))
        self.bt_cliente.setStyleSheet("image: url(:/cliente_icon/imagens/cliente.png);\n"
"background-color: rgb(188, 191, 200);")
        self.bt_cliente.setText("")
        self.bt_cliente.setObjectName("bt_cliente")
        self.bt_produtos = QtWidgets.QPushButton(FormGeral)
        self.bt_produtos.setGeometry(QtCore.QRect(200, 10, 111, 101))
        self.bt_produtos.setStyleSheet("image: url(:/produto_icon/imagens/produto.png);\n"
"background-color: rgb(188, 191, 200);")
        self.bt_produtos.setText("")
        self.bt_produtos.setObjectName("bt_produtos")
        self.bt_sair = QtWidgets.QPushButton(FormGeral)
        self.bt_sair.setGeometry(QtCore.QRect(360, 10, 111, 101))
        self.bt_sair.setStyleSheet("image: url(:/sair_icon/imagens/sair.png);\n"
"background-color: rgb(188, 191, 200);")
        self.bt_sair.setText("")
        self.bt_sair.setObjectName("bt_sair")
        self.lb_cliente = QtWidgets.QLabel(FormGeral)
        self.lb_cliente.setGeometry(QtCore.QRect(40, 120, 111, 31))
        font = QtGui.QFont()
        font.setFamily("Segoe UI")
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.lb_cliente.setFont(font)
        self.lb_cliente.setAlignment(QtCore.Qt.AlignCenter)
        self.lb_cliente.setObjectName("lb_cliente")
        self.lb_produto = QtWidgets.QLabel(FormGeral)
        self.lb_produto.setGeometry(QtCore.QRect(200, 120, 111, 31))
        font = QtGui.QFont()
        font.setFamily("Segoe UI")
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.lb_produto.setFont(font)
        self.lb_produto.setAlignment(QtCore.Qt.AlignCenter)
        self.lb_produto.setObjectName("lb_produto")
        self.lb_sair = QtWidgets.QLabel(FormGeral)
        self.lb_sair.setGeometry(QtCore.QRect(360, 120, 111, 31))
        font = QtGui.QFont()
        font.setFamily("Segoe UI")
        font.setPointSize(12)
        font.setBold(True)
        font.setWeight(75)
        self.lb_sair.setFont(font)
        self.lb_sair.setAlignment(QtCore.Qt.AlignCenter)
        self.lb_sair.setObjectName("lb_sair")

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

    def retranslateUi(self, FormGeral):
        _translate = QtCore.QCoreApplication.translate
        FormGeral.setWindowTitle(_translate("FormGeral", "Geral"))
        self.bt_cliente.setToolTip(_translate("FormGeral", "<html><head/><body><p><img src=\":/cliente_icon/imagens/cliente.png\"/></p></body></html>"))
        self.bt_produtos.setToolTip(_translate("FormGeral", "<html><head/><body><p><img src=\":/produto_icon/imagens/produto.png\"/></p></body></html>"))
        self.bt_sair.setToolTip(_translate("FormGeral", "<html><head/><body><p><img src=\":/sair_icon/imagens/sair.png\"/></p></body></html>"))
        self.lb_cliente.setText(_translate("FormGeral", "Cliente"))
        self.lb_produto.setText(_translate("FormGeral", "Produto"))
        self.lb_sair.setText(_translate("FormGeral", "Sair"))

##################################################################################################
######################################### BOTÕES SISTEMA #########################################
##################################################################################################

        self.bt_sair.clicked.connect(lambda: self.sairSistema(FormGeral)) # Fecha o Sistema #
        self.bt_cliente.clicked.connect(self.telaCliente) # botão Cliente abre telaCliente #
        self.bt_produtos.clicked.connect(self.telaProduto) # botão Produto abre telaProduto

###################################################################################################
######################################### FUNÇÕES SISTEMA #########################################
###################################################################################################

    ## Fechar sistema ##
    def sairSistema(self, FormGeral):
        FormGeral.close()


    ## Abre telaCliente ##
    def telaCliente(self):
        self.FormCliente = QtWidgets.QWidget()
        self.ui = Ui_FormCliente()
        self.ui.setupUi(self.FormCliente)
        self.FormCliente.show()

    ## Abre telaProduto ##
    def telaProduto(self):
        self.FormProduto = QtWidgets.QWidget()
        self.ui = Ui_FormProduto()
        self.ui.setupUi(self.FormProduto)
        self.FormProduto.show()

import cliente_icon
import deletar_icon
import produto_icon
import sair_icon


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