Implementation parking vue
This commit is contained in:
parent
b0b630fd22
commit
27f6d954ea
@ -1,4 +1,4 @@
|
|||||||
from src.v import Panneau, Borne, Camera
|
from src.v import Ui_Panneau, Ui_Borne, Camera
|
||||||
from src.c import Teleporteur
|
from src.c import Teleporteur
|
||||||
from src.m import Parking, Place
|
from src.m import Parking, Place
|
||||||
|
|
||||||
@ -10,8 +10,8 @@ class Acces:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__parking = Parking()
|
self.__parking = Parking()
|
||||||
self.__camera = Camera()
|
self.__camera = Camera()
|
||||||
self.__borne = Borne()
|
self.__borne = Ui_Borne()
|
||||||
self.__panneau = Panneau()
|
self.__panneau = Ui_Panneau()
|
||||||
|
|
||||||
def actionnerCamera(self):
|
def actionnerCamera(self):
|
||||||
return self.__camera.donnerVoiture()
|
return self.__camera.donnerVoiture()
|
||||||
@ -21,3 +21,4 @@ class Acces:
|
|||||||
|
|
||||||
def lancerProcedureEntree(self,client):
|
def lancerProcedureEntree(self,client):
|
||||||
self.__borne.afficher("Inserer votre carte ou valider")
|
self.__borne.afficher("Inserer votre carte ou valider")
|
||||||
|
|
||||||
|
12
src/c/CreaParking.py
Normal file
12
src/c/CreaParking.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from PyQt4 import QtGui
|
||||||
|
from src.v.Ui_CreaParking import Ui_CreaParking
|
||||||
|
|
||||||
|
__author__ = 'sidya'
|
||||||
|
|
||||||
|
|
||||||
|
class CreaParking:
|
||||||
|
def __init__(self):
|
||||||
|
self.w = QtGui.QWidget()
|
||||||
|
self.ui = Ui_CreaParking()
|
||||||
|
self.ui.setupUi(self.w)
|
||||||
|
self.w.show()
|
@ -2,9 +2,10 @@ import sys
|
|||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from src.v.MainWindow import Ui_MainWindow
|
from src.c.CreaParking import CreaParking
|
||||||
from src.c.log.log import Log
|
from src.c.log.log import Log
|
||||||
from src.m.Parking import Parking, ListeTypePlace
|
from src.m.Parking import Parking, ListeTypePlace
|
||||||
|
from src.v.Ui_MainWindow import Ui_MainWindow
|
||||||
|
|
||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
@ -30,6 +31,10 @@ class Main:
|
|||||||
self.ui = Ui_MainWindow()
|
self.ui = Ui_MainWindow()
|
||||||
self.ui.setupUi(self.view)
|
self.ui.setupUi(self.view)
|
||||||
|
|
||||||
|
#connect
|
||||||
|
self.ui.comboBox.currentIndexChanged['QString'].connect(self.selectParking)
|
||||||
|
self.ui.btn_creer.clicked.connect(self.creerParking)
|
||||||
|
|
||||||
#Chargement activité
|
#Chargement activité
|
||||||
self.loadLastActivity()
|
self.loadLastActivity()
|
||||||
self.majListeParking()
|
self.majListeParking()
|
||||||
@ -54,5 +59,30 @@ class Main:
|
|||||||
for l in [l[:-1] for l in liste[-11:-1]]:
|
for l in [l[:-1] for l in liste[-11:-1]]:
|
||||||
self.ui.addItemActivite(l)
|
self.ui.addItemActivite(l)
|
||||||
|
|
||||||
|
|
||||||
|
def addItemActivite(self, line):
|
||||||
|
self.log.addItem(line)
|
||||||
|
|
||||||
def majListeParking(self):
|
def majListeParking(self):
|
||||||
self.ui.majListeParkings(self.__parkings)
|
self.ui.comboBox.clear()
|
||||||
|
self.ui.comboBox.addItem("Selectionner un parking")
|
||||||
|
for p in self.__parkings:
|
||||||
|
self.ui.comboBox.addItem(p.nom)
|
||||||
|
|
||||||
|
def selectParking(self):
|
||||||
|
self.ui.nom.clear()
|
||||||
|
self.ui.niveau.clear()
|
||||||
|
self.ui.placesParNiveau.clear()
|
||||||
|
self.ui.placesDispo.clear()
|
||||||
|
self.ui.placesSuperAbo.clear()
|
||||||
|
if(self.ui.comboBox.currentIndex() != 0) :
|
||||||
|
self.ui.nom.setText(self.__parkings[self.ui.comboBox.currentIndex()-1].nom)
|
||||||
|
self.ui.niveau.setText(str(self.__parkings[self.ui.comboBox.currentIndex()-1].nbNiveau))
|
||||||
|
self.ui.placesParNiveau.setText(str(self.__parkings[self.ui.comboBox.currentIndex()-1].nbPlacesParNiveau))
|
||||||
|
self.ui.placesDispo.setText(str(self.__parkings[self.ui.comboBox.currentIndex()-1].nbPlacesLibresParking))
|
||||||
|
self.ui.placesSuperAbo.setText("lol")
|
||||||
|
|
||||||
|
|
||||||
|
def creerParking(self):
|
||||||
|
self.view.hide()
|
||||||
|
CreaParking()
|
@ -8,6 +8,7 @@ class Parking:
|
|||||||
Definie un parking
|
Definie un parking
|
||||||
"""
|
"""
|
||||||
def __init__(self, nbNiv, typePlacesParNiv,nom):
|
def __init__(self, nbNiv, typePlacesParNiv,nom):
|
||||||
|
self.typePlacesParNiv = typePlacesParNiv
|
||||||
self.__nom = nom
|
self.__nom = nom
|
||||||
self.__nbPlacesParNiveau = typePlacesParNiv.nbPlaceTotal
|
self.__nbPlacesParNiveau = typePlacesParNiv.nbPlaceTotal
|
||||||
self.__prix = 10
|
self.__prix = 10
|
||||||
|
103
src/v/Ui_CreaParking.py
Normal file
103
src/v/Ui_CreaParking.py
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file 'creationParking.ui'
|
||||||
|
#
|
||||||
|
# Created: Fri Dec 26 17:33:19 2014
|
||||||
|
# by: PyQt4 UI code generator 4.11.3
|
||||||
|
#
|
||||||
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
|
try:
|
||||||
|
_fromUtf8 = QtCore.QString.fromUtf8
|
||||||
|
except AttributeError:
|
||||||
|
def _fromUtf8(s):
|
||||||
|
return s
|
||||||
|
|
||||||
|
try:
|
||||||
|
_encoding = QtGui.QApplication.UnicodeUTF8
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig, _encoding)
|
||||||
|
except AttributeError:
|
||||||
|
def _translate(context, text, disambig):
|
||||||
|
return QtGui.QApplication.translate(context, text, disambig)
|
||||||
|
|
||||||
|
class Ui_CreaParking(object):
|
||||||
|
def setupUi(self, Form):
|
||||||
|
Form.setObjectName(_fromUtf8("Form"))
|
||||||
|
Form.resize(400, 300)
|
||||||
|
self.tableWidget = QtGui.QTableWidget(Form)
|
||||||
|
self.tableWidget.setGeometry(QtCore.QRect(30, 110, 331, 101))
|
||||||
|
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
|
||||||
|
self.tableWidget.setColumnCount(0)
|
||||||
|
self.tableWidget.setRowCount(0)
|
||||||
|
self.layoutWidget = QtGui.QWidget(Form)
|
||||||
|
self.layoutWidget.setGeometry(QtCore.QRect(50, 10, 291, 89))
|
||||||
|
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
|
||||||
|
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget)
|
||||||
|
self.horizontalLayout.setMargin(0)
|
||||||
|
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||||
|
self.verticalLayout = QtGui.QVBoxLayout()
|
||||||
|
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||||
|
self.label = QtGui.QLabel(self.layoutWidget)
|
||||||
|
self.label.setObjectName(_fromUtf8("label"))
|
||||||
|
self.verticalLayout.addWidget(self.label)
|
||||||
|
self.label_2 = QtGui.QLabel(self.layoutWidget)
|
||||||
|
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||||
|
self.verticalLayout.addWidget(self.label_2)
|
||||||
|
self.label_3 = QtGui.QLabel(self.layoutWidget)
|
||||||
|
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||||
|
self.verticalLayout.addWidget(self.label_3)
|
||||||
|
self.horizontalLayout.addLayout(self.verticalLayout)
|
||||||
|
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||||
|
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
|
||||||
|
self.lineEdit_nom = QtGui.QLineEdit(self.layoutWidget)
|
||||||
|
self.lineEdit_nom.setObjectName(_fromUtf8("lineEdit_nom"))
|
||||||
|
self.verticalLayout_2.addWidget(self.lineEdit_nom)
|
||||||
|
self.lineEdit_nbNiv = QtGui.QLineEdit(self.layoutWidget)
|
||||||
|
self.lineEdit_nbNiv.setObjectName(_fromUtf8("lineEdit_nbNiv"))
|
||||||
|
self.verticalLayout_2.addWidget(self.lineEdit_nbNiv)
|
||||||
|
self.btn_ajouterPlaces = QtGui.QPushButton(self.layoutWidget)
|
||||||
|
self.btn_ajouterPlaces.setObjectName(_fromUtf8("btn_ajouterPlaces"))
|
||||||
|
self.verticalLayout_2.addWidget(self.btn_ajouterPlaces)
|
||||||
|
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||||
|
self.layoutWidget1 = QtGui.QWidget(Form)
|
||||||
|
self.layoutWidget1.setGeometry(QtCore.QRect(90, 270, 201, 29))
|
||||||
|
self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1"))
|
||||||
|
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget1)
|
||||||
|
self.horizontalLayout_2.setMargin(0)
|
||||||
|
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
|
||||||
|
self.pushButton_2 = QtGui.QPushButton(self.layoutWidget1)
|
||||||
|
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||||
|
self.horizontalLayout_2.addWidget(self.pushButton_2)
|
||||||
|
self.pushButton = QtGui.QPushButton(self.layoutWidget1)
|
||||||
|
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||||
|
self.horizontalLayout_2.addWidget(self.pushButton)
|
||||||
|
self.layoutWidget2 = QtGui.QWidget(Form)
|
||||||
|
self.layoutWidget2.setGeometry(QtCore.QRect(60, 230, 275, 25))
|
||||||
|
self.layoutWidget2.setObjectName(_fromUtf8("layoutWidget2"))
|
||||||
|
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.layoutWidget2)
|
||||||
|
self.horizontalLayout_3.setMargin(0)
|
||||||
|
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
|
||||||
|
self.label_4 = QtGui.QLabel(self.layoutWidget2)
|
||||||
|
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||||
|
self.horizontalLayout_3.addWidget(self.label_4)
|
||||||
|
self.nbPlacesTotal = QtGui.QLabel(self.layoutWidget2)
|
||||||
|
self.nbPlacesTotal.setObjectName(_fromUtf8("nbPlacesTotal"))
|
||||||
|
self.horizontalLayout_3.addWidget(self.nbPlacesTotal)
|
||||||
|
|
||||||
|
self.retranslateUi(Form)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||||
|
|
||||||
|
def retranslateUi(self, Form):
|
||||||
|
Form.setWindowTitle(_translate("Form", "Creation Parking", None))
|
||||||
|
self.label.setText(_translate("Form", "Nom", None))
|
||||||
|
self.label_2.setText(_translate("Form", "Nombre de niveaux :", None))
|
||||||
|
self.label_3.setText(_translate("Form", "Places par niveau :", None))
|
||||||
|
self.btn_ajouterPlaces.setText(_translate("Form", "Ajouter places", None))
|
||||||
|
self.pushButton_2.setText(_translate("Form", "Annuler", None))
|
||||||
|
self.pushButton.setText(_translate("Form", "Valider", None))
|
||||||
|
self.label_4.setText(_translate("Form", "Nombre Places Total : ", None))
|
||||||
|
self.nbPlacesTotal.setText(_translate("Form", "TextLabel", None))
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'main.ui'
|
# Form implementation generated from reading ui file 'main.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Dec 23 22:14:01 2014
|
# Created: Fri Dec 26 17:32:35 2014
|
||||||
# by: PyQt4 UI code generator 4.11.3
|
# by: PyQt4 UI code generator 4.11.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -65,40 +65,40 @@ class Ui_MainWindow(object):
|
|||||||
self.label_17 = QtGui.QLabel(self.tab_2)
|
self.label_17 = QtGui.QLabel(self.tab_2)
|
||||||
self.label_17.setObjectName(_fromUtf8("label_17"))
|
self.label_17.setObjectName(_fromUtf8("label_17"))
|
||||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_17)
|
self.formLayout_3.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_17)
|
||||||
self.label_2 = QtGui.QLabel(self.tab_2)
|
self.nom = QtGui.QLabel(self.tab_2)
|
||||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
self.nom.setObjectName(_fromUtf8("nom"))
|
||||||
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.label_2)
|
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.nom)
|
||||||
self.label_3 = QtGui.QLabel(self.tab_2)
|
self.niveau = QtGui.QLabel(self.tab_2)
|
||||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
self.niveau.setObjectName(_fromUtf8("niveau"))
|
||||||
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.label_3)
|
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.niveau)
|
||||||
self.label_4 = QtGui.QLabel(self.tab_2)
|
self.placesParNiveau = QtGui.QLabel(self.tab_2)
|
||||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
self.placesParNiveau.setObjectName(_fromUtf8("placesParNiveau"))
|
||||||
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.label_4)
|
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.placesParNiveau)
|
||||||
self.label_5 = QtGui.QLabel(self.tab_2)
|
self.placesDispo = QtGui.QLabel(self.tab_2)
|
||||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
self.placesDispo.setObjectName(_fromUtf8("placesDispo"))
|
||||||
self.formLayout_3.setWidget(3, QtGui.QFormLayout.FieldRole, self.label_5)
|
self.formLayout_3.setWidget(3, QtGui.QFormLayout.FieldRole, self.placesDispo)
|
||||||
self.label_6 = QtGui.QLabel(self.tab_2)
|
self.placesSuperAbo = QtGui.QLabel(self.tab_2)
|
||||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
self.placesSuperAbo.setObjectName(_fromUtf8("placesSuperAbo"))
|
||||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.FieldRole, self.label_6)
|
self.formLayout_3.setWidget(4, QtGui.QFormLayout.FieldRole, self.placesSuperAbo)
|
||||||
self.verticalLayout.addLayout(self.formLayout_3)
|
self.verticalLayout.addLayout(self.formLayout_3)
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||||
self.pushButton_4 = QtGui.QPushButton(self.tab_2)
|
self.btn_details = QtGui.QPushButton(self.tab_2)
|
||||||
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
|
self.btn_details.setObjectName(_fromUtf8("btn_details"))
|
||||||
self.horizontalLayout.addWidget(self.pushButton_4)
|
self.horizontalLayout.addWidget(self.btn_details)
|
||||||
self.pushButton_3 = QtGui.QPushButton(self.tab_2)
|
self.btn_borne = QtGui.QPushButton(self.tab_2)
|
||||||
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
|
self.btn_borne.setObjectName(_fromUtf8("btn_borne"))
|
||||||
self.horizontalLayout.addWidget(self.pushButton_3)
|
self.horizontalLayout.addWidget(self.btn_borne)
|
||||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||||
self.pushButton_5 = QtGui.QPushButton(self.tab_2)
|
self.btn_creer = QtGui.QPushButton(self.tab_2)
|
||||||
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
|
self.btn_creer.setObjectName(_fromUtf8("btn_creer"))
|
||||||
self.verticalLayout.addWidget(self.pushButton_5)
|
self.verticalLayout.addWidget(self.btn_creer)
|
||||||
self.pushButton_2 = QtGui.QPushButton(self.tab_2)
|
self.btn_modifier = QtGui.QPushButton(self.tab_2)
|
||||||
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
self.btn_modifier.setObjectName(_fromUtf8("btn_modifier"))
|
||||||
self.verticalLayout.addWidget(self.pushButton_2)
|
self.verticalLayout.addWidget(self.btn_modifier)
|
||||||
self.pushButton = QtGui.QPushButton(self.tab_2)
|
self.btn_supprimer = QtGui.QPushButton(self.tab_2)
|
||||||
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
self.btn_supprimer.setObjectName(_fromUtf8("btn_supprimer"))
|
||||||
self.verticalLayout.addWidget(self.pushButton)
|
self.verticalLayout.addWidget(self.btn_supprimer)
|
||||||
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
||||||
self.tab_5 = QtGui.QWidget()
|
self.tab_5 = QtGui.QWidget()
|
||||||
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
||||||
@ -159,19 +159,19 @@ class Ui_MainWindow(object):
|
|||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
||||||
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
||||||
self.label_14.setText(_translate("MainWindow", "Niveau :", None))
|
self.label_14.setText(_translate("MainWindow", "Niveau :", None))
|
||||||
self.label_15.setText(_translate("MainWindow", "Place / niveau :", None))
|
self.label_15.setText(_translate("MainWindow", "Places / niveau :", None))
|
||||||
self.label_16.setText(_translate("MainWindow", "Place disponible :", None))
|
self.label_16.setText(_translate("MainWindow", "Places disponible :", None))
|
||||||
self.label_17.setText(_translate("MainWindow", "Place Reserve Super Abo : ", None))
|
self.label_17.setText(_translate("MainWindow", "Places Reserve Super Abo : ", None))
|
||||||
self.label_2.setText(_translate("MainWindow", "TextLabel", None))
|
self.nom.setText(_translate("MainWindow", "TextLabel", None))
|
||||||
self.label_3.setText(_translate("MainWindow", "TextLabel", None))
|
self.niveau.setText(_translate("MainWindow", "TextLabel", None))
|
||||||
self.label_4.setText(_translate("MainWindow", "TextLabel", None))
|
self.placesParNiveau.setText(_translate("MainWindow", "TextLabel", None))
|
||||||
self.label_5.setText(_translate("MainWindow", "TextLabel", None))
|
self.placesDispo.setText(_translate("MainWindow", "TextLabel", None))
|
||||||
self.label_6.setText(_translate("MainWindow", "TextLabel", None))
|
self.placesSuperAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||||
self.pushButton_4.setText(_translate("MainWindow", "Details Places", None))
|
self.btn_details.setText(_translate("MainWindow", "Details Places", None))
|
||||||
self.pushButton_3.setText(_translate("MainWindow", "Borne", None))
|
self.btn_borne.setText(_translate("MainWindow", "Borne", None))
|
||||||
self.pushButton_5.setText(_translate("MainWindow", "Créer", None))
|
self.btn_creer.setText(_translate("MainWindow", "Créer", None))
|
||||||
self.pushButton_2.setText(_translate("MainWindow", "Modifier", None))
|
self.btn_modifier.setText(_translate("MainWindow", "Modifier", None))
|
||||||
self.pushButton.setText(_translate("MainWindow", "Supprimer", None))
|
self.btn_supprimer.setText(_translate("MainWindow", "Supprimer", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Parkings", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Parkings", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Membres", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Membres", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Services", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Services", None))
|
||||||
@ -187,30 +187,3 @@ class Ui_MainWindow(object):
|
|||||||
self.actionQuitter.setText(_translate("MainWindow", "Quitter", None))
|
self.actionQuitter.setText(_translate("MainWindow", "Quitter", None))
|
||||||
self.action.setText(_translate("MainWindow", "?", None))
|
self.action.setText(_translate("MainWindow", "?", None))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################NOT GENERATED####################################################
|
|
||||||
def addItemActivite(self, line):
|
|
||||||
self.log.addItem(line)
|
|
||||||
|
|
||||||
def majListeParkings(self, parkings):
|
|
||||||
self.__parkings = parkings
|
|
||||||
self.comboBox.currentIndexChanged['QString'].connect(self.selectParking)
|
|
||||||
self.comboBox.clear()
|
|
||||||
self.comboBox.addItem("Selectionner un parking")
|
|
||||||
for p in parkings:
|
|
||||||
self.comboBox.addItem(p.nom)
|
|
||||||
|
|
||||||
def selectParking(self):
|
|
||||||
self.label_2.clear()
|
|
||||||
self.label_3.clear()
|
|
||||||
self.label_4.clear()
|
|
||||||
self.label_5.clear()
|
|
||||||
self.label_6.clear()
|
|
||||||
if(self.comboBox.currentIndex() != 0) :
|
|
||||||
self.label_2.setText(self.__parkings[self.comboBox.currentIndex()-1].nom)
|
|
||||||
self.label_3.setText(str(self.__parkings[self.comboBox.currentIndex()-1].nbNiveau))
|
|
||||||
self.label_4.setText(str(self.__parkings[self.comboBox.currentIndex()-1].nbPlacesParNiveau))
|
|
||||||
self.label_5.setText(str(self.__parkings[self.comboBox.currentIndex()-1].nbPlacesLibresParking))
|
|
||||||
self.label_6.setText("lol")
|
|
Reference in New Issue
Block a user