\o/
This commit is contained in:
parent
b7b6a84643
commit
e92819cbb7
@ -4,9 +4,6 @@ from src.c.Main import Main
|
||||
__author__ = 'sidya'
|
||||
|
||||
if __name__ == "__main__":
|
||||
# c = connexionBDD()
|
||||
#c.initialisationBDD()
|
||||
#c.seDeconnecter()
|
||||
# lancement du controleur principal
|
||||
main = Main()
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
from src.v import Ui_Panneau, Ui_Borne, Camera
|
||||
from src.m import Parking
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Acces:
|
||||
"""
|
||||
Controleur Acces
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.__parking = Parking()
|
||||
self.__camera = Camera()
|
||||
self.__borne = Ui_Borne()
|
||||
self.__panneau = Ui_Panneau()
|
||||
|
||||
def actionnerCamera(self):
|
||||
return self.__camera.donnerVoiture()
|
||||
|
||||
def majPanneau(self):
|
||||
self.__panneau.afficherNbPlaceDisponible()
|
||||
|
||||
def lancerProcedureEntree(self, client):
|
||||
self.__borne.afficher("Inserer votre carte ou valider")
|
||||
|
128
src/c/Borne.py
128
src/c/Borne.py
@ -1,13 +1,12 @@
|
||||
from PyQt4 import QtGui, QtCore
|
||||
|
||||
from src.c.Teleporteur import Teleporteur
|
||||
from src.m.Parking import Placement
|
||||
from src.m.Client import Client
|
||||
from src.m.Abonnement import Client
|
||||
from src.m.Abonnement import TypeAbonnement
|
||||
from src.m.Service import Service, TypeService
|
||||
from src.m.Client import TypeAbonnement
|
||||
from src.v.Camera import Camera
|
||||
from src.v.MyQWidget import MyQWidget
|
||||
from src.v.Ui_Borne import Ui_Borne
|
||||
from src.v.MyQt import MyQWidget
|
||||
from src.v.Ui_User import Ui_Borne
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
@ -43,10 +42,10 @@ class Borne:
|
||||
self.__ui.btn_annuler.clicked.connect(self.nonVoiture)
|
||||
self.__ui.btn_validerID.clicked.connect(self.identification)
|
||||
self.__ui.btn_valider_abo.clicked.connect(self.abo)
|
||||
self.__ui.btn_desabo.clicked.connect(self.desabo)
|
||||
self.__ui.btn_garer.clicked.connect(self.garer)
|
||||
self.__ui.btn_recuperer.clicked.connect(self.recuperer)
|
||||
|
||||
|
||||
self.__ui.pushButton.clicked.connect(self.payer)
|
||||
|
||||
# Validator
|
||||
validatorText = QtGui.QRegExpValidator(QtCore.QRegExp('^([a-zA-Z\'àâéèêôùûçñãõÀÂÉÈÔÙÛÑÃÕÇ\s-]{2,30})$'))
|
||||
@ -90,6 +89,7 @@ class Borne:
|
||||
self.__ui.box_service.setDisabled(True)
|
||||
self.__ui.btn_Voiture.setDisabled(False)
|
||||
self.__ui.btn_desabo.setDisabled(True)
|
||||
self.__ui.btn_quitter.setDisabled(False)
|
||||
|
||||
self.__ui.nomLineEdit.setText("")
|
||||
self.__ui.prenomLineEdit.setText("")
|
||||
@ -98,6 +98,12 @@ class Borne:
|
||||
self.__ui.lineEdit_id.setText("")
|
||||
self.__ui.numeroTicketLineEdit.setText("")
|
||||
self.__ui.labIdClient.setText("Non identifier")
|
||||
self.__ui.btn_valider_abo.setText("Valider")
|
||||
self.__ui.checkBox_Maintenance_2.setChecked(False)
|
||||
self.__ui.checkBox_Entretien_2.setChecked(False)
|
||||
self.__ui.checkBox_Livraison_2.setChecked(False)
|
||||
self.__ui.lieuLineEdit_2.setText("")
|
||||
self.__ui.dateTimeEdit.setDateTime(QtCore.QDateTime.currentDateTime())
|
||||
Borne.MajBornes()
|
||||
|
||||
def newVoiture(self):
|
||||
@ -113,6 +119,7 @@ class Borne:
|
||||
self.__ui.box_id.setDisabled(False)
|
||||
self.__ui.box_recup.setDisabled(True)
|
||||
self.__ui.label_aff.setText("Bienvenue !")
|
||||
self.__ui.btn_quitter.setDisabled(True)
|
||||
|
||||
|
||||
def identification(self):
|
||||
@ -128,6 +135,10 @@ class Borne:
|
||||
self.__ui.box_service.setDisabled(False)
|
||||
self.__ui.btn_desabo.setDisabled(False)
|
||||
self.__v_actuel.setClient(self.__c)
|
||||
self.__ui.nomLineEdit.setText(self.__c.nom)
|
||||
self.__ui.prenomLineEdit.setText(self.__c.prenom)
|
||||
self.__ui.numeroCarteLineEdit.setText(self.__c.cb)
|
||||
self.__ui.btn_valider_abo.setText("Modifier")
|
||||
self.__main.activity(self.__nomBorne + " : Mise a jour : " + str(self.__v_actuel), self.__main.lvl.INFO)
|
||||
self.__main.activity(self.__nomBorne + " : Identification : " + str(self.__c), self.__main.lvl.INFO)
|
||||
except IndexError:
|
||||
@ -145,10 +156,16 @@ class Borne:
|
||||
:return:
|
||||
"""
|
||||
if self.__c != None:
|
||||
self.__c.maj(self.__ui.nomLineEdit,
|
||||
self.__ui.prenomLineEdit,
|
||||
"",
|
||||
TypeAbonnement.SUPER_ABONNE)
|
||||
if self.__ui.checkBox.isChecked():
|
||||
self.__c.maj(str(self.__ui.nomLineEdit.text()),
|
||||
str(self.__ui.prenomLineEdit.text()),
|
||||
str(self.__ui.numeroCarteLineEdit.text()),
|
||||
TypeAbonnement.SUPER_ABONNE)
|
||||
else:
|
||||
self.__c.maj(str(self.__ui.nomLineEdit.text()),
|
||||
str(self.__ui.prenomLineEdit.text()),
|
||||
str(self.__ui.numeroCarteLineEdit.text()),
|
||||
TypeAbonnement.ABONNE)
|
||||
self.__ui.label_aff.setText("Mise a jour de votre abonnement effectué")
|
||||
self.__main.activity(self.__nomBorne + " : Mise à jour : " + str(self.__c), self.__main.lvl.INFO)
|
||||
else:
|
||||
@ -156,18 +173,31 @@ class Borne:
|
||||
self.__c = Client(None,
|
||||
str(self.__ui.nomLineEdit.text()),
|
||||
str(self.__ui.prenomLineEdit.text()),
|
||||
"",
|
||||
str(self.__ui.numeroCarteLineEdit.text()),
|
||||
TypeAbonnement.SUPER_ABONNE)
|
||||
else:
|
||||
self.__c = Client(None,
|
||||
str(self.__ui.nomLineEdit.text()),
|
||||
str(self.__ui.prenomLineEdit.text()),
|
||||
"",
|
||||
str(self.__ui.numeroCarteLineEdit.text()),
|
||||
TypeAbonnement.ABONNE)
|
||||
self.identification()
|
||||
|
||||
self.__main.activity(self.__nomBorne + " : Ajout : " + str(self.__c), self.__main.lvl.INFO)
|
||||
self.__ui.label_aff.setText("Votre id membre est : " + self.__c.id)
|
||||
self.__ui.lineEdit_id.setText(self.__c.id)
|
||||
self.identification()
|
||||
self.__ui.label_aff.setText("Votre id membre est : " + self.__c.id)
|
||||
|
||||
def desabo(self):
|
||||
self.__c.desabo()
|
||||
self.__c = None
|
||||
self.__ui.nomLineEdit.setText("")
|
||||
self.__ui.prenomLineEdit.setText("")
|
||||
self.__ui.numeroCarteLineEdit.setText("")
|
||||
self.__ui.lineEdit_id.setText("")
|
||||
self.__ui.checkBox.setChecked(False)
|
||||
self.__ui.box_id.setDisabled(False)
|
||||
self.__ui.box_service.setDisabled(True)
|
||||
|
||||
|
||||
|
||||
def garer(self):
|
||||
@ -181,12 +211,23 @@ class Borne:
|
||||
if p is not None:
|
||||
placement = Teleporteur.teleporterVoiture(self.__v_actuel, p)
|
||||
else:
|
||||
if self.__c.abonnement != TypeAbonnement.SUPER_ABONNE:
|
||||
p = self.__parking.recherchePlace(self.__v_actuel)
|
||||
if p is not None:
|
||||
placement = Teleporteur.teleporterVoiture(self.__v_actuel, p)
|
||||
p = self.__parking.recherchePlace(self.__v_actuel)
|
||||
if p is not None:
|
||||
placement = Teleporteur.teleporterVoiture(self.__v_actuel, p)
|
||||
|
||||
# Si superAbo on cree une place sur mesure dans le cas ou acun est valide
|
||||
if p is None and self.__c.abonnement == TypeAbonnement.SUPER_ABONNE:
|
||||
placement = Teleporteur.teleporterVoitureSuperAbonne(self.__v_actuel, self.__parking)
|
||||
p = placement.place
|
||||
self.__main.activity(self.__nomBorne + " : Nouveau place SuperAbo : " + str(p), self.__main.lvl.INFO)
|
||||
|
||||
# Creation des service
|
||||
if p is not None:
|
||||
try :
|
||||
if self.__ui.checkBox_Livraison_2.isChecked():
|
||||
s = Service(None, self.__c, placement, TypeService.LIVRAISON)
|
||||
s = Service(None, self.__c, placement, TypeService.LIVRAISON,
|
||||
self.__ui.dateTimeEdit.dateTime().toPyDateTime().timestamp(),
|
||||
self.__ui.lieuLineEdit_2.text())
|
||||
self.__main.activity(self.__nomBorne + " : Nouveau : " + str(s), self.__main.lvl.INFO)
|
||||
if self.__ui.checkBox_Entretien_2.isChecked():
|
||||
s = Service(None, self.__c, placement, TypeService.ENTRETIEN)
|
||||
@ -194,12 +235,13 @@ class Borne:
|
||||
if self.__ui.checkBox_Maintenance_2.isChecked():
|
||||
s = Service(None, self.__c, placement, TypeService.MAINTENANCE)
|
||||
self.__main.activity(self.__nomBorne + " : Nouveau : " + str(s), self.__main.lvl.INFO)
|
||||
else:
|
||||
placement = Teleporteur.teleporterVoitureSuperAbonne(self.__v_actuel, self.__parking)
|
||||
except Exception :
|
||||
self.__main.activity(self.__nomBorne + " : Echec creation service : " + str(s), self.__main.lvl.FAIL)
|
||||
self.error("Erreur lors de la creation des Services")
|
||||
if placement is not None:
|
||||
self.nonVoiture()
|
||||
self.ticketDepot(placement.id)
|
||||
self.__main.activity(self.__nomBorne + " : Nouveau : " + str(placement), self.__main.lvl.INFO)
|
||||
self.ticketDepot(placement.id)
|
||||
else:
|
||||
self.__ui.label_aff.setText("Aucune Place Correspondante. Devenez Super Abonné!")
|
||||
self.__main.activity(self.__nomBorne + " : Pas de place dispo pour " + str(self.__v_actuel),
|
||||
@ -219,13 +261,31 @@ class Borne:
|
||||
self.__main.activity(self.__nomBorne + " : Mauvais numero de ticket", self.__main.lvl.INFO)
|
||||
try:
|
||||
Teleporteur.teleporterVersSortie(p)
|
||||
except Exception:
|
||||
self.__ui.label_aff.setText("Voiture déjà recuperé")
|
||||
except Exception as e :
|
||||
self.__ui.label_aff.setText("Voiture déjà recuperée")
|
||||
self.__main.activity(self.__nomBorne + " : Recuperation déjà effectué : " + str(p), self.__main.lvl.INFO)
|
||||
if p.place.estSuperAbo :
|
||||
p.place.supprimer()
|
||||
self.__main.activity(self.__nomBorne + " : Suppresion place SuperAbo : " , self.__main.lvl.INFO)
|
||||
if p is not None:
|
||||
self.nonVoiture()
|
||||
self.ticketRetrait(p, Service.getAllServicePlacement(p))
|
||||
self.__main.activity(self.__nomBorne + " : Recuperation : " + str(p), self.__main.lvl.INFO)
|
||||
if p.voiture.client != "NULL":
|
||||
self.ticketRetrait(p, Service.getAllServicePlacement(p))
|
||||
self.__main.activity(self.__nomBorne + " : Recuperation Abo : " + str(p), self.__main.lvl.INFO)
|
||||
self.nonVoiture()
|
||||
else:
|
||||
self.__placementAPayer = p
|
||||
self.blockAll()
|
||||
self.__ui.box_recup.setDisabled(False)
|
||||
self.__ui.numeroTicketLineEdit.setDisabled(True)
|
||||
self.__ui.btn_quitter.setDisabled(True)
|
||||
self.__ui.pushButton.setDisabled(False)
|
||||
self.__ui.numeroTicketLineEdit.setDisabled(True)
|
||||
|
||||
|
||||
def payer(self):
|
||||
self.ticketRetrait(self.__placementAPayer, Service.getAllServicePlacement(self.__placementAPayer))
|
||||
self.__main.activity(self.__nomBorne + " : Recuperation Anonyme : " + str(self.__placementAPayer), self.__main.lvl.INFO)
|
||||
self.nonVoiture()
|
||||
|
||||
def ticketDepot(self, id):
|
||||
QtGui.QMessageBox.information(self.__w,
|
||||
@ -249,13 +309,13 @@ class Borne:
|
||||
name = "Entretien"
|
||||
else:
|
||||
name = "Autre Service"
|
||||
|
||||
if service.estRealiser():
|
||||
if service.estRealise:
|
||||
s += "\nService : " + name + " + 2€"
|
||||
else:
|
||||
service.nonRealise()
|
||||
s += "\nNous n'avons pas pu réaliser le service" + name + "."
|
||||
s += "\nVeuillez nous excuser de la gène ocassionée."
|
||||
s += "Le Montant sera débiter automatiquement sur votre compte."
|
||||
s += "\nLe Montant sera débiter automatiquement sur votre compte."
|
||||
s += "\nMerci de votre confiance! Bonne journée !"
|
||||
QtGui.QMessageBox.information(self.__w,
|
||||
"Ticket",
|
||||
@ -269,8 +329,6 @@ class Borne:
|
||||
:return:
|
||||
"""
|
||||
self.__w.show()
|
||||
self.__child = None # supprime l'eventuel widget enfant
|
||||
self.__w.focusWidget() # reprend le focus sur la fenetre
|
||||
|
||||
def quitter(self):
|
||||
"""
|
||||
@ -280,7 +338,6 @@ class Borne:
|
||||
self.__main.activity(self.__nomBorne + " : Quitter", self.__main.lvl.INFO)
|
||||
self.__main.showWindow()
|
||||
|
||||
|
||||
def error(self, msg):
|
||||
"""
|
||||
Qdialog message erreur
|
||||
@ -288,5 +345,6 @@ class Borne:
|
||||
"""
|
||||
QtGui.QMessageBox.warning(self._w,
|
||||
"Erreur ...",
|
||||
"Erreur lors de la création du parking ...\n" +
|
||||
msg
|
||||
)
|
||||
)
|
||||
|
@ -1,32 +0,0 @@
|
||||
from PyQt4.QtGui import QTableWidgetItem
|
||||
|
||||
from src.c.CreaParking import CreaParking
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class DetailsPlaces(CreaParking):
|
||||
def __init__(self, main, parking):
|
||||
self.__parking = parking
|
||||
super(DetailsPlaces, self).__init__(main)
|
||||
|
||||
self._ui.lineEdit_nom.setText(parking.nom)
|
||||
for p in parking.typePlacesParNiv.l:
|
||||
row = self._ui.tableWidget.rowCount() - 1
|
||||
if row != 0:
|
||||
self._ui.tableWidget.insertRow(row)
|
||||
self._ui.tableWidget.setItem(row, 0, QTableWidgetItem(str(p.hauteur)))
|
||||
self._ui.tableWidget.setItem(row, 1, QTableWidgetItem(str(p.longueur)))
|
||||
self._ui.tableWidget.setItem(row, 2, QTableWidgetItem(str(p.nb)))
|
||||
|
||||
self._ui.lineEdit_nom.setDisabled(True)
|
||||
self._ui.tableWidget.setDisabled(True)
|
||||
self._ui.btn_annuler.setVisible(False)
|
||||
self._ui.btn_addRow.setVisible(False)
|
||||
self._ui.btn_rmRow.setVisible(False)
|
||||
|
||||
def valider(self):
|
||||
self._w.hide()
|
||||
self._main.showWindow()
|
||||
|
@ -1,20 +1,20 @@
|
||||
import sys
|
||||
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4 import QtGui, QtCore
|
||||
import datetime
|
||||
from src.c.Teleporteur import Teleporteur
|
||||
|
||||
from src.c.Borne import Borne
|
||||
from src.c.DetailsPlaces import DetailsPlaces
|
||||
from src.c.log.log import Log
|
||||
from src.c.log.log import lvl
|
||||
from src.c.CreaParking import CreaParking
|
||||
from src.m.Service import Service
|
||||
from src.m.Parking import Parking
|
||||
from src.m.Service import TypeService
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
from src.v.MyQMainWindow import MyQMainWindow
|
||||
from src.v.Ui_MainWindow import Ui_MainWindow
|
||||
from src.c.Parking import CreaParking, DetailsPlaces
|
||||
from src.c.utils.connexionBDD import connexionBDD
|
||||
from src.c.utils.log import Log
|
||||
from src.c.utils.log import lvl
|
||||
from src.m.Abonnement import Client
|
||||
from src.m.Parking import Parking, Placement
|
||||
from src.m.Service import Service, TypeService
|
||||
from src.v.MyQt import MyQMainWindow
|
||||
from src.v.Ui_Admin import Ui_MainWindow
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Main:
|
||||
@ -43,6 +43,7 @@ class Main:
|
||||
self.__ui.actionSauvegarder.triggered.connect(self.sauver)
|
||||
self.__ui.actionCharger.triggered.connect(self.charger)
|
||||
self.__ui.actionQuitter.triggered.connect(self.quitter)
|
||||
self.__ui.btn_modif_livraison.clicked.connect(self.majLivraison)
|
||||
|
||||
|
||||
|
||||
@ -105,6 +106,8 @@ class Main:
|
||||
self.__ui.comboBox_livraison.clear()
|
||||
self.__ui.comboBox_entretien.clear()
|
||||
self.__ui.comboBox_maintenance.clear()
|
||||
self.__ui.dateTimeEdit.clear()
|
||||
self.__ui.lieuLineEdit.clear()
|
||||
self.__serviceLivraisons = []
|
||||
self.__serviceEntretien = []
|
||||
self.__serviceMaintenance = []
|
||||
@ -113,13 +116,21 @@ class Main:
|
||||
if s.typeService == TypeService.LIVRAISON:
|
||||
self.__serviceLivraisons.append(s)
|
||||
self.__ui.comboBox_livraison.addItem(str(s.info))
|
||||
time = QtCore.QDateTime(datetime.datetime.fromtimestamp(s.dateService))
|
||||
self.__ui.dateTimeEdit.setDateTime(time)
|
||||
self.__ui.lieuLineEdit.setText(str(s.lieu))
|
||||
|
||||
if s.typeService == TypeService.ENTRETIEN:
|
||||
self.__serviceEntretien.append(s)
|
||||
self.__ui.comboBox_entretien.addItem(str(s.info))
|
||||
if s.typeService == TypeService.MAINTENANCE:
|
||||
self.__serviceMaintenance.append(s)
|
||||
self.__ui.comboBox_maintenance.addItem(str(s.info))
|
||||
#Onglet Stats
|
||||
|
||||
#Onglet Stats
|
||||
self.__ui.labelNbAbo.setText(str(Client.nbAbo()))
|
||||
self.__ui.labelNbSuperAbo.setText(str(Client.nbSuperAbo()))
|
||||
self.__ui.labelMoySta.setText(str(Placement.dureeMoyPlacement()))
|
||||
|
||||
|
||||
def doMaintenance(self):
|
||||
@ -129,7 +140,7 @@ class Main:
|
||||
s.doService()
|
||||
self.activity("Livraision reussit : " + str(s), self.lvl.INFO)
|
||||
except Exception as e:
|
||||
self.activity("Livraision echoue : " + str(e), self.lvl.FAIL)
|
||||
self.activity("Livraision echoue : " + str(e), self.lvl.FAIL)
|
||||
self.error("Livraision echoué.")
|
||||
self.selectParking()
|
||||
|
||||
@ -149,12 +160,25 @@ class Main:
|
||||
try:
|
||||
s = self.__serviceLivraisons[self.__ui.comboBox_livraison.currentIndex()]
|
||||
s.doService()
|
||||
Teleporteur.teleporterVersSortie(s.placement)
|
||||
self.activity("Livraison reussit : " + str(s), self.lvl.INFO)
|
||||
except Exception as e:
|
||||
self.activity("Livraison echoue : " + str(e), self.lvl.FAIL)
|
||||
self.error("Livraison echoué.")
|
||||
self.selectParking()
|
||||
|
||||
def majLivraison(self):
|
||||
if len(self.__serviceLivraisons) > 0:
|
||||
try:
|
||||
s = self.__serviceLivraisons[self.__ui.comboBox_livraison.currentIndex()]
|
||||
s.maj(self.__ui.dateTimeEdit.dateTime().toPyDateTime().timestamp(),
|
||||
self.__ui.lieuLineEdit.text())
|
||||
self.activity("Maj Livraison reussit : " + str(s), self.lvl.INFO)
|
||||
except Exception as e:
|
||||
self.activity("Maj Livraison echoue : " + str(e), self.lvl.FAIL)
|
||||
self.error("Maj Livraison echoué.")
|
||||
self.selectParking()
|
||||
|
||||
def creerParking(self):
|
||||
self.__view.hide()
|
||||
self.__widgetCourant = CreaParking(self)
|
||||
@ -239,7 +263,7 @@ class Main:
|
||||
Qdialog message erreur
|
||||
:return:
|
||||
"""
|
||||
QtGui.QMessageBox.warning(self._w,
|
||||
QtGui.QMessageBox.warning(self.__widgetCourant,
|
||||
"Erreur ...",
|
||||
msg
|
||||
)
|
@ -1,11 +1,8 @@
|
||||
from PyQt4 import QtGui, QtCore
|
||||
|
||||
from src.m.Parking import Parking, TypePlace
|
||||
from src.v.MyQWidget import MyQWidget
|
||||
from src.v.Ui_CreaParking import Ui_CreaParking
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
from PyQt4.QtGui import QTableWidgetItem
|
||||
from src.m.Parking import TypePlace, Parking
|
||||
from src.v.MyQt import MyQWidget
|
||||
from src.v.Ui_Admin import Ui_CreaParking
|
||||
|
||||
|
||||
class CreaParking:
|
||||
@ -95,7 +92,6 @@ class CreaParking:
|
||||
:return:
|
||||
"""
|
||||
self._w.show()
|
||||
self._w.focusWidget() # reprend le focus sur la fenetre
|
||||
|
||||
def error(self, msg):
|
||||
"""
|
||||
@ -106,4 +102,29 @@ class CreaParking:
|
||||
"Erreur ...",
|
||||
"Erreur lors de la création du parking ...\n" +
|
||||
msg
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class DetailsPlaces(CreaParking):
|
||||
def __init__(self, main, parking):
|
||||
self.__parking = parking
|
||||
super(DetailsPlaces, self).__init__(main)
|
||||
|
||||
self._ui.lineEdit_nom.setText(parking.nom)
|
||||
for p in parking.typePlaces :
|
||||
row = self._ui.tableWidget.rowCount() - 1
|
||||
if row != 0:
|
||||
self._ui.tableWidget.insertRow(row)
|
||||
self._ui.tableWidget.setItem(row, 0, QTableWidgetItem(str(p.hauteur)))
|
||||
self._ui.tableWidget.setItem(row, 1, QTableWidgetItem(str(p.longueur)))
|
||||
self._ui.tableWidget.setItem(row, 2, QTableWidgetItem(str(p.nb)))
|
||||
|
||||
self._ui.lineEdit_nom.setDisabled(True)
|
||||
self._ui.tableWidget.setDisabled(True)
|
||||
self._ui.btn_annuler.setVisible(False)
|
||||
self._ui.btn_addRow.setVisible(False)
|
||||
self._ui.btn_rmRow.setVisible(False)
|
||||
|
||||
def valider(self):
|
||||
self._w.hide()
|
||||
self._main.showWindow()
|
@ -1,2 +1 @@
|
||||
__author__ = 'sidya'
|
||||
|
@ -1,7 +1,4 @@
|
||||
from shutil import copyfile
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
import sqlite3
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
"""
|
||||
Module de gestion de Log
|
||||
"""
|
||||
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
|
||||
@ -15,7 +19,7 @@ class bcolors:
|
||||
|
||||
class lvl:
|
||||
"""
|
||||
Define constant value for level log
|
||||
Define constant value for level utils
|
||||
"""
|
||||
NOTSET = 0
|
||||
DEBUG = 10
|
||||
@ -51,10 +55,10 @@ class Log(object):
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Define 3 differents log :
|
||||
activity.log -> all activity
|
||||
warning.log -> only warning
|
||||
error.log -> error
|
||||
Define 3 differents utils :
|
||||
activity.utils -> all activity
|
||||
warning.utils -> only warning
|
||||
error.utils -> error
|
||||
Write all message on terminal too
|
||||
"""
|
||||
self.logger = logging.getLogger()
|
||||
@ -80,9 +84,9 @@ class Log(object):
|
||||
|
||||
def printL(self, pMsg, pLvl):
|
||||
"""
|
||||
Add color and write in log with an define level
|
||||
pMsg : message to write in log
|
||||
pLvl : level of log message
|
||||
Add color and write in utils with an define level
|
||||
pMsg : message to write in utils
|
||||
pLvl : level of utils message
|
||||
"""
|
||||
if pLvl == lvl.DEBUG:
|
||||
pMsg = bcolors.DEBUG + str(pMsg) + bcolors.ENDC
|
132
src/m/Abonnement.py
Normal file
132
src/m/Abonnement.py
Normal file
@ -0,0 +1,132 @@
|
||||
"""
|
||||
Module qui implémente les classes representants les Abonnements de DreamPark.
|
||||
"""
|
||||
import random
|
||||
import string
|
||||
from src.c.utils.connexionBDD import connexionBDD
|
||||
|
||||
## Représentation d'un Client de DreamPark
|
||||
class Client:
|
||||
##
|
||||
# Contsructeur du Client
|
||||
# @param id Si None : Création du Client dans la bd a l'aide des autres parametres.
|
||||
# Sinon : tentative de récupération du client avec cet id dans la bd
|
||||
# @param nom nom du Client si creation
|
||||
# @param prenom prenom du Client si creation
|
||||
# @param cb cb du Client si creation
|
||||
# @param typeAbonnement typeabonnement du client si creation
|
||||
def __init__(self, id, nom=None, prenom=None, cb=None, typeAbonnement=None):
|
||||
|
||||
if id is None:
|
||||
self.__nom = nom
|
||||
self.__prenom = prenom
|
||||
self.__typeAbonnement = typeAbonnement
|
||||
self.__cb = cb
|
||||
while True:
|
||||
id = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in
|
||||
range(random.randint(1, 10)))
|
||||
try:
|
||||
Client(id)
|
||||
except IndexError:
|
||||
break
|
||||
self.__id = id
|
||||
c = connexionBDD()
|
||||
c.execute("INSERT INTO client (idClient, nom, prenom, cb, typeAbonnement) VALUES (?,?,?,?,?)",
|
||||
(str(self.__id), str(self.__nom), str(self.__prenom), str(self.__cb), str(self.__typeAbonnement)))
|
||||
c.seDeconnecter()
|
||||
else:
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT * FROM client WHERE idClient='" + str(id) + "'")
|
||||
row = r.fetchone()
|
||||
if row is None:
|
||||
raise IndexError("Invalid id")
|
||||
c.seDeconnecter()
|
||||
self.__id = id
|
||||
self.__nom = row["nom"]
|
||||
self.__prenom = row["prenom"]
|
||||
self.__typeAbonnement = row["typeAbonnement"]
|
||||
self.__cb = row["cb"]
|
||||
|
||||
## Mise a jour du Client
|
||||
# @param nom nouveau nom
|
||||
# @param prenom nouveau prenom
|
||||
# @param cb nouveau cb
|
||||
# @param typeAbonnement nouveau TypeAbonnement
|
||||
def maj(self, nom, prenom, cb, typeAbonnement):
|
||||
self.__nom = nom
|
||||
self.__prenom = prenom
|
||||
self.__typeAbonnement = typeAbonnement
|
||||
self.__cb = cb
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE client SET nom = ?, prenom = ?, cb = ?, typeAbonnement = ? WHERE idClient = ?",
|
||||
(str(self.__nom), str(self.__prenom), "", str(self.__typeAbonnement), str(self.__id)))
|
||||
c.seDeconnecter()
|
||||
|
||||
## Desabonne le Client en le supprimant
|
||||
def desabo(self):
|
||||
c = connexionBDD()
|
||||
c.execute("DELETE FROM client WHERE idClient ='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Propriete : prenom du Client
|
||||
@property
|
||||
def prenom(self):
|
||||
return self.__prenom
|
||||
|
||||
## Propriete : nom du Client
|
||||
@property
|
||||
def nom(self):
|
||||
return self.__nom
|
||||
|
||||
## Propriete : id du Client
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## Propriete : cb du Client
|
||||
@property
|
||||
def cb(self):
|
||||
return self.__cb
|
||||
|
||||
## Propriete : abonnement du Client
|
||||
@property
|
||||
def abonnement(self):
|
||||
return self.__typeAbonnement
|
||||
|
||||
## Retourne le nombre de super abonné
|
||||
# @return nombre de super abonné
|
||||
@staticmethod
|
||||
def nbSuperAbo():
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT COUNT(*) FROM client WHERE typeAbonnement = " + str(TypeAbonnement.SUPER_ABONNE))
|
||||
nb = r.fetchone()[0]
|
||||
c.seDeconnecter()
|
||||
return nb
|
||||
|
||||
## Retourne le nombre d'abonné
|
||||
# @return nombre d'abonné
|
||||
@staticmethod
|
||||
def nbAbo():
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT COUNT(*) FROM client WHERE typeAbonnement = " + str(TypeAbonnement.ABONNE))
|
||||
nb = r.fetchone()[0]
|
||||
c.seDeconnecter()
|
||||
return nb
|
||||
|
||||
|
||||
|
||||
## Representation du Client en chaine
|
||||
def __str__(self):
|
||||
return "[Client :" \
|
||||
" id = " + str(self.__id) + ", "+\
|
||||
" prenom = " + str(self.__prenom) + ", "+\
|
||||
" nom = " + str(self.__nom) + ", " +\
|
||||
" cb = " + str( self.__cb) + ", " +\
|
||||
" typeAbonnement = " + str(self.__typeAbonnement) + "]"
|
||||
|
||||
## Classe définissant les constantes de TypeAbonnement disponible pour le Client
|
||||
class TypeAbonnement:
|
||||
ABONNE = 0
|
||||
SUPER_ABONNE = 1
|
||||
|
||||
|
@ -1,90 +0,0 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Client:
|
||||
def __init__(self, id, nom=None, prenom=None, adresse=None, typeAbonnement=None):
|
||||
if id is None:
|
||||
self.__nom = nom
|
||||
self.__prenom = prenom
|
||||
self.__typeAbonnement = typeAbonnement
|
||||
self.__adresse = adresse
|
||||
while True:
|
||||
id = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in
|
||||
range(random.randint(1, 10)))
|
||||
try:
|
||||
Client(id)
|
||||
except IndexError:
|
||||
break
|
||||
self.__id = id
|
||||
c = connexionBDD()
|
||||
c.execute("INSERT INTO client (idClient, nom, prenom, adresse, typeAbonnement) VALUES (?,?,?,?,?)",
|
||||
(str(self.__id), str(self.__nom), str(self.__prenom), "", str(self.__typeAbonnement)))
|
||||
c.seDeconnecter()
|
||||
else:
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT * FROM client WHERE idClient='" + str(id) + "'")
|
||||
row = r.fetchone()
|
||||
if row is None:
|
||||
raise IndexError("Invalid id")
|
||||
c.seDeconnecter()
|
||||
self.__id = id
|
||||
self.__nom = row["nom"]
|
||||
self.__prenom = row["prenom"]
|
||||
self.__typeAbonnement = row["typeAbonnement"]
|
||||
self.__adresse = row["adresse"]
|
||||
|
||||
def maj(self, nom, prenom, adresse, typeAbonnement):
|
||||
self.__nom = nom
|
||||
self.__prenom = prenom
|
||||
self.__typeAbonnement = typeAbonnement
|
||||
self.__adresse = adresse
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE client SET nom = ?, prenom = ?, adresse = ?, typeAbonnement = ? WHERE idClient = ?",
|
||||
(str(self.__nom), str(self.__prenom), "", str(self.__typeAbonnement), str(self.__id)))
|
||||
c.seDeconnecter()
|
||||
|
||||
def desabo(self):
|
||||
c = connexionBDD()
|
||||
c.execute("DELETE FROM client WHERE idClient ='" + str(id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
|
||||
@property
|
||||
def prenom(self):
|
||||
return self.__prenom
|
||||
|
||||
@property
|
||||
def nom(self):
|
||||
return self.__nom
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
@property
|
||||
def adr(self):
|
||||
return self.__adresse
|
||||
|
||||
@property
|
||||
def abonnement(self):
|
||||
return self.__typeAbonnement
|
||||
|
||||
def __str__(self):
|
||||
return "[Client :" \
|
||||
" id = " + str(self.__id) + ", " \
|
||||
" prenom = " + str(self.__prenom) + ", " \
|
||||
" nom = " + str(self.__nom) + ", " \
|
||||
" adresse = " + str(
|
||||
self.__adresse) + ", " \
|
||||
" typeAbonnement = " + str(self.__typeAbonnement) + "]"
|
||||
|
||||
|
||||
class TypeAbonnement:
|
||||
ABONNE = 0
|
||||
SUPER_ABONNE = 1
|
198
src/m/Parking.py
198
src/m/Parking.py
@ -1,22 +1,22 @@
|
||||
"""
|
||||
Module qui implémente les classes representants un parking de DreamPark.
|
||||
"""
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
from src.c.utils.connexionBDD import connexionBDD
|
||||
from src.m.Voiture import Voiture
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
from src.m.Voiture import Voiture
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
## Representation d'un parking de DreamPark
|
||||
class Parking:
|
||||
parkings = []
|
||||
|
||||
## Retourne un objet parking correspondant à id
|
||||
# @param id id du Parking a retourner
|
||||
@staticmethod
|
||||
def get(id):
|
||||
if len(Parking.parkings) == 0:
|
||||
@ -25,6 +25,7 @@ class Parking:
|
||||
if p.id == id:
|
||||
return p
|
||||
|
||||
## Retourne tout les Parking actif present dans la bd
|
||||
@staticmethod
|
||||
def getAllActif():
|
||||
if len(Parking.parkings) == 0:
|
||||
@ -36,6 +37,8 @@ class Parking:
|
||||
Parking(row["idParking"], row["nom"], None)
|
||||
return Parking.parkings
|
||||
|
||||
## Supprime un parking
|
||||
# @param parking L'objet parking a supprimer
|
||||
@staticmethod
|
||||
def remove(parking):
|
||||
Parking.parkings.remove(parking)
|
||||
@ -43,11 +46,15 @@ class Parking:
|
||||
c.execute("UPDATE parking SET actif = 0 WHERE idParking='" + str(parking.id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Supprime les parkings present dans la mémoire vive (pas dans la bd)
|
||||
@staticmethod
|
||||
def removeAllRam():
|
||||
Parking.parkings = []
|
||||
|
||||
|
||||
## Constructeur du Parking
|
||||
# @param id Si None : Cree un Parking dans la BD Sinon : tentative de récupération du Parking avec cet id dans la bd
|
||||
# @param nom : Si creation nom du parking
|
||||
# @param listeTypePlace : Si creation Liste des TypePlace du parking
|
||||
def __init__(self, id, nom=None, listeTypePlace=None):
|
||||
self.__nom = nom
|
||||
if id is None:
|
||||
@ -69,43 +76,56 @@ class Parking:
|
||||
self.__id = id
|
||||
self.parkings.append(self)
|
||||
|
||||
## Propriete : id du Parking
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## propriete : nom du Parking
|
||||
@property
|
||||
def nom(self):
|
||||
return self.__nom
|
||||
|
||||
## propriete : nombre de Place du Parking
|
||||
@property
|
||||
def nbPlaces(self):
|
||||
return Place.nbPlaceParking(self.__id)
|
||||
|
||||
## propriete : nombre de Place libres du Parking
|
||||
@property
|
||||
def nbPlacesLibresParking(self):
|
||||
return Place.nbPlaceLibreParking(self.__id)
|
||||
|
||||
## propriete : nombre de Place super abo
|
||||
@property
|
||||
def nbSuperAbo(self):
|
||||
return Place.nbSuperAbo(self.__id)
|
||||
|
||||
## Recherche une place pour une voiture
|
||||
# @param voiture voiture pour laquel on recherche la place
|
||||
# @return Place Si touvé : Place sinon : None
|
||||
def recherchePlace(self, voiture):
|
||||
"""
|
||||
Permet de rechercher une place valide pour une voiture
|
||||
:param voiture: Voiture
|
||||
:return: Place
|
||||
"""
|
||||
return Place.placeValide(self.__id, voiture)
|
||||
|
||||
def addPlaceSuperAbo(self, parking):
|
||||
return Place(None, parking, None, None, False, True)
|
||||
## Ajout d'une place surmesure pour super abo
|
||||
# @param parking le parking ou il faut ajouter la place
|
||||
def addPlaceSuperAbo(self):
|
||||
return Place(None, self, None, None, False, True)
|
||||
|
||||
## Representation du Parking en chaine
|
||||
def __str__(self):
|
||||
return "[Parking : nom = " + self.__nom + "]"
|
||||
|
||||
|
||||
## Representation d'une place de DreamPark
|
||||
class Place:
|
||||
def __init__(self, id=None, parking=None, typePlace=None, numero=None, estLibre=True, estSuperAbo=False):
|
||||
## Contructeur de Place
|
||||
# @param id Si None : creation de la Place dans la bd Sinon : tentative de récupération de la Place avec cet id dans la bd
|
||||
# @param parking Si creation : le Parking ou est creer la Place
|
||||
# @param typePlace Si creation : le TypePlace de Place
|
||||
# @param numero Si creation : le numero de Place
|
||||
# @param estLibre Si creation : Si la Place est libre ou non
|
||||
# @param estSuperAbo Si creation : Si la Place est superAbo ou non
|
||||
def __init__(self, id, parking=None, typePlace=None, numero=None, estLibre=True, estSuperAbo=False):
|
||||
if id is None:
|
||||
self.__parking = parking
|
||||
self.__typePlace = typePlace
|
||||
@ -137,17 +157,10 @@ class Place:
|
||||
self.__estSuperAbo = row["estSuperAbo"]
|
||||
self.__id = id
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
|
||||
## Rend la Place la indisponible
|
||||
def prendre(self):
|
||||
"""
|
||||
Rend la place indisponible
|
||||
:param Placement:
|
||||
:return:
|
||||
"""
|
||||
if (self.__estLibre == False):
|
||||
raise Exception("Place déjà prise")
|
||||
self.__estLibre = False
|
||||
@ -155,31 +168,49 @@ class Place:
|
||||
c.execute("UPDATE place SET estLibre = 0 WHERE idPlace ='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Rend la Place disponible
|
||||
def liberer(self):
|
||||
"""
|
||||
Libere une place non dispo
|
||||
:return:
|
||||
"""
|
||||
if (self.__estLibre == True):
|
||||
raise Exception("Impossible de liberer une place vide")
|
||||
self.__estLibre = True
|
||||
c = connexionBDD()
|
||||
c.execute(
|
||||
"UPDATE place SET estLibre = 1, fin ='" + str(time.time()) + "' WHERE idPlace ='" + str(self.__id) + "'")
|
||||
c.execute("UPDATE place SET estLibre = 1 WHERE idPlace ='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Suppression place de la bd
|
||||
def supprimer(self):
|
||||
c = connexionBDD()
|
||||
c.execute("DELETE FROM place idPlace ='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## propriete : id de la Place
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## propriete : identification etage : numero de la Place
|
||||
@property
|
||||
def identification(self):
|
||||
return str(chr(self.__typePlace.niveau + ord('A')) + ":" + str(self.__numero))
|
||||
|
||||
## propriete : True si la place est Place
|
||||
@property
|
||||
def estlibre(self):
|
||||
return self.__estLibre
|
||||
|
||||
## propriete : typePlace de la Place
|
||||
@property
|
||||
def typePlace(self):
|
||||
return self.__typePlace
|
||||
|
||||
## propriete : typePlace de la Place
|
||||
@property
|
||||
def estSuperAbo(self):
|
||||
return self.__estSuperAbo
|
||||
|
||||
## Retourne les nombre de place du Parking d'id idParking
|
||||
# @param idParking l'id du Parking
|
||||
# @return le nombre de Place
|
||||
@staticmethod
|
||||
def nbPlaceParking(idParking):
|
||||
c = connexionBDD()
|
||||
@ -188,6 +219,9 @@ class Place:
|
||||
c.seDeconnecter()
|
||||
return row[0]
|
||||
|
||||
## Retourne les nombre de place libre du Parking d'id idParking
|
||||
# @param idParking l'id du Parking
|
||||
# @return le nombre de Place libre
|
||||
@staticmethod
|
||||
def nbPlaceLibreParking(idParking):
|
||||
c = connexionBDD()
|
||||
@ -196,6 +230,9 @@ class Place:
|
||||
c.seDeconnecter()
|
||||
return row[0]
|
||||
|
||||
## Retourne les nombre de place superAbo du Parking d'id idParking
|
||||
# @param idParking l'id du Parking
|
||||
# @return le nombre de Place superAbo
|
||||
@staticmethod
|
||||
def nbSuperAbo(idParking):
|
||||
c = connexionBDD()
|
||||
@ -204,6 +241,10 @@ class Place:
|
||||
c.seDeconnecter()
|
||||
return row[0]
|
||||
|
||||
## Retourne si une Place valide pour une Voiture dans un parking
|
||||
# @param idParking id du Parking ou est recherché la place
|
||||
# @param voiture Voiture pour laquelle est recherché la place
|
||||
# @return Si non trouve : None. Sinon : Place une place valide
|
||||
@staticmethod
|
||||
def placeValide(idPArking, voiture):
|
||||
c = connexionBDD()
|
||||
@ -220,17 +261,25 @@ class Place:
|
||||
row["numero"], bool(row["estLibre"]), bool(row["estSuperAbo"]))
|
||||
|
||||
|
||||
## Representation d'une Place en chaine
|
||||
def __str__(self):
|
||||
return "[Place : " \
|
||||
"Parking = " + str(self.__parking) + "," \
|
||||
"typePlace = " + str(self.__typePlace) + "," \
|
||||
"numero = " + str(
|
||||
self.__numero) + "," \
|
||||
"estLibre = " + str(self.__estLibre) + "," \
|
||||
"estSuperAbo = " + str(self.__estSuperAbo) + "]" \
|
||||
\
|
||||
\
|
||||
return "[Place : " +\
|
||||
"Parking = " + str(self.__parking) + ","+\
|
||||
"typePlace = " + str(self.__typePlace) + ","+\
|
||||
"numero = " + str(self.__numero) + ","+\
|
||||
"estLibre = " + str(self.__estLibre) + ","+\
|
||||
"estSuperAbo = " + str(self.__estSuperAbo) + "]"
|
||||
|
||||
|
||||
## Representation d'un TypePlace de DreamPark
|
||||
class TypePlace:
|
||||
## Constructeur de TypePlace
|
||||
# @param id Si None : creation du TypePlace dans la bd Sinon : tentative de récupération du TypePlace avec cet id dans la bd
|
||||
# @param longueur Longueur de la Place en cm
|
||||
# @param hauteur Hauteur de la Place en cm
|
||||
# @param nombre Nombre de Place de ce type
|
||||
# @param prix Le prix pur ce type de Place
|
||||
# @param niveau Le niveau ou se trouve les Place
|
||||
def __init__(self, id, longueur=None, hauteur=None, nombre=None, prix=None, niveau=None):
|
||||
if id is None:
|
||||
self.__longueur = longueur
|
||||
@ -257,50 +306,53 @@ class TypePlace:
|
||||
self.__niveau = row["niveau"]
|
||||
self.__id = id
|
||||
|
||||
## propriete : id du Typeplace
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## propriete : longueur du Typeplace
|
||||
@property
|
||||
def longueur(self):
|
||||
return self.__longueur
|
||||
|
||||
## propriete : hauteur du Typeplace
|
||||
@property
|
||||
def hauteur(self):
|
||||
return self.__hauteur
|
||||
|
||||
## propriete : nombre du Typeplace
|
||||
@property
|
||||
def nombre(self):
|
||||
return self.__nombre
|
||||
|
||||
## propriete : prix du Typeplace
|
||||
@property
|
||||
def prix(self):
|
||||
return self.__prix
|
||||
|
||||
## propriete : niveau du Typeplace
|
||||
@property
|
||||
def niveau(self):
|
||||
return self.__niveau
|
||||
|
||||
## Representation du TypePlace en chaine
|
||||
def __str__(self):
|
||||
return "[TypePlace : " \
|
||||
"id = " + str(self.__id) + "," \
|
||||
"longueur = " + str(self.__longueur) + "," \
|
||||
"hauteur = " + str(
|
||||
self.__hauteur) + "," \
|
||||
"nombre = " + str(self.__nombre) + "," \
|
||||
"prix = " + str(self.__prix) + "," \
|
||||
"niveau = " + str(
|
||||
self.__niveau) + "]"
|
||||
|
||||
"id = " + str(self.__id) + ","+\
|
||||
"longueur = " + str(self.__longueur) + ","+\
|
||||
"hauteur = " + str(self.__hauteur) + ","+\
|
||||
"nombre = " + str(self.__nombre) + "," +\
|
||||
"prix = " + str(self.__prix) + ","+\
|
||||
"niveau = " + str(self.__niveau) + "]"
|
||||
|
||||
## Representation d'un Placement de DreamPark
|
||||
class Placement:
|
||||
def __init__(self, id, voiture=None, place=None, debut=None, fin=None):
|
||||
"""
|
||||
Creer un placement
|
||||
:param voiture: Voiture
|
||||
:param place: Place
|
||||
:return:
|
||||
"""
|
||||
## Constructeur Placement
|
||||
# @param id Si None : creation du Placement dans la bd Sinon : tentative de récupération du Placement avec cet id dans la bd
|
||||
# @param voiture Si creation : Voiture lié au Placement
|
||||
# @param place Si creation : Place lié au Placement
|
||||
def __init__(self, id, voiture=None, place=None):
|
||||
if id is None:
|
||||
self.__voiture = voiture
|
||||
self.__place = place
|
||||
@ -328,33 +380,47 @@ class Placement:
|
||||
self.__voiture = Voiture(row["idVoiture"])
|
||||
self.__place = Place(row["idPlace"])
|
||||
self.__id = id
|
||||
self.__debut = debut
|
||||
self.__fin = fin
|
||||
self.__debut = row["debut"]
|
||||
self.__fin = row["fin"]
|
||||
|
||||
## Propriete : id du Placement
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## Propriete : place liée du Placement
|
||||
@property
|
||||
def place(self):
|
||||
return self.__place
|
||||
|
||||
## Propriete : voiture liée du Placement
|
||||
@property
|
||||
def voiture(self):
|
||||
return self.__voiture
|
||||
|
||||
## Retourne la durée moyenne des placement
|
||||
# @return duree moyenne placement
|
||||
@staticmethod
|
||||
def dureeMoyPlacement():
|
||||
c = connexionBDD()
|
||||
r= c.execute("SELECT AVG(FIN - DEBUT) AS duree FROM placement")
|
||||
nb = r.fetchone()[0]
|
||||
c.seDeconnecter()
|
||||
return nb
|
||||
|
||||
## Fin du placement (depart voiture)
|
||||
def end(self):
|
||||
self.__fin = time.time()
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE placement SET fin='" + str(self.__fin) + "' WHERE idPlacement='" + str(id) + "'")
|
||||
c.execute("UPDATE placement SET fin='" + str(self.__fin) + "' WHERE idPlacement='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
self.__place.liberer()
|
||||
|
||||
## Representation du Placement en chaine
|
||||
def __str__(self):
|
||||
return "[Placement : " \
|
||||
"id = " + str(self.__id) + "," \
|
||||
"Voiture = " + str(self.__voiture) + "," \
|
||||
"Place = " + str(self.__place) + "," \
|
||||
"Debut = " + str(
|
||||
self.__debut) + "," \
|
||||
"Fin = " + str(self.__fin) + "]"
|
||||
"id = " + str(self.__id) + "," +\
|
||||
"Voiture = " + str(self.__voiture) + ","+\
|
||||
"Place = " + str(self.__place) + "," +\
|
||||
"Debut = " + str( self.__debut) + "," +\
|
||||
"Fin = " + str(self.__fin) + "]"
|
104
src/m/Service.py
104
src/m/Service.py
@ -1,55 +1,65 @@
|
||||
import time
|
||||
|
||||
from src.m.Client import Client
|
||||
from src.c.utils.connexionBDD import connexionBDD
|
||||
from src.m.Abonnement import Client
|
||||
from src.m.Parking import Placement
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
## Representation d'un Service de DreamPack
|
||||
class Service:
|
||||
## Retourne tout les services en cours dans le Parking parking
|
||||
# @param parking Parking dont on veut connaitre les services
|
||||
# @return Liste Service en cours
|
||||
@staticmethod
|
||||
def getAllEnCours(parking):
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT * FROM service WHERE dateRealisation is NULL "
|
||||
r = c.execute("SELECT idService FROM service WHERE dateRealisation is NULL "
|
||||
"AND idPlacement IN (SELECT idPlacement FROM PLACEMENT WHERE "
|
||||
"idPlace IN (SELECT idPlace FROM Place WHERE idParking = '" + str(parking.id) + "'))")
|
||||
rows = r.fetchall()
|
||||
c.seDeconnecter()
|
||||
l = []
|
||||
for row in rows:
|
||||
l.append(Service(row["idService"], Client(row["idClient"]), Placement(row["idPlacement"]),
|
||||
row["typeService"], row["dateDemande"], row["dateService"], row["dateRealisation"]))
|
||||
l.append(Service(row["idService"]))
|
||||
print("l = " + str(l))
|
||||
return l
|
||||
|
||||
## Retourne tout les services associé a un Placement
|
||||
# @param parking Parking dont on veut connaitre les services
|
||||
# @return Liste Service associé a un Placement
|
||||
@staticmethod
|
||||
def getAllServicePlacement(placement):
|
||||
c = connexionBDD()
|
||||
r = c.execute("SELECT * FROM service WHERE idPlacement ='" + str(placement.id) + "'")
|
||||
r = c.execute("SELECT idService FROM service WHERE idPlacement ='" + str(placement.id) + "'")
|
||||
rows = r.fetchall()
|
||||
c.seDeconnecter()
|
||||
l = []
|
||||
for row in rows:
|
||||
l.append(Service(row["idService"], Client(row["idClient"]), Placement(row["idPlacement"]),
|
||||
row["typeService"], row["dateDemande"], row["dateService"], row["dateRealisation"]))
|
||||
l.append(Service(row["idService"]))
|
||||
print("l = " + str(l))
|
||||
return l
|
||||
|
||||
## Contructeur d'un Service
|
||||
# @param id Si None : Cree un Service dans la BD Sinon : tentative de récupération du Service avec cet id dans la bd
|
||||
# @param client Si creation : Client associe au Service
|
||||
# @param placement Si creation : Placement associe au Service
|
||||
# @param typeService Si creation : TypeService du Service
|
||||
# @param dateService Si creation : date ou sera realise le service si necessaire
|
||||
# @param lieu Si creation : lieu ou realise le service si necessaire
|
||||
def __init__(self, id, client=None, placement=None, typeService=None,
|
||||
dateService=None, dateDemande=time.time(), dateRealisation=None):
|
||||
dateService="NULL", lieu =""):
|
||||
if id is None:
|
||||
self.__client = client
|
||||
self.__placement = placement
|
||||
self.__typeService = typeService
|
||||
self.__dateDemande = dateDemande
|
||||
self.__dateDemande = time.time()
|
||||
self.__dateService = dateService
|
||||
self.__dateRealisation = dateRealisation
|
||||
self.__dateRealisation = "NULL"
|
||||
self.__lieu = lieu
|
||||
c = connexionBDD()
|
||||
c.execute("INSERT INTO service (idClient,idPlacement, typeService, dateDemande) VALUES (?,?,?,?)",
|
||||
c.execute("INSERT INTO service (idClient,idPlacement, typeService, dateDemande,dateService,lieu) VALUES (?,?,?,?,?,?)",
|
||||
(str(self.__client.id), str(self.__placement.id), str(self.__typeService),
|
||||
str(self.__dateDemande)))
|
||||
str(self.__dateDemande), str(self.__dateService),str(self.__lieu)))
|
||||
self.__id = c.lastId()
|
||||
c.seDeconnecter()
|
||||
else:
|
||||
@ -66,31 +76,44 @@ class Service:
|
||||
self.__dateDemande = row["dateDemande"]
|
||||
self.__dateService = row["dateService"]
|
||||
self.__dateRealisation = row["dateRealisation"]
|
||||
self.__lieu = row["lieu"]
|
||||
|
||||
|
||||
## Propriete : id Service
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## Propriete : TypeService du Service
|
||||
@property
|
||||
def typeService(self):
|
||||
return self.__typeService
|
||||
|
||||
## Propriete : Placement associe au Service
|
||||
@property
|
||||
def placement(self):
|
||||
return self.__placement
|
||||
|
||||
## Propriete : date ou le Service doit etre realisé
|
||||
@property
|
||||
def dateService(self):
|
||||
return self.__dateService
|
||||
|
||||
## Propriete : lieu ou le Service doit etre realisé
|
||||
@property
|
||||
def lieu(self):
|
||||
return self.__lieu
|
||||
|
||||
## Propriete : information interessante pout l'admin pour un Service
|
||||
@property
|
||||
def info(self):
|
||||
str = "Place : " + self.__placement.place.identification + "Imma : " + self.__placement.voiture.immatriculation
|
||||
if self.typeService == TypeService.LIVRAISON:
|
||||
str += "Date : " + self.__dateService
|
||||
return str
|
||||
return "Place : " + self.__placement.place.identification + " Imma : " + self.__placement.voiture.immatriculation
|
||||
|
||||
## Propriete : Retour si un service a été réalisé du Service
|
||||
@property
|
||||
def estRealise(self):
|
||||
return self.__dateRealisation is None or self.__dateRealisation == "NULL"
|
||||
return self.__dateRealisation is not None and not self.__dateRealisation == "NULL"
|
||||
|
||||
## Passe le service comme realise
|
||||
def doService(self):
|
||||
self.__dateRealisation = time.time()
|
||||
c = connexionBDD()
|
||||
@ -98,18 +121,37 @@ class Service:
|
||||
self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Passe a un service a un etat de non realisé si le Client recupere sa Voiture avant que le Service est été réalisé
|
||||
def nonRealise(self):
|
||||
self.__dateRealisation = 1
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE service SET dateRealisation = '" + str(self.__dateRealisation) + "' WHERE idService='" + str(
|
||||
self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## mise a jour de infos de livraison
|
||||
def maj(self, datetime, lieu):
|
||||
self.__dateService = datetime
|
||||
self.__lieu = lieu
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE service SET dateService = '" + str(self.__dateService) +
|
||||
"' , lieu = '" + str(self.__lieu) +
|
||||
"' WHERE idService='" + str(self.__id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
## Representation en chaine d'un Service
|
||||
def __str__(self):
|
||||
return "[Service : " \
|
||||
"id = " + str(self.__id) + "," \
|
||||
"Client = " + str(self.__client) + "," \
|
||||
"TypeService = " + str(
|
||||
self.__typeService) + "," \
|
||||
"DateDemande = " + str(self.__dateDemande) + "," \
|
||||
"DateService = " + str(
|
||||
self.__dateService) + "," \
|
||||
"DateRealisation = " + str(self.__dateRealisation) + "]"
|
||||
|
||||
"id = " + str(self.__id) + ","+\
|
||||
"Client = " + str(self.__client) + "," +\
|
||||
"Placement = " + str(self.__placement) + "," +\
|
||||
"TypeService = " + str( self.__typeService) + ","+\
|
||||
"DateDemande = " + str(self.__dateDemande) + ","+\
|
||||
"DateService = " + str( self.__dateService) + "," +\
|
||||
"DateRealisation = " + str(self.__dateRealisation) + \
|
||||
"Lieu = " + str( self.__lieu) +" ]"
|
||||
|
||||
## Classe Representant les différents TypeService
|
||||
class TypeService:
|
||||
MAINTENANCE = 1
|
||||
ENTRETIEN = 2
|
||||
|
@ -1,10 +1,17 @@
|
||||
from src.m.Client import Client
|
||||
from src.m.connexionBDD import connexionBDD
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
"""
|
||||
Module qui implémente les classes representants d'une voiture de DreamPark.
|
||||
"""
|
||||
from src.c.utils.connexionBDD import connexionBDD
|
||||
from src.m.Abonnement import Client
|
||||
|
||||
## Representation d'une Voiture de DreamPark
|
||||
class Voiture:
|
||||
## Constucteur Voiture
|
||||
# @param id Si None : Cree une Voiture dans la BD Sinon : tentative de récupération de la Voiture avec cet id dans la bd
|
||||
# @param client Si creation Client qui posséde la Voiture
|
||||
# @param longueur Si creation longueur de la Voiture
|
||||
# @param hauteur Si creation hauteur de la Voiture
|
||||
# @param imma Si creation imma de la Voiture
|
||||
def __init__(self, id, client=None, longueur=None, hauteur=None, imma=None):
|
||||
if id is None:
|
||||
if client is None:
|
||||
@ -37,38 +44,44 @@ class Voiture:
|
||||
self.__hauteur = row["hauteur"]
|
||||
self.__imma = row["imma"]
|
||||
|
||||
## Met a jour la possesion d'un voiture par un Client
|
||||
# @param client Client qui posséde la voiture
|
||||
def setClient(self, client):
|
||||
self.__client = client
|
||||
c = connexionBDD()
|
||||
c.execute("UPDATE voiture SET idClient = '" + str(client.id) + "' WHERE idVoiture='" + str(self.id) + "'")
|
||||
c.seDeconnecter()
|
||||
|
||||
|
||||
## propriete : id Voiture
|
||||
@property
|
||||
def id(self):
|
||||
return self.__id
|
||||
|
||||
## propriete : hauteur Voiture
|
||||
@property
|
||||
def hauteur(self):
|
||||
return self.__hauteur
|
||||
|
||||
## propriete : longueur Voiture
|
||||
@property
|
||||
def longueur(self):
|
||||
return self.__longueur
|
||||
|
||||
## propriete : immatriculation Voiture
|
||||
@property
|
||||
def immatriculation(self):
|
||||
return self.__imma
|
||||
|
||||
## propriete : Client possedant Voiture
|
||||
@property
|
||||
def client(self):
|
||||
return self.__client
|
||||
|
||||
## Representation d'une Voiture en chaine
|
||||
def __str__(self):
|
||||
return "[Voiture :" \
|
||||
" id = " + str(self.__id) + ", " \
|
||||
" client = " + str(self.__client) + ", " \
|
||||
" longueur = " + str(
|
||||
self.__longueur) + ", " \
|
||||
" hauteur = " + str(self.__hauteur) + ", " \
|
||||
" imma = " + str(self.__imma) + "]"
|
||||
" id = " + str(self.__id) + ", "+\
|
||||
" client = " + str(self.__client) + ", " +\
|
||||
" longueur = " + str(self.__longueur) + ", " +\
|
||||
" hauteur = " + str(self.__hauteur) + ", " +\
|
||||
" imma = " + str(self.__imma) + "]"
|
@ -50,7 +50,7 @@ CREATE TABLE client (
|
||||
idClient VARCHAR(10) PRIMARY KEY,
|
||||
nom VARCHAR(20),
|
||||
prenom VARCHAR(20),
|
||||
adresse VARCHAR(50),
|
||||
cb VARCHAR(50),
|
||||
typeAbonnement INTEGER
|
||||
);
|
||||
|
||||
@ -71,6 +71,7 @@ CREATE TABLE service (
|
||||
dateDemande TIMESTAMP,
|
||||
dateService TIMESTAMP DEFAULT NULL,
|
||||
dateRealisation TIMESTAMP DEFAULT NULL,
|
||||
lieu VARCHAR(255),
|
||||
FOREIGN KEY (idClient) REFERENCES client(idClient),
|
||||
FOREIGN KEY (idPlacement) REFERENCES placement(idPlacement)
|
||||
);
|
@ -1,12 +1,7 @@
|
||||
import random
|
||||
import string
|
||||
|
||||
from src.m.Voiture import Voiture
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Camera:
|
||||
@staticmethod
|
||||
def donnerVoiture():
|
||||
|
@ -1,14 +0,0 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class MyQMainWindow(QtGui.QMainWindow):
|
||||
def closeEvent(self, event):
|
||||
result = QtGui.QMessageBox.question(self,
|
||||
"Confirmer Fermeture...",
|
||||
"Etes vous sur de vouloir quitter ?",
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||
event.ignore()
|
||||
if result == QtGui.QMessageBox.Yes:
|
||||
event.accept()
|
@ -1,19 +1,3 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class MyQWidget(QtGui.QWidget):
|
||||
def __init__(self, main):
|
||||
super(MyQWidget, self).__init__()
|
||||
self.__main = main
|
||||
|
||||
def closeEvent(self, event):
|
||||
result = QtGui.QMessageBox.question(self,
|
||||
"Confirmer Fermeture...",
|
||||
"Etes vous sur de vouloir quitter ?\n",
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||
event.ignore()
|
||||
if result == QtGui.QMessageBox.Yes:
|
||||
event.accept()
|
||||
self.__main.showWindow()
|
38
src/v/MyQt.py
Normal file
38
src/v/MyQt.py
Normal file
@ -0,0 +1,38 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
|
||||
class MyQMainWindow(QtGui.QMainWindow):
|
||||
def closeEvent(self, event):
|
||||
result = QtGui.QMessageBox.question(self,
|
||||
"Confirmer Fermeture...",
|
||||
"Etes vous sur de vouloir quitter ?",
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||
event.ignore()
|
||||
if result == QtGui.QMessageBox.Yes:
|
||||
event.accept()
|
||||
|
||||
def error(self, msg):
|
||||
"""
|
||||
Qdialog message erreur
|
||||
:return:
|
||||
"""
|
||||
QtGui.QMessageBox.warning(self._w,
|
||||
"Erreur ...",
|
||||
msg
|
||||
)
|
||||
|
||||
|
||||
class MyQWidget(QtGui.QWidget):
|
||||
def __init__(self, main):
|
||||
super(MyQWidget, self).__init__()
|
||||
self.__main = main
|
||||
|
||||
def closeEvent(self, event):
|
||||
result = QtGui.QMessageBox.question(self,
|
||||
"Confirmer Fermeture...",
|
||||
"Etes vous sur de vouloir quitter ?\n",
|
||||
QtGui.QMessageBox.Yes | QtGui.QMessageBox.No)
|
||||
event.ignore()
|
||||
if result == QtGui.QMessageBox.Yes:
|
||||
event.accept()
|
||||
self.__main.showWindow()
|
@ -1,12 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'main.ui'
|
||||
#
|
||||
# Created: Thu Jan 22 09:11:44 2015
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
@ -32,15 +23,12 @@ class Ui_MainWindow(object):
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setGeometry(QtCore.QRect(20, 40, 561, 501))
|
||||
self.tabWidget.setGeometry(QtCore.QRect(10, 40, 561, 501))
|
||||
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
|
||||
self.tab = QtGui.QWidget()
|
||||
self.tab.setObjectName(_fromUtf8("tab"))
|
||||
self.label = QtGui.QLabel(self.tab)
|
||||
self.label.setGeometry(QtCore.QRect(40, 10, 61, 15))
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.listWidget = QtGui.QListWidget(self.tab)
|
||||
self.listWidget.setGeometry(QtCore.QRect(60, 50, 431, 261))
|
||||
self.listWidget.setGeometry(QtCore.QRect(10, 10, 531, 451))
|
||||
self.listWidget.setObjectName(_fromUtf8("listWidget"))
|
||||
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
||||
self.tab_2 = QtGui.QWidget()
|
||||
@ -112,26 +100,60 @@ class Ui_MainWindow(object):
|
||||
self.btn_effectuer_entretien.setGeometry(QtCore.QRect(326, 60, 161, 27))
|
||||
self.btn_effectuer_entretien.setObjectName(_fromUtf8("btn_effectuer_entretien"))
|
||||
self.groupBox_3 = QtGui.QGroupBox(self.tab_3)
|
||||
self.groupBox_3.setGeometry(QtCore.QRect(30, 290, 511, 111))
|
||||
self.groupBox_3.setGeometry(QtCore.QRect(30, 290, 511, 171))
|
||||
self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
|
||||
self.comboBox_livraison = QtGui.QComboBox(self.groupBox_3)
|
||||
self.comboBox_livraison.setGeometry(QtCore.QRect(10, 20, 481, 27))
|
||||
self.comboBox_livraison.setObjectName(_fromUtf8("comboBox_livraison"))
|
||||
self.btn_effectuer_livraison = QtGui.QPushButton(self.groupBox_3)
|
||||
self.btn_effectuer_livraison.setGeometry(QtCore.QRect(326, 70, 161, 27))
|
||||
self.btn_effectuer_livraison.setGeometry(QtCore.QRect(320, 120, 161, 27))
|
||||
self.btn_effectuer_livraison.setObjectName(_fromUtf8("btn_effectuer_livraison"))
|
||||
self.dateTimeEdit = QtGui.QDateTimeEdit(self.groupBox_3)
|
||||
self.dateTimeEdit.setGeometry(QtCore.QRect(290, 70, 194, 23))
|
||||
self.dateTimeEdit.setObjectName(_fromUtf8("dateTimeEdit"))
|
||||
self.formLayoutWidget = QtGui.QWidget(self.groupBox_3)
|
||||
self.formLayoutWidget.setGeometry(QtCore.QRect(20, 70, 261, 31))
|
||||
self.formLayoutWidget.setObjectName(_fromUtf8("formLayoutWidget"))
|
||||
self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
|
||||
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
|
||||
self.formLayout.setMargin(0)
|
||||
self.formLayout.setObjectName(_fromUtf8("formLayout"))
|
||||
self.lieuLabel = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.lieuLabel.setObjectName(_fromUtf8("lieuLabel"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.lieuLabel)
|
||||
self.lieuLineEdit = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lieuLineEdit.setObjectName(_fromUtf8("lieuLineEdit"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.lieuLineEdit)
|
||||
self.btn_modif_livraison = QtGui.QPushButton(self.groupBox_3)
|
||||
self.btn_modif_livraison.setGeometry(QtCore.QRect(136, 120, 141, 27))
|
||||
self.btn_modif_livraison.setObjectName(_fromUtf8("btn_modif_livraison"))
|
||||
self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
|
||||
self.tab_4 = QtGui.QWidget()
|
||||
self.tab_4.setObjectName(_fromUtf8("tab_4"))
|
||||
self.label_2 = QtGui.QLabel(self.tab_4)
|
||||
self.label_2.setGeometry(QtCore.QRect(40, 80, 161, 16))
|
||||
self.formLayoutWidget_2 = QtGui.QWidget(self.tab_4)
|
||||
self.formLayoutWidget_2.setGeometry(QtCore.QRect(60, 40, 461, 181))
|
||||
self.formLayoutWidget_2.setObjectName(_fromUtf8("formLayoutWidget_2"))
|
||||
self.formLayout_2 = QtGui.QFormLayout(self.formLayoutWidget_2)
|
||||
self.formLayout_2.setMargin(0)
|
||||
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
|
||||
self.nombreAbonnLabel = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.nombreAbonnLabel.setObjectName(_fromUtf8("nombreAbonnLabel"))
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.nombreAbonnLabel)
|
||||
self.labelNbAbo = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelNbAbo.setObjectName(_fromUtf8("labelNbAbo"))
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.labelNbAbo)
|
||||
self.label_2 = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.label_3 = QtGui.QLabel(self.tab_4)
|
||||
self.label_3.setGeometry(QtCore.QRect(40, 110, 161, 16))
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.label_4 = QtGui.QLabel(self.tab_4)
|
||||
self.label_4.setGeometry(QtCore.QRect(40, 140, 241, 16))
|
||||
self.formLayout_2.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_2)
|
||||
self.labelNbSuperAbo = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelNbSuperAbo.setObjectName(_fromUtf8("labelNbSuperAbo"))
|
||||
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.labelNbSuperAbo)
|
||||
self.label_4 = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.formLayout_2.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_4)
|
||||
self.labelMoySta = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelMoySta.setObjectName(_fromUtf8("labelMoySta"))
|
||||
self.formLayout_2.setWidget(3, QtGui.QFormLayout.FieldRole, self.labelMoySta)
|
||||
self.tabWidget.addTab(self.tab_4, _fromUtf8(""))
|
||||
self.comboBox = QtGui.QComboBox(self.centralwidget)
|
||||
self.comboBox.setGeometry(QtCore.QRect(40, 10, 539, 27))
|
||||
@ -168,8 +190,8 @@ class Ui_MainWindow(object):
|
||||
self.action.setObjectName(_fromUtf8("action"))
|
||||
self.actionNouveau_2 = QtGui.QAction(MainWindow)
|
||||
self.actionNouveau_2.setObjectName(_fromUtf8("actionNouveau_2"))
|
||||
self.menuFichier.addAction(self.actionCharger)
|
||||
self.menuFichier.addAction(self.actionNouveau_2)
|
||||
self.menuFichier.addAction(self.actionCharger)
|
||||
self.menuFichier.addAction(self.actionSauvegarder)
|
||||
self.menuFichier.addSeparator()
|
||||
self.menuFichier.addAction(self.actionQuitter)
|
||||
@ -178,12 +200,11 @@ class Ui_MainWindow(object):
|
||||
self.menubar.addAction(self.menuA_propos.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(2)
|
||||
self.tabWidget.setCurrentIndex(3)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Administration", None))
|
||||
self.label.setText(_translate("MainWindow", "Activité :", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
||||
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
||||
self.nom.setText(_translate("MainWindow", "TextLabel", None))
|
||||
@ -191,7 +212,7 @@ class Ui_MainWindow(object):
|
||||
self.placesParNiveau.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_16.setText(_translate("MainWindow", "Places disponible :", None))
|
||||
self.placesDispo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Places Reserve Super Abo : ", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Places Super Abo : ", None))
|
||||
self.placesSuperAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.btn_details.setText(_translate("MainWindow", "Details Places", None))
|
||||
self.btn_borne.setText(_translate("MainWindow", "Borne", None))
|
||||
@ -204,10 +225,15 @@ class Ui_MainWindow(object):
|
||||
self.btn_effectuer_entretien.setText(_translate("MainWindow", "Effectuer Entretien", None))
|
||||
self.groupBox_3.setTitle(_translate("MainWindow", "Livraison", None))
|
||||
self.btn_effectuer_livraison.setText(_translate("MainWindow", "Effectuer Livraison", None))
|
||||
self.lieuLabel.setText(_translate("MainWindow", "Lieu", None))
|
||||
self.btn_modif_livraison.setText(_translate("MainWindow", "Modifer Livraison ", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Services", None))
|
||||
self.label_2.setText(_translate("MainWindow", "Frequentation par jour", None))
|
||||
self.label_3.setText(_translate("MainWindow", "Frequentation par mois", None))
|
||||
self.label_4.setText(_translate("MainWindow", "Duree moyenne de stationnement ", None))
|
||||
self.nombreAbonnLabel.setText(_translate("MainWindow", "Nombre Abonné :", None))
|
||||
self.labelNbAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_2.setText(_translate("MainWindow", "Nombre Super Abonné : ", None))
|
||||
self.labelNbSuperAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_4.setText(_translate("MainWindow", "Durée Moyenne Stationnement :", None))
|
||||
self.labelMoySta.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("MainWindow", "Stats", None))
|
||||
self.menuFichier.setTitle(_translate("MainWindow", "Fichier", None))
|
||||
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
||||
@ -222,3 +248,85 @@ class Ui_MainWindow(object):
|
||||
self.action.setText(_translate("MainWindow", "?", None))
|
||||
self.actionNouveau_2.setText(_translate("MainWindow", "Nouveau", None))
|
||||
|
||||
|
||||
class Ui_CreaParking(object):
|
||||
def setupUi(self, CreaParking):
|
||||
CreaParking.setObjectName(_fromUtf8("CreaParking"))
|
||||
CreaParking.resize(622, 300)
|
||||
self.layoutWidget = QtGui.QWidget(CreaParking)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(230, 260, 201, 29))
|
||||
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
|
||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget)
|
||||
self.horizontalLayout_2.setMargin(0)
|
||||
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
|
||||
self.btn_annuler = QtGui.QPushButton(self.layoutWidget)
|
||||
self.btn_annuler.setObjectName(_fromUtf8("btn_annuler"))
|
||||
self.horizontalLayout_2.addWidget(self.btn_annuler)
|
||||
self.btn_valider = QtGui.QPushButton(self.layoutWidget)
|
||||
self.btn_valider.setObjectName(_fromUtf8("btn_valider"))
|
||||
self.horizontalLayout_2.addWidget(self.btn_valider)
|
||||
self.tableWidget = QtGui.QTableWidget(CreaParking)
|
||||
self.tableWidget.setGeometry(QtCore.QRect(30, 100, 521, 141))
|
||||
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
|
||||
self.tableWidget.setColumnCount(5)
|
||||
self.tableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(3, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(4, item)
|
||||
self.btn_addRow = QtGui.QPushButton(CreaParking)
|
||||
self.btn_addRow.setGeometry(QtCore.QRect(570, 120, 41, 27))
|
||||
self.btn_addRow.setObjectName(_fromUtf8("btn_addRow"))
|
||||
self.btn_rmRow = QtGui.QPushButton(CreaParking)
|
||||
self.btn_rmRow.setGeometry(QtCore.QRect(570, 170, 41, 27))
|
||||
self.btn_rmRow.setObjectName(_fromUtf8("btn_rmRow"))
|
||||
self.layoutWidget1 = QtGui.QWidget(CreaParking)
|
||||
self.layoutWidget1.setGeometry(QtCore.QRect(180, 20, 291, 56))
|
||||
self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1"))
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget1)
|
||||
self.horizontalLayout.setMargin(0)
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
self.verticalLayout = QtGui.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.label = QtGui.QLabel(self.layoutWidget1)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.verticalLayout.addWidget(self.label)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout)
|
||||
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
|
||||
self.lineEdit_nom = QtGui.QLineEdit(self.layoutWidget1)
|
||||
self.lineEdit_nom.setObjectName(_fromUtf8("lineEdit_nom"))
|
||||
self.verticalLayout_2.addWidget(self.lineEdit_nom)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||
|
||||
self.retranslateUi(CreaParking)
|
||||
QtCore.QMetaObject.connectSlotsByName(CreaParking)
|
||||
CreaParking.setTabOrder(self.lineEdit_nom, self.tableWidget)
|
||||
CreaParking.setTabOrder(self.tableWidget, self.btn_addRow)
|
||||
CreaParking.setTabOrder(self.btn_addRow, self.btn_rmRow)
|
||||
CreaParking.setTabOrder(self.btn_rmRow, self.btn_annuler)
|
||||
CreaParking.setTabOrder(self.btn_annuler, self.btn_valider)
|
||||
|
||||
def retranslateUi(self, CreaParking):
|
||||
CreaParking.setWindowTitle(_translate("CreaParking", "Creation Parking", None))
|
||||
self.btn_annuler.setText(_translate("CreaParking", "Annuler", None))
|
||||
self.btn_valider.setText(_translate("CreaParking", "Valider", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("CreaParking", "Hauteur (cm)", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(1)
|
||||
item.setText(_translate("CreaParking", "Longueur (cm)", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(2)
|
||||
item.setText(_translate("CreaParking", "Nombre", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(3)
|
||||
item.setText(_translate("CreaParking", "Etage", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(4)
|
||||
item.setText(_translate("CreaParking", "Prix (€)", None))
|
||||
self.btn_addRow.setText(_translate("CreaParking", "+", None))
|
||||
self.btn_rmRow.setText(_translate("CreaParking", "-", None))
|
||||
self.label.setText(_translate("CreaParking", "Nom :", None))
|
@ -1,109 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'creationParking.ui'
|
||||
#
|
||||
# Created: Thu Feb 5 00:32:25 2015
|
||||
# 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, CreaParking):
|
||||
CreaParking.setObjectName(_fromUtf8("CreaParking"))
|
||||
CreaParking.resize(622, 300)
|
||||
self.layoutWidget = QtGui.QWidget(CreaParking)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(230, 260, 201, 29))
|
||||
self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
|
||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget)
|
||||
self.horizontalLayout_2.setMargin(0)
|
||||
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
|
||||
self.btn_annuler = QtGui.QPushButton(self.layoutWidget)
|
||||
self.btn_annuler.setObjectName(_fromUtf8("btn_annuler"))
|
||||
self.horizontalLayout_2.addWidget(self.btn_annuler)
|
||||
self.btn_valider = QtGui.QPushButton(self.layoutWidget)
|
||||
self.btn_valider.setObjectName(_fromUtf8("btn_valider"))
|
||||
self.horizontalLayout_2.addWidget(self.btn_valider)
|
||||
self.tableWidget = QtGui.QTableWidget(CreaParking)
|
||||
self.tableWidget.setGeometry(QtCore.QRect(30, 100, 521, 141))
|
||||
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
|
||||
self.tableWidget.setColumnCount(5)
|
||||
self.tableWidget.setRowCount(0)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(0, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(1, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(2, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(3, item)
|
||||
item = QtGui.QTableWidgetItem()
|
||||
self.tableWidget.setHorizontalHeaderItem(4, item)
|
||||
self.btn_addRow = QtGui.QPushButton(CreaParking)
|
||||
self.btn_addRow.setGeometry(QtCore.QRect(570, 120, 41, 27))
|
||||
self.btn_addRow.setObjectName(_fromUtf8("btn_addRow"))
|
||||
self.btn_rmRow = QtGui.QPushButton(CreaParking)
|
||||
self.btn_rmRow.setGeometry(QtCore.QRect(570, 170, 41, 27))
|
||||
self.btn_rmRow.setObjectName(_fromUtf8("btn_rmRow"))
|
||||
self.layoutWidget1 = QtGui.QWidget(CreaParking)
|
||||
self.layoutWidget1.setGeometry(QtCore.QRect(180, 20, 291, 56))
|
||||
self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1"))
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget1)
|
||||
self.horizontalLayout.setMargin(0)
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
self.verticalLayout = QtGui.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.label = QtGui.QLabel(self.layoutWidget1)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.verticalLayout.addWidget(self.label)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout)
|
||||
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
|
||||
self.lineEdit_nom = QtGui.QLineEdit(self.layoutWidget1)
|
||||
self.lineEdit_nom.setObjectName(_fromUtf8("lineEdit_nom"))
|
||||
self.verticalLayout_2.addWidget(self.lineEdit_nom)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||
|
||||
self.retranslateUi(CreaParking)
|
||||
QtCore.QMetaObject.connectSlotsByName(CreaParking)
|
||||
CreaParking.setTabOrder(self.lineEdit_nom, self.tableWidget)
|
||||
CreaParking.setTabOrder(self.tableWidget, self.btn_addRow)
|
||||
CreaParking.setTabOrder(self.btn_addRow, self.btn_rmRow)
|
||||
CreaParking.setTabOrder(self.btn_rmRow, self.btn_annuler)
|
||||
CreaParking.setTabOrder(self.btn_annuler, self.btn_valider)
|
||||
|
||||
def retranslateUi(self, CreaParking):
|
||||
CreaParking.setWindowTitle(_translate("CreaParking", "Creation Parking", None))
|
||||
self.btn_annuler.setText(_translate("CreaParking", "Annuler", None))
|
||||
self.btn_valider.setText(_translate("CreaParking", "Valider", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(0)
|
||||
item.setText(_translate("CreaParking", "Hauteur (cm)", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(1)
|
||||
item.setText(_translate("CreaParking", "Longueur (cm)", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(2)
|
||||
item.setText(_translate("CreaParking", "Nombre", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(3)
|
||||
item.setText(_translate("CreaParking", "Etage", None))
|
||||
item = self.tableWidget.horizontalHeaderItem(4)
|
||||
item.setText(_translate("CreaParking", "Prix (€)", None))
|
||||
self.btn_addRow.setText(_translate("CreaParking", "+", None))
|
||||
self.btn_rmRow.setText(_translate("CreaParking", "-", None))
|
||||
self.label.setText(_translate("CreaParking", "Nom :", None))
|
||||
|
@ -1,12 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'borne.ui'
|
||||
#
|
||||
# Created: Sun Feb 1 14:38:43 2015
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
try:
|
||||
@ -224,5 +215,4 @@ class Ui_Borne(object):
|
||||
self.checkBox_Entretien_2.setText(_translate("Borne", "Entretien", None))
|
||||
self.lieuLabel_2.setText(_translate("Borne", "Lieu", None))
|
||||
self.btn_annuler.setText(_translate("Borne", "Annuler", None))
|
||||
self.btn_quitter.setText(_translate("Borne", "Quitter", None))
|
||||
|
||||
self.btn_quitter.setText(_translate("Borne", "Quitter", None))
|
79
ui/main.py
79
ui/main.py
@ -2,7 +2,7 @@
|
||||
|
||||
# Form implementation generated from reading ui file 'main.ui'
|
||||
#
|
||||
# Created: Thu Jan 22 09:11:44 2015
|
||||
# Created: Sat Feb 7 23:25:05 2015
|
||||
# by: PyQt4 UI code generator 4.11.3
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
@ -30,15 +30,12 @@ class Ui_MainWindow(object):
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setGeometry(QtCore.QRect(20, 40, 561, 501))
|
||||
self.tabWidget.setGeometry(QtCore.QRect(10, 40, 561, 501))
|
||||
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
|
||||
self.tab = QtGui.QWidget()
|
||||
self.tab.setObjectName(_fromUtf8("tab"))
|
||||
self.label = QtGui.QLabel(self.tab)
|
||||
self.label.setGeometry(QtCore.QRect(40, 10, 61, 15))
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.listWidget = QtGui.QListWidget(self.tab)
|
||||
self.listWidget.setGeometry(QtCore.QRect(60, 50, 431, 261))
|
||||
self.listWidget.setGeometry(QtCore.QRect(10, 10, 531, 451))
|
||||
self.listWidget.setObjectName(_fromUtf8("listWidget"))
|
||||
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
||||
self.tab_2 = QtGui.QWidget()
|
||||
@ -110,26 +107,60 @@ class Ui_MainWindow(object):
|
||||
self.btn_effectuer_entretien.setGeometry(QtCore.QRect(326, 60, 161, 27))
|
||||
self.btn_effectuer_entretien.setObjectName(_fromUtf8("btn_effectuer_entretien"))
|
||||
self.groupBox_3 = QtGui.QGroupBox(self.tab_3)
|
||||
self.groupBox_3.setGeometry(QtCore.QRect(30, 290, 511, 111))
|
||||
self.groupBox_3.setGeometry(QtCore.QRect(30, 290, 511, 171))
|
||||
self.groupBox_3.setObjectName(_fromUtf8("groupBox_3"))
|
||||
self.comboBox_livraison = QtGui.QComboBox(self.groupBox_3)
|
||||
self.comboBox_livraison.setGeometry(QtCore.QRect(10, 20, 481, 27))
|
||||
self.comboBox_livraison.setObjectName(_fromUtf8("comboBox_livraison"))
|
||||
self.btn_effectuer_livraison = QtGui.QPushButton(self.groupBox_3)
|
||||
self.btn_effectuer_livraison.setGeometry(QtCore.QRect(326, 70, 161, 27))
|
||||
self.btn_effectuer_livraison.setGeometry(QtCore.QRect(320, 120, 161, 27))
|
||||
self.btn_effectuer_livraison.setObjectName(_fromUtf8("btn_effectuer_livraison"))
|
||||
self.dateTimeEdit = QtGui.QDateTimeEdit(self.groupBox_3)
|
||||
self.dateTimeEdit.setGeometry(QtCore.QRect(290, 70, 194, 23))
|
||||
self.dateTimeEdit.setObjectName(_fromUtf8("dateTimeEdit"))
|
||||
self.formLayoutWidget = QtGui.QWidget(self.groupBox_3)
|
||||
self.formLayoutWidget.setGeometry(QtCore.QRect(20, 70, 261, 31))
|
||||
self.formLayoutWidget.setObjectName(_fromUtf8("formLayoutWidget"))
|
||||
self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
|
||||
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
|
||||
self.formLayout.setMargin(0)
|
||||
self.formLayout.setObjectName(_fromUtf8("formLayout"))
|
||||
self.lieuLabel = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.lieuLabel.setObjectName(_fromUtf8("lieuLabel"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.lieuLabel)
|
||||
self.lieuLineEdit = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lieuLineEdit.setObjectName(_fromUtf8("lieuLineEdit"))
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.lieuLineEdit)
|
||||
self.btn_modif_livraison = QtGui.QPushButton(self.groupBox_3)
|
||||
self.btn_modif_livraison.setGeometry(QtCore.QRect(136, 120, 141, 27))
|
||||
self.btn_modif_livraison.setObjectName(_fromUtf8("btn_modif_livraison"))
|
||||
self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
|
||||
self.tab_4 = QtGui.QWidget()
|
||||
self.tab_4.setObjectName(_fromUtf8("tab_4"))
|
||||
self.label_2 = QtGui.QLabel(self.tab_4)
|
||||
self.label_2.setGeometry(QtCore.QRect(40, 80, 161, 16))
|
||||
self.formLayoutWidget_2 = QtGui.QWidget(self.tab_4)
|
||||
self.formLayoutWidget_2.setGeometry(QtCore.QRect(60, 40, 461, 181))
|
||||
self.formLayoutWidget_2.setObjectName(_fromUtf8("formLayoutWidget_2"))
|
||||
self.formLayout_2 = QtGui.QFormLayout(self.formLayoutWidget_2)
|
||||
self.formLayout_2.setMargin(0)
|
||||
self.formLayout_2.setObjectName(_fromUtf8("formLayout_2"))
|
||||
self.nombreAbonnLabel = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.nombreAbonnLabel.setObjectName(_fromUtf8("nombreAbonnLabel"))
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.nombreAbonnLabel)
|
||||
self.labelNbAbo = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelNbAbo.setObjectName(_fromUtf8("labelNbAbo"))
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.labelNbAbo)
|
||||
self.label_2 = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.label_3 = QtGui.QLabel(self.tab_4)
|
||||
self.label_3.setGeometry(QtCore.QRect(40, 110, 161, 16))
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.label_4 = QtGui.QLabel(self.tab_4)
|
||||
self.label_4.setGeometry(QtCore.QRect(40, 140, 241, 16))
|
||||
self.formLayout_2.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_2)
|
||||
self.labelNbSuperAbo = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelNbSuperAbo.setObjectName(_fromUtf8("labelNbSuperAbo"))
|
||||
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.labelNbSuperAbo)
|
||||
self.label_4 = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.formLayout_2.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_4)
|
||||
self.labelMoySta = QtGui.QLabel(self.formLayoutWidget_2)
|
||||
self.labelMoySta.setObjectName(_fromUtf8("labelMoySta"))
|
||||
self.formLayout_2.setWidget(3, QtGui.QFormLayout.FieldRole, self.labelMoySta)
|
||||
self.tabWidget.addTab(self.tab_4, _fromUtf8(""))
|
||||
self.comboBox = QtGui.QComboBox(self.centralwidget)
|
||||
self.comboBox.setGeometry(QtCore.QRect(40, 10, 539, 27))
|
||||
@ -166,8 +197,8 @@ class Ui_MainWindow(object):
|
||||
self.action.setObjectName(_fromUtf8("action"))
|
||||
self.actionNouveau_2 = QtGui.QAction(MainWindow)
|
||||
self.actionNouveau_2.setObjectName(_fromUtf8("actionNouveau_2"))
|
||||
self.menuFichier.addAction(self.actionCharger)
|
||||
self.menuFichier.addAction(self.actionNouveau_2)
|
||||
self.menuFichier.addAction(self.actionCharger)
|
||||
self.menuFichier.addAction(self.actionSauvegarder)
|
||||
self.menuFichier.addSeparator()
|
||||
self.menuFichier.addAction(self.actionQuitter)
|
||||
@ -176,12 +207,11 @@ class Ui_MainWindow(object):
|
||||
self.menubar.addAction(self.menuA_propos.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(2)
|
||||
self.tabWidget.setCurrentIndex(3)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Administration", None))
|
||||
self.label.setText(_translate("MainWindow", "Activité :", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
||||
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
||||
self.nom.setText(_translate("MainWindow", "TextLabel", None))
|
||||
@ -189,7 +219,7 @@ class Ui_MainWindow(object):
|
||||
self.placesParNiveau.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_16.setText(_translate("MainWindow", "Places disponible :", None))
|
||||
self.placesDispo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Places Reserve Super Abo : ", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Places Super Abo : ", None))
|
||||
self.placesSuperAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.btn_details.setText(_translate("MainWindow", "Details Places", None))
|
||||
self.btn_borne.setText(_translate("MainWindow", "Borne", None))
|
||||
@ -202,10 +232,15 @@ class Ui_MainWindow(object):
|
||||
self.btn_effectuer_entretien.setText(_translate("MainWindow", "Effectuer Entretien", None))
|
||||
self.groupBox_3.setTitle(_translate("MainWindow", "Livraison", None))
|
||||
self.btn_effectuer_livraison.setText(_translate("MainWindow", "Effectuer Livraison", None))
|
||||
self.lieuLabel.setText(_translate("MainWindow", "Lieu", None))
|
||||
self.btn_modif_livraison.setText(_translate("MainWindow", "Modifer Livraison ", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Services", None))
|
||||
self.label_2.setText(_translate("MainWindow", "Frequentation par jour", None))
|
||||
self.label_3.setText(_translate("MainWindow", "Frequentation par mois", None))
|
||||
self.label_4.setText(_translate("MainWindow", "Duree moyenne de stationnement ", None))
|
||||
self.nombreAbonnLabel.setText(_translate("MainWindow", "Nombre Abonné :", None))
|
||||
self.labelNbAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_2.setText(_translate("MainWindow", "Nombre Super Abonné : ", None))
|
||||
self.labelNbSuperAbo.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_4.setText(_translate("MainWindow", "Durée Moyenne Stationnement :", None))
|
||||
self.labelMoySta.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), _translate("MainWindow", "Stats", None))
|
||||
self.menuFichier.setTitle(_translate("MainWindow", "Fichier", None))
|
||||
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
||||
|
164
ui/main.ui
164
ui/main.ui
@ -17,39 +17,26 @@
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<x>10</x>
|
||||
<y>40</y>
|
||||
<width>561</width>
|
||||
<height>501</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Activite</string>
|
||||
</attribute>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>10</y>
|
||||
<width>61</width>
|
||||
<height>15</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Activité :</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QListWidget" name="listWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>50</y>
|
||||
<width>431</width>
|
||||
<height>261</height>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>531</width>
|
||||
<height>451</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
@ -109,7 +96,7 @@
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Places Reserve Super Abo : </string>
|
||||
<string>Places Super Abo : </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -238,7 +225,7 @@
|
||||
<x>30</x>
|
||||
<y>290</y>
|
||||
<width>511</width>
|
||||
<height>111</height>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@ -257,8 +244,8 @@
|
||||
<widget class="QPushButton" name="btn_effectuer_livraison">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>326</x>
|
||||
<y>70</y>
|
||||
<x>320</x>
|
||||
<y>120</y>
|
||||
<width>161</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
@ -267,50 +254,113 @@
|
||||
<string>Effectuer Livraison</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QDateTimeEdit" name="dateTimeEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>70</y>
|
||||
<width>194</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>70</y>
|
||||
<width>261</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lieuLabel">
|
||||
<property name="text">
|
||||
<string>Lieu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lieuLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="btn_modif_livraison">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>136</x>
|
||||
<y>120</y>
|
||||
<width>141</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Modifer Livraison </string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>Stats</string>
|
||||
</attribute>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QWidget" name="formLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>80</y>
|
||||
<width>161</width>
|
||||
<height>16</height>
|
||||
<x>60</x>
|
||||
<y>40</y>
|
||||
<width>461</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frequentation par jour</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>110</y>
|
||||
<width>161</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frequentation par mois</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>140</y>
|
||||
<width>241</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Duree moyenne de stationnement </string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="nombreAbonnLabel">
|
||||
<property name="text">
|
||||
<string>Nombre Abonné :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="labelNbAbo">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Nombre Super Abonné : </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="labelNbSuperAbo">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Durée Moyenne Stationnement :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelMoySta">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
|
Reference in New Issue
Block a user