예제 #1
0
    def __init__(self):

        super(Time_settings, self).__init__()

        # Carreguem el login.ui
        loadUi(time_settings_ui, self)
        self.setWindowTitle("Ajustaments")
        self.setWindowIcon(QIcon(app_icon))

        self.cancelDialogBox = QMessageBox()
        self.editDialogBox = QMessageBox()
        self.parameterDialogBox = QMessageBox()

        self.sqlite = SQLite_consulter()

        self.return_btn.hide()
        self.edit_btn.setText("Editar")
        self.edit_btn.setEnabled(False)
        self.editMode = False
        self.cancel_btn.setText("Cancelar")
        self.combo_box_refresh_btn.setIcon(QIcon(refresh_icon))
        self.return_btn.setIcon(QIcon(back_icon))

        self.cancel_btn.hide()

        self.edit_btn.pressed.connect(self.edit_patient)
        self.cancel_btn.pressed.connect(self.cancel_edit_patient)
        self.combo_box_refresh_btn.pressed.connect(self.fill_cb_status)
        self.return_btn.pressed.connect(self.back)

        self.fill_cb_status()

        self.text_read_only()
예제 #2
0
    def __init__(self):
        super(Login, self).__init__()
        # Carreguem el login.ui
        loadUi(loginui, self)
        self.setWindowIcon(QIcon(app_icon))

        # Clase per a fer les consultes Sqlite
        self.sqlite = SQLite_consulter()

        self.pushButtonLogin.clicked.connect(self.loginFunction)
        self.showMessageBox = QMessageBox()
예제 #3
0
    def __init__(self, *args, **kwargs):
        super(MainWindow, self).__init__(*args, **kwargs)

        #Carreguem el grafica_pacients.ui
        loadUi(grafica_pacients_ui, self)
        self.setWindowIcon(QIcon(app_icon))

        self.setWindowTitle("Gràfica Pacients")
        self.showMessageBox = QMessageBox()

        # Per a canviar el color de fondo
        self.graphWidget.setBackground("w")

        #Afegim titol i color
        self.graphWidget.setTitle("Gràfica Pacients", color='k', size="15pt")

        #temps (s)
        self.graphWidget.setLabel(
            'left',
            "<span style=\"color:black;fontsize:30px\">Temps (s)</span>")

        #dies
        self.graphWidget.setLabel(
            'bottom', "<span style=\"color:black;fontsize:30px\">Dia</span>")

        #Afegim una cuadrícula a la gràfica
        self.graphWidget.showGrid(x=True, y=True)

        #Afegim el rango de la X i la Y en aquest cas
        self.graphWidget.setXRange(0, 10, padding=0.001)
        self.graphWidget.setYRange(0, 50, padding=0.01)

        #Connecting to class to connect to database
        self.sqlite = SQLite_consulter()

        self.cBPacients.addItem("Selecciona un pacient")
        for patient in self.sqlite.ask_for_patients_to_fill_combo_box():
            patient_name_surname = patient[0] + " " + patient[1]
            self.cBPacients.addItem(patient_name_surname)

        self.cBPacients.currentIndexChanged.connect(
            self.selection_change_patient)

        self.return_btn.setIcon(QIcon(back_icon))
        self.return_btn.pressed.connect(self.back)

        #Mostrem la finestra
        self.show()
예제 #4
0
    def __init__(self):
        super(Alta_usuaris, self).__init__()
        # Carreguem el login.ui
        loadUi(alta_usuaris, self)
        self.setWindowIcon(QIcon(app_icon))
        self.setWindowTitle("Alta usuaris")
        self.showMessageBox = QMessageBox()
        self.passwdDoesntMatchMessage = QMessageBox()
        self.dniValid = False

        self.pbInserir.clicked.connect(self.inserir_usuaris)
        self.textDni.textChanged.connect(self.comprueba_dni)

        self.pbModificar.clicked.connect(self.modificar_usuaris)
        self.sqlite = SQLite_consulter()

        self.return_btn.setIcon(QIcon(back_icon))
        self.return_btn.pressed.connect(self.back)
    def __init__(self):
        super(Modifica_pacients, self).__init__()

        # Carreguem el login.ui
        loadUi(modificar_pacients_ui, self)
        self.setWindowIcon(QIcon(app_icon))
        self.setWindowTitle("Modificar pacients")
        self.deleteDialogBox = QMessageBox()
        self.cancelDialogBox = QMessageBox()
        self.editDialogBox = QMessageBox()
        self.showMessageBox = QMessageBox()

        self.sqlite = SQLite_consulter()

        self.editBtn.setText("Editar")
        self.editBtn.setEnabled(False)
        self.editMode = False
        self.cancelBtn.setText("Cancelar")
        self.deleteBtn.setText("Borrar")
        self.deleteBtn.setEnabled(False)
        self.deleteBtn.setStyleSheet("")
        self.refresh_combo_box_btn.setIcon(QIcon(refresh_icon))
        self.backButton.setIcon(QIcon(back_icon))

        self.text_fase_enfermetat = 1
        self.text_genere = "Home"
        self.dniValid = False
        self.textDni.textChanged.connect(self.comprueba_dni)

        self.cancelBtn.hide()

        self.editBtn.pressed.connect(self.edit_patient)
        self.cancelBtn.pressed.connect(self.cancel_edit_patient)
        self.deleteBtn.pressed.connect(self.delete_patient)
        self.refresh_combo_box_btn.pressed.connect(self.fill_cb_patients)
        self.backButton.pressed.connect(self.back)

        self.fill_cb_patients()

        self.block_ui(True)
예제 #6
0
    def __init__(self):
        super(Alta_pacients, self).__init__()
        # Carreguem el login.ui
        loadUi(alta_pacients_ui, self)
        self.setWindowIcon(QIcon(app_icon))
        self.setWindowTitle("Alta pacients")
        self.showMessageBox = QMessageBox()

        self.pbInserir.clicked.connect(self.inserir_pacient)

        self.pbModificar.clicked.connect(self.modificar_pacient)
        self.sqlite = SQLite_consulter()

        self.textDni.textChanged.connect(self.comprueba_dni)
        self.fill_cb_gender()
        self.fill_cb_phase()
        self.text_fase_enfermetat = 1
        self.text_genere = "Home"
        self.dniValid = False

        self.return_btn.setIcon(QIcon(back_icon))
        self.return_btn.pressed.connect(self.back)
예제 #7
0
    def __init__(self):
        super(Modifica_usuaris, self).__init__()

        # Carreguem el login.ui
        loadUi(modificar_usuaris_ui, self)
        self.setWindowIcon(QIcon(app_icon))
        self.setWindowTitle("Modificar usuaris")
        self.deleteDialogBox = QMessageBox()
        self.editDialogBox = QMessageBox()
        self.showMessageBox = QMessageBox()

        self.sqlite = SQLite_consulter()

        self.editBtn.setText("Editar")
        self.editBtn.setEnabled(False)
        self.dniValid = False
        self.editMode = False
        self.cancelBtn.setText("Cancelar")
        self.deleteBtn.setText("Borrar")
        self.deleteBtn.setEnabled(False)
        self.deleteBtn.setStyleSheet("")
        self.refresh_combo_box_btn.setIcon(QIcon(refresh_icon))
        self.backButton.setIcon(QIcon(back_icon))

        self.cancelBtn.hide()

        self.editBtn.pressed.connect(self.edit_user)
        self.cancelBtn.pressed.connect(self.cancel_edit_user)
        self.deleteBtn.pressed.connect(self.delete_user)
        self.refresh_combo_box_btn.pressed.connect(self.fill_cb_users)
        self.backButton.pressed.connect(self.back)
        self.lineEditDni.textChanged.connect(self.comprueba_dni)

        self.fill_cb_users()

        self.text_read_only()