Merge remote-tracking branch 'origin/master'
Conflicts: src/m/test/testCamera.py
This commit is contained in:
commit
adf92a2a86
@ -2,3 +2,5 @@ gestionParking
|
||||
==============
|
||||
|
||||
Projet python l3 Miashs : gestion des places du parking DreamPark
|
||||
|
||||
|
||||
|
8
src/Launchme.py
Normal file
8
src/Launchme.py
Normal file
@ -0,0 +1,8 @@
|
||||
from src.c.Main import Main
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
if __name__ == "__main__":
|
||||
#lancement du controleur principal
|
||||
main = Main()
|
||||
|
23
src/c/Acces.py
Normal file
23
src/c/Acces.py
Normal file
@ -0,0 +1,23 @@
|
||||
from src.v import Panneau, Borne, Camera
|
||||
from src.c import Teleporteur
|
||||
from src.m import Parking, Place
|
||||
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Acces:
|
||||
def __init__(self):
|
||||
self.__parking = Parking()
|
||||
self.__camera = Camera()
|
||||
self.__borne = Borne()
|
||||
self.__panneau = 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")
|
58
src/c/Main.py
Normal file
58
src/c/Main.py
Normal file
@ -0,0 +1,58 @@
|
||||
import sys
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from src.v.MainWindow import Ui_MainWindow
|
||||
from src.c.log.log import Log
|
||||
from src.m.Parking import Parking, ListeTypePlace
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Main:
|
||||
def __init__(self):
|
||||
# Init des logs
|
||||
self.log = Log()
|
||||
|
||||
l = ListeTypePlace()
|
||||
l.add(10, 11, 5)
|
||||
l.add(7, 12, 5)
|
||||
p = Parking(5, l,"lol")
|
||||
|
||||
#Liste Clients et Parking
|
||||
self.__clients = []
|
||||
self.__parkings = [p]
|
||||
|
||||
|
||||
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
self.view = QtGui.QMainWindow()
|
||||
self.ui = Ui_MainWindow()
|
||||
self.ui.setupUi(self.view)
|
||||
|
||||
#Chargement activité
|
||||
self.loadLastActivity()
|
||||
self.majListeParking()
|
||||
|
||||
self.view.show()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
def activity(self, msg, lvl):
|
||||
self.log.printL(msg, lvl)
|
||||
self.ui.addItemActivite(self.activite.readlines()[-1])
|
||||
|
||||
def loadLastActivity(self):
|
||||
try:
|
||||
self.activite = open("log/activity.log", "r")
|
||||
except IOError:
|
||||
self.activite = open("log/activity.log", "w")
|
||||
self.activite.close()
|
||||
self.activite = open("log/activity.log", "r")
|
||||
|
||||
liste = self.activite.readlines()
|
||||
for l in [l[:-1] for l in liste[-11:-1]]:
|
||||
self.ui.addItemActivite(l)
|
||||
|
||||
def majListeParking(self):
|
||||
self.ui.majListeParkings(self.__parkings)
|
9
src/c/Teleporteur.py
Normal file
9
src/c/Teleporteur.py
Normal file
@ -0,0 +1,9 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Teleporteur :
|
||||
def teleporterVoiture(self, voiture, place):
|
||||
pass
|
||||
|
||||
def teleporterVoirureSuperAbonne(self, voiture):
|
||||
pass
|
1
src/c/log/__init__.py
Normal file
1
src/c/log/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__author__ = 'sidya'
|
91
src/c/log/log.py
Normal file
91
src/c/log/log.py
Normal file
@ -0,0 +1,91 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
class bcolors:
|
||||
"""
|
||||
Define constant color value for different level
|
||||
"""
|
||||
DEBUG = '\033[94m '
|
||||
INFO = ' \033[95m '
|
||||
WARNING = ' \033[93m '
|
||||
FAIL = ' \033[91m '
|
||||
ENDC = ' \033[0m '
|
||||
|
||||
class lvl:
|
||||
"""
|
||||
Define constant value for level log
|
||||
"""
|
||||
NOTSET = 0
|
||||
DEBUG = 10
|
||||
INFO = 20
|
||||
WARNING = 30
|
||||
FAIL = 40
|
||||
CRITICAL = 50
|
||||
|
||||
class SingleLevelFilter(logging.Filter):
|
||||
"""Filter for one level"""
|
||||
def __init__(self, passlevel, reject):
|
||||
"""
|
||||
Constructor
|
||||
passlevel : level to filter
|
||||
reject : true on reject state
|
||||
"""
|
||||
self.passlevel = passlevel
|
||||
self.reject = reject
|
||||
def filter(self, record):
|
||||
if self.reject:
|
||||
return (record.levelno != self.passlevel)
|
||||
else:
|
||||
return (record.levelno == self.passlevel)
|
||||
|
||||
class Log(object):
|
||||
"""
|
||||
Log Manager
|
||||
"""
|
||||
def __init__(self) :
|
||||
"""
|
||||
Define 3 differents log :
|
||||
activity.log -> all activity
|
||||
warning.log -> only warning
|
||||
error.log -> error
|
||||
Write all message on terminal too
|
||||
"""
|
||||
self.logger = logging.getLogger()
|
||||
self.logger.setLevel(logging.DEBUG)
|
||||
formatter = logging.Formatter('%(asctime)-15s :: %(levelname)s :: %(message)s')
|
||||
file_handler = RotatingFileHandler('log/activity.log', 'a', 1000000, 1)
|
||||
file_handler.setLevel(logging.DEBUG)
|
||||
file_handler.setFormatter(formatter)
|
||||
self.logger.addHandler(file_handler)
|
||||
file_handler_warning = RotatingFileHandler('log/warning.log', 'a', 1000000, 1)
|
||||
f1 = SingleLevelFilter(logging.WARNING, False)
|
||||
file_handler_warning.addFilter(f1)
|
||||
file_handler_warning.setFormatter(formatter)
|
||||
self.logger.addHandler(file_handler_warning)
|
||||
file_handler_error = RotatingFileHandler('log/error.log', 'a', 1000000, 1)
|
||||
file_handler_error.setLevel(logging.ERROR)
|
||||
file_handler_error.setFormatter(formatter)
|
||||
self.logger.addHandler(file_handler_error)
|
||||
steam_handler = logging.StreamHandler()
|
||||
steam_handler.setLevel(logging.NOTSET)
|
||||
self.logger.addHandler(steam_handler)
|
||||
|
||||
|
||||
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
|
||||
"""
|
||||
if pLvl == lvl.DEBUG :
|
||||
pMsg = bcolors.DEBUG + str(pMsg) + bcolors.ENDC
|
||||
elif pLvl == lvl.INFO :
|
||||
pMsg = bcolors.INFO + str(pMsg) + bcolors.ENDC
|
||||
elif pLvl == lvl.SUCCESS :
|
||||
pMsg = bcolors.SUCCESS + str(pMsg) + bcolors.ENDC
|
||||
elif pLvl == lvl.WARNING :
|
||||
pMsg = bcolors.WARNING + str(pMsg) + bcolors.ENDC
|
||||
elif pLvl == lvl.FAIL :
|
||||
pMsg = bcolors.FAIL + str(pMsg) + bcolors.ENDC
|
||||
self.logger.log(pLvl,pMsg)
|
7
src/c/test/TestAcces.py
Normal file
7
src/c/test/TestAcces.py
Normal file
@ -0,0 +1,7 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
from nose.tools import assert_equal
|
||||
|
||||
|
||||
class TestAcces:
|
||||
pass
|
5
src/c/test/TestTeleporteur.py
Normal file
5
src/c/test/TestTeleporteur.py
Normal file
@ -0,0 +1,5 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class TestTeleporteur :
|
||||
pass
|
75
src/m/Parking.py
Normal file
75
src/m/Parking.py
Normal file
@ -0,0 +1,75 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
from src.m.Place import Place, ListeTypePlace
|
||||
|
||||
|
||||
class Parking:
|
||||
"""
|
||||
Definie un parking
|
||||
"""
|
||||
def __init__(self, nbNiv, typePlacesParNiv,nom):
|
||||
self.__nom = nom
|
||||
self.__nbPlacesParNiveau = typePlacesParNiv.nbPlaceTotal
|
||||
self.__prix = 10
|
||||
self.__nbNiveaux = nbNiv
|
||||
self.__Places = {}
|
||||
for n in range(0, nbNiv):
|
||||
l = []
|
||||
for t in typePlacesParNiv.liste:
|
||||
for i in range(0, t.nb):
|
||||
l.append(Place(i + 1, n, t.longueur, t.hauteur))
|
||||
self.__Places[n] = l
|
||||
|
||||
@property
|
||||
def nom(self):
|
||||
return self.__nom
|
||||
|
||||
@property
|
||||
def nbPlacesParNiveau(self):
|
||||
return self.__nbPlacesParNiveau
|
||||
|
||||
@property
|
||||
def nbNiveau(self):
|
||||
return self.__nbNiveaux
|
||||
|
||||
def recherchePlace(self, voiture):
|
||||
place = None
|
||||
for i in range(0, self.__nbNiveaux):
|
||||
if place != None:
|
||||
break
|
||||
l = [p for p in self.__Places[i].estLibre]
|
||||
for p in l:
|
||||
if p.dimValide(voiture.hauteur, voiture.longueur):
|
||||
pass
|
||||
place = p
|
||||
break
|
||||
return place
|
||||
|
||||
def nbPlacesLibresNiveau(self, niveau):
|
||||
i = 0
|
||||
for p in self.__Places[niveau]:
|
||||
if p.estLibre:
|
||||
i += 1
|
||||
return i
|
||||
|
||||
@property
|
||||
def nbPlacesLibresParking(self):
|
||||
nbP = 0
|
||||
for i in range(0,self.__nbNiveaux) :
|
||||
nbP += self.nbPlacesLibresNiveau(i)
|
||||
return nbP
|
||||
|
||||
def addAbonnement(self, Abonnement):
|
||||
pass
|
||||
|
||||
def __str__(self):
|
||||
return "Parking : niveau : " + str(self.__nbNiveaux)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
l = ListeTypePlace()
|
||||
l.add(10, 11, 5)
|
||||
l.add(7, 12, 5)
|
||||
p = Parking(5, l)
|
||||
print(p)
|
||||
print(p.nbPlacesLibresNiveau(1))
|
103
src/m/Place.py
Normal file
103
src/m/Place.py
Normal file
@ -0,0 +1,103 @@
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Place:
|
||||
"""
|
||||
Representation d'une place dans un parking
|
||||
"""
|
||||
def __init__(self, numero, niveau, longueur, hauteur):
|
||||
self.__numero = numero
|
||||
self.__niveau = niveau
|
||||
self.__longueur = longueur
|
||||
self.__hauteur = hauteur
|
||||
self.__estLibre = True
|
||||
self.__estReserver = False
|
||||
self.__Placement = None
|
||||
@property
|
||||
def estLibre(self):
|
||||
return self.__estLibre
|
||||
|
||||
@property
|
||||
def estReserver(self):
|
||||
return self.__estReserver
|
||||
|
||||
def dimValide(self, h, l):
|
||||
return h < self.__hauteur and l < self.__longueur
|
||||
|
||||
def reserver(self):
|
||||
if (self.__estReserver == True) :
|
||||
raise Exception("Place déjà reservé")
|
||||
self.__estReserver = True
|
||||
|
||||
def nonReserver(self) :
|
||||
if (self.__estReserver == False):
|
||||
raise Exception("Impossible de mettre une place en non si elle n'est pas reservé de base")
|
||||
self.__estReserver = False
|
||||
|
||||
def prendre(self, Placement):
|
||||
if (self.__Libre == True) :
|
||||
raise Exception("Place déjà prise")
|
||||
self.__estLibre = False
|
||||
self.__Placement = Placement
|
||||
|
||||
def liberer(self) :
|
||||
if (self.__estLibre == False):
|
||||
raise Exception("Impossible de liberer une place vide")
|
||||
self.__estLibre = True
|
||||
|
||||
|
||||
class TypePlace:
|
||||
"""
|
||||
Classe qui permet de définir un type de place
|
||||
"""
|
||||
def __init__(self, h, l, nb):
|
||||
self.__hauteur = h
|
||||
self.__longueur = l
|
||||
self.__nb = nb
|
||||
|
||||
@property
|
||||
def hauteur(self):
|
||||
return self.__hauteur
|
||||
|
||||
@property
|
||||
def longueur(self):
|
||||
return self.__longueur
|
||||
|
||||
@property
|
||||
def nb(self):
|
||||
return self.__nb
|
||||
|
||||
|
||||
class ListeTypePlace:
|
||||
"""
|
||||
Classe qui permet de définir une liste de type de place par niveau pour la création d'un parking
|
||||
"""
|
||||
def __init__(self):
|
||||
self.l = []
|
||||
|
||||
def add(self, h, l, nb):
|
||||
self.l.append(TypePlace(h, l, nb))
|
||||
|
||||
@property
|
||||
def nbPlaceTotal(self):
|
||||
i = 0
|
||||
for t in self.l:
|
||||
i += t.nb
|
||||
return i
|
||||
|
||||
@property
|
||||
def liste(self):
|
||||
return self.l
|
||||
|
||||
|
||||
class Placement:
|
||||
def __init__(self,debut,fin):
|
||||
self.debut = debut
|
||||
self.fin = fin
|
||||
|
||||
@property
|
||||
def estEnCours(self):
|
||||
return datetime.datetime < self.fin
|
4
src/m/test/TestParking.py
Normal file
4
src/m/test/TestParking.py
Normal file
@ -0,0 +1,4 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
class TestParking :
|
||||
pass
|
@ -1,5 +1,5 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Camera:
|
||||
class TestPlace :
|
||||
pass
|
@ -1,10 +0,0 @@
|
||||
from src.m.camera import Camera
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
import nose
|
||||
class testCamera :
|
||||
|
||||
def testTailleMax(self):
|
||||
c = Camera()
|
||||
assert (c.capturerHauteur()>1.5)
|
128
src/v/Borne.py
Normal file
128
src/v/Borne.py
Normal file
@ -0,0 +1,128 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'borne.ui'
|
||||
#
|
||||
# Created: Tue Dec 23 18:12:55 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 Borne(object):
|
||||
def setupUi(self, Form):
|
||||
Form.setObjectName(_fromUtf8("Form"))
|
||||
Form.resize(400, 412)
|
||||
self.pushButton = QtGui.QPushButton(Form)
|
||||
self.pushButton.setGeometry(QtCore.QRect(90, 40, 211, 27))
|
||||
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||
self.lcdNumber = QtGui.QLCDNumber(Form)
|
||||
self.lcdNumber.setGeometry(QtCore.QRect(20, 80, 351, 31))
|
||||
self.lcdNumber.setObjectName(_fromUtf8("lcdNumber"))
|
||||
self.label_4 = QtGui.QLabel(Form)
|
||||
self.label_4.setGeometry(QtCore.QRect(170, 10, 151, 20))
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.widget = QtGui.QWidget(Form)
|
||||
self.widget.setGeometry(QtCore.QRect(60, 300, 272, 85))
|
||||
self.widget.setObjectName(_fromUtf8("widget"))
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.widget)
|
||||
self.horizontalLayout.setMargin(0)
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
|
||||
self.label = QtGui.QLabel(self.widget)
|
||||
self.label.setObjectName(_fromUtf8("label"))
|
||||
self.verticalLayout_2.addWidget(self.label)
|
||||
self.lineEdit = QtGui.QLineEdit(self.widget)
|
||||
self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
|
||||
self.verticalLayout_2.addWidget(self.lineEdit)
|
||||
self.pushButton_2 = QtGui.QPushButton(self.widget)
|
||||
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||
self.verticalLayout_2.addWidget(self.pushButton_2)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout_2)
|
||||
self.verticalLayout = QtGui.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.label_2 = QtGui.QLabel(self.widget)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.verticalLayout.addWidget(self.label_2)
|
||||
self.pushButton_3 = QtGui.QPushButton(self.widget)
|
||||
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
|
||||
self.verticalLayout.addWidget(self.pushButton_3)
|
||||
self.pushButton_4 = QtGui.QPushButton(self.widget)
|
||||
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
|
||||
self.verticalLayout.addWidget(self.pushButton_4)
|
||||
self.horizontalLayout.addLayout(self.verticalLayout)
|
||||
self.widget1 = QtGui.QWidget(Form)
|
||||
self.widget1.setGeometry(QtCore.QRect(70, 130, 261, 91))
|
||||
self.widget1.setObjectName(_fromUtf8("widget1"))
|
||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.widget1)
|
||||
self.horizontalLayout_2.setMargin(0)
|
||||
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
|
||||
self.verticalLayout_5 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
|
||||
self.pushButton_7 = QtGui.QPushButton(self.widget1)
|
||||
self.pushButton_7.setObjectName(_fromUtf8("pushButton_7"))
|
||||
self.verticalLayout_5.addWidget(self.pushButton_7)
|
||||
self.pushButton_10 = QtGui.QPushButton(self.widget1)
|
||||
self.pushButton_10.setObjectName(_fromUtf8("pushButton_10"))
|
||||
self.verticalLayout_5.addWidget(self.pushButton_10)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
|
||||
self.verticalLayout_4 = QtGui.QVBoxLayout()
|
||||
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
|
||||
self.pushButton_8 = QtGui.QPushButton(self.widget1)
|
||||
self.pushButton_8.setObjectName(_fromUtf8("pushButton_8"))
|
||||
self.verticalLayout_4.addWidget(self.pushButton_8)
|
||||
self.pushButton_9 = QtGui.QPushButton(self.widget1)
|
||||
self.pushButton_9.setObjectName(_fromUtf8("pushButton_9"))
|
||||
self.verticalLayout_4.addWidget(self.pushButton_9)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout_4)
|
||||
|
||||
self.retranslateUi(Form)
|
||||
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||
|
||||
def retranslateUi(self, Form):
|
||||
Form.setWindowTitle(_translate("Form", "Form", None))
|
||||
self.pushButton.setText(_translate("Form", "Detection Arrivee Voiture", None))
|
||||
self.label_4.setText(_translate("Form", "NomParking", None))
|
||||
self.label.setText(_translate("Form", "Carte Membre ID ", None))
|
||||
self.pushButton_2.setText(_translate("Form", "Valider", None))
|
||||
self.label_2.setText(_translate("Form", "Non membre", None))
|
||||
self.pushButton_3.setText(_translate("Form", "Valider", None))
|
||||
self.pushButton_4.setText(_translate("Form", "PayerAvecCarte", None))
|
||||
self.pushButton_7.setText(_translate("Form", "<", None))
|
||||
self.pushButton_10.setText(_translate("Form", "Annuler", None))
|
||||
self.pushButton_8.setText(_translate("Form", ">", None))
|
||||
self.pushButton_9.setText(_translate("Form", "Valider", None))
|
||||
|
||||
|
||||
|
||||
def delivrerTicket(self, client):
|
||||
pass
|
||||
|
||||
def proposerService(self):
|
||||
pass
|
||||
|
||||
def proposerAbonnement(self):
|
||||
pass
|
||||
|
||||
def recupererInfosCarte(self):
|
||||
pass
|
||||
|
||||
def proposerTypePaiement(self):
|
||||
pass
|
10
src/v/Camera.py
Normal file
10
src/v/Camera.py
Normal file
@ -0,0 +1,10 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Camera:
|
||||
def detecterVoiture(self):
|
||||
return True
|
||||
|
||||
def donnerVoiture(self):
|
||||
v = Voiture() # need classe voiture \o/
|
||||
return v
|
216
src/v/MainWindow.py
Normal file
216
src/v/MainWindow.py
Normal file
@ -0,0 +1,216 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'main.ui'
|
||||
#
|
||||
# Created: Tue Dec 23 22:14:01 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_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||
MainWindow.resize(561, 479)
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setGeometry(QtCore.QRect(0, 0, 561, 441))
|
||||
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.setObjectName(_fromUtf8("listWidget"))
|
||||
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
||||
self.tab_2 = QtGui.QWidget()
|
||||
self.tab_2.setObjectName(_fromUtf8("tab_2"))
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.tab_2)
|
||||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
|
||||
self.comboBox = QtGui.QComboBox(self.tab_2)
|
||||
self.comboBox.setObjectName(_fromUtf8("comboBox"))
|
||||
self.verticalLayout.addWidget(self.comboBox)
|
||||
self.formLayout_3 = QtGui.QFormLayout()
|
||||
self.formLayout_3.setObjectName(_fromUtf8("formLayout_3"))
|
||||
self.label_13 = QtGui.QLabel(self.tab_2)
|
||||
self.label_13.setObjectName(_fromUtf8("label_13"))
|
||||
self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_13)
|
||||
self.label_14 = QtGui.QLabel(self.tab_2)
|
||||
self.label_14.setObjectName(_fromUtf8("label_14"))
|
||||
self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_14)
|
||||
self.label_15 = QtGui.QLabel(self.tab_2)
|
||||
self.label_15.setObjectName(_fromUtf8("label_15"))
|
||||
self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_15)
|
||||
self.label_16 = QtGui.QLabel(self.tab_2)
|
||||
self.label_16.setObjectName(_fromUtf8("label_16"))
|
||||
self.formLayout_3.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_16)
|
||||
self.label_17 = QtGui.QLabel(self.tab_2)
|
||||
self.label_17.setObjectName(_fromUtf8("label_17"))
|
||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_17)
|
||||
self.label_2 = QtGui.QLabel(self.tab_2)
|
||||
self.label_2.setObjectName(_fromUtf8("label_2"))
|
||||
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.label_2)
|
||||
self.label_3 = QtGui.QLabel(self.tab_2)
|
||||
self.label_3.setObjectName(_fromUtf8("label_3"))
|
||||
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.label_3)
|
||||
self.label_4 = QtGui.QLabel(self.tab_2)
|
||||
self.label_4.setObjectName(_fromUtf8("label_4"))
|
||||
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.label_4)
|
||||
self.label_5 = QtGui.QLabel(self.tab_2)
|
||||
self.label_5.setObjectName(_fromUtf8("label_5"))
|
||||
self.formLayout_3.setWidget(3, QtGui.QFormLayout.FieldRole, self.label_5)
|
||||
self.label_6 = QtGui.QLabel(self.tab_2)
|
||||
self.label_6.setObjectName(_fromUtf8("label_6"))
|
||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.FieldRole, self.label_6)
|
||||
self.verticalLayout.addLayout(self.formLayout_3)
|
||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
|
||||
self.pushButton_4 = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
|
||||
self.horizontalLayout.addWidget(self.pushButton_4)
|
||||
self.pushButton_3 = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
|
||||
self.horizontalLayout.addWidget(self.pushButton_3)
|
||||
self.verticalLayout.addLayout(self.horizontalLayout)
|
||||
self.pushButton_5 = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton_5.setObjectName(_fromUtf8("pushButton_5"))
|
||||
self.verticalLayout.addWidget(self.pushButton_5)
|
||||
self.pushButton_2 = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||
self.verticalLayout.addWidget(self.pushButton_2)
|
||||
self.pushButton = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||
self.verticalLayout.addWidget(self.pushButton)
|
||||
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
||||
self.tab_5 = QtGui.QWidget()
|
||||
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
||||
self.tableWidget = QtGui.QTableWidget(self.tab_5)
|
||||
self.tableWidget.setGeometry(QtCore.QRect(60, 20, 431, 351))
|
||||
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
|
||||
self.tableWidget.setColumnCount(0)
|
||||
self.tableWidget.setRowCount(0)
|
||||
self.tabWidget.addTab(self.tab_5, _fromUtf8(""))
|
||||
self.tab_3 = QtGui.QWidget()
|
||||
self.tab_3.setObjectName(_fromUtf8("tab_3"))
|
||||
self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 561, 25))
|
||||
self.menubar.setObjectName(_fromUtf8("menubar"))
|
||||
self.menuFichier = QtGui.QMenu(self.menubar)
|
||||
self.menuFichier.setObjectName(_fromUtf8("menuFichier"))
|
||||
self.menuA_propos = QtGui.QMenu(self.menubar)
|
||||
self.menuA_propos.setObjectName(_fromUtf8("menuA_propos"))
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName(_fromUtf8("statusbar"))
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.actionCharger = QtGui.QAction(MainWindow)
|
||||
self.actionCharger.setObjectName(_fromUtf8("actionCharger"))
|
||||
self.actionSauvegarder = QtGui.QAction(MainWindow)
|
||||
self.actionSauvegarder.setObjectName(_fromUtf8("actionSauvegarder"))
|
||||
self.actionAfficher = QtGui.QAction(MainWindow)
|
||||
self.actionAfficher.setObjectName(_fromUtf8("actionAfficher"))
|
||||
self.actionNouveau = QtGui.QAction(MainWindow)
|
||||
self.actionNouveau.setObjectName(_fromUtf8("actionNouveau"))
|
||||
self.actionRechercher = QtGui.QAction(MainWindow)
|
||||
self.actionRechercher.setObjectName(_fromUtf8("actionRechercher"))
|
||||
self.actionListe = QtGui.QAction(MainWindow)
|
||||
self.actionListe.setObjectName(_fromUtf8("actionListe"))
|
||||
self.actionAjouter = QtGui.QAction(MainWindow)
|
||||
self.actionAjouter.setObjectName(_fromUtf8("actionAjouter"))
|
||||
self.actionQuitter = QtGui.QAction(MainWindow)
|
||||
self.actionQuitter.setObjectName(_fromUtf8("actionQuitter"))
|
||||
self.action = QtGui.QAction(MainWindow)
|
||||
self.action.setObjectName(_fromUtf8("action"))
|
||||
self.menuFichier.addAction(self.actionCharger)
|
||||
self.menuFichier.addAction(self.actionSauvegarder)
|
||||
self.menuFichier.addSeparator()
|
||||
self.menuFichier.addAction(self.actionQuitter)
|
||||
self.menuA_propos.addAction(self.action)
|
||||
self.menubar.addAction(self.menuFichier.menuAction())
|
||||
self.menubar.addAction(self.menuA_propos.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
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.label_14.setText(_translate("MainWindow", "Niveau :", None))
|
||||
self.label_15.setText(_translate("MainWindow", "Place / niveau :", None))
|
||||
self.label_16.setText(_translate("MainWindow", "Place disponible :", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Place Reserve Super Abo : ", None))
|
||||
self.label_2.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_3.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_4.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_5.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.label_6.setText(_translate("MainWindow", "TextLabel", None))
|
||||
self.pushButton_4.setText(_translate("MainWindow", "Details Places", None))
|
||||
self.pushButton_3.setText(_translate("MainWindow", "Borne", None))
|
||||
self.pushButton_5.setText(_translate("MainWindow", "Créer", None))
|
||||
self.pushButton_2.setText(_translate("MainWindow", "Modifier", None))
|
||||
self.pushButton.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_5), _translate("MainWindow", "Membres", None))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), _translate("MainWindow", "Services", None))
|
||||
self.menuFichier.setTitle(_translate("MainWindow", "Fichier", None))
|
||||
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
||||
self.actionCharger.setText(_translate("MainWindow", "Charger", None))
|
||||
self.actionSauvegarder.setText(_translate("MainWindow", "Sauvegarder", None))
|
||||
self.actionAfficher.setText(_translate("MainWindow", "Afficher", None))
|
||||
self.actionNouveau.setText(_translate("MainWindow", "Nouveau", None))
|
||||
self.actionRechercher.setText(_translate("MainWindow", "Rechercher", None))
|
||||
self.actionListe.setText(_translate("MainWindow", "Liste", None))
|
||||
self.actionAjouter.setText(_translate("MainWindow", "Ajouter", None))
|
||||
self.actionQuitter.setText(_translate("MainWindow", "Quitter", 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")
|
6
src/v/Panneau.py
Normal file
6
src/v/Panneau.py
Normal file
@ -0,0 +1,6 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
|
||||
class Panneau:
|
||||
def afficherNbPlaceDisponible(self, parking):
|
||||
print(parking.nbPlacesLibresParking())
|
163
src/v/Quitter.py
Normal file
163
src/v/Quitter.py
Normal file
@ -0,0 +1,163 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'main.ui'
|
||||
#
|
||||
# Created: Wed Dec 10 16:47:28 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_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||
MainWindow.resize(522, 412)
|
||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setGeometry(QtCore.QRect(0, 0, 561, 441))
|
||||
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.log = QtGui.QListView(self.tab)
|
||||
self.log.setGeometry(QtCore.QRect(30, 40, 421, 241))
|
||||
self.log.setObjectName(_fromUtf8("log"))
|
||||
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
||||
self.tab_2 = QtGui.QWidget()
|
||||
self.tab_2.setObjectName(_fromUtf8("tab_2"))
|
||||
self.formLayoutWidget = QtGui.QWidget(self.tab_2)
|
||||
self.formLayoutWidget.setGeometry(QtCore.QRect(100, 80, 311, 151))
|
||||
self.formLayoutWidget.setObjectName(_fromUtf8("formLayoutWidget"))
|
||||
self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget)
|
||||
self.formLayout_3.setMargin(0)
|
||||
self.formLayout_3.setObjectName(_fromUtf8("formLayout_3"))
|
||||
self.label_13 = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.label_13.setObjectName(_fromUtf8("label_13"))
|
||||
self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_13)
|
||||
self.label_14 = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.label_14.setObjectName(_fromUtf8("label_14"))
|
||||
self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_14)
|
||||
self.lineEdit_11 = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lineEdit_11.setObjectName(_fromUtf8("lineEdit_11"))
|
||||
self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.lineEdit_11)
|
||||
self.lineEdit_12 = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lineEdit_12.setObjectName(_fromUtf8("lineEdit_12"))
|
||||
self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.lineEdit_12)
|
||||
self.label_15 = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.label_15.setObjectName(_fromUtf8("label_15"))
|
||||
self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_15)
|
||||
self.lineEdit_13 = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lineEdit_13.setObjectName(_fromUtf8("lineEdit_13"))
|
||||
self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.lineEdit_13)
|
||||
self.label_16 = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.label_16.setObjectName(_fromUtf8("label_16"))
|
||||
self.formLayout_3.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_16)
|
||||
self.lineEdit_14 = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lineEdit_14.setObjectName(_fromUtf8("lineEdit_14"))
|
||||
self.formLayout_3.setWidget(3, QtGui.QFormLayout.FieldRole, self.lineEdit_14)
|
||||
self.label_17 = QtGui.QLabel(self.formLayoutWidget)
|
||||
self.label_17.setObjectName(_fromUtf8("label_17"))
|
||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_17)
|
||||
self.lineEdit_15 = QtGui.QLineEdit(self.formLayoutWidget)
|
||||
self.lineEdit_15.setObjectName(_fromUtf8("lineEdit_15"))
|
||||
self.formLayout_3.setWidget(4, QtGui.QFormLayout.FieldRole, self.lineEdit_15)
|
||||
self.pushButton_2 = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton_2.setGeometry(QtCore.QRect(140, 270, 101, 27))
|
||||
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
|
||||
self.comboBox = QtGui.QComboBox(self.tab_2)
|
||||
self.comboBox.setGeometry(QtCore.QRect(100, 40, 321, 27))
|
||||
self.comboBox.setObjectName(_fromUtf8("comboBox"))
|
||||
self.pushButton = QtGui.QPushButton(self.tab_2)
|
||||
self.pushButton.setGeometry(QtCore.QRect(290, 270, 81, 27))
|
||||
self.pushButton.setObjectName(_fromUtf8("pushButton"))
|
||||
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
||||
self.tab_5 = QtGui.QWidget()
|
||||
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
||||
self.tableView = QtGui.QTableView(self.tab_5)
|
||||
self.tableView.setGeometry(QtCore.QRect(50, 40, 431, 201))
|
||||
self.tableView.setObjectName(_fromUtf8("tableView"))
|
||||
self.tabWidget.addTab(self.tab_5, _fromUtf8(""))
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 522, 25))
|
||||
self.menubar.setObjectName(_fromUtf8("menubar"))
|
||||
self.menuBorne = QtGui.QMenu(self.menubar)
|
||||
self.menuBorne.setObjectName(_fromUtf8("menuBorne"))
|
||||
self.menuBornes = QtGui.QMenu(self.menubar)
|
||||
self.menuBornes.setObjectName(_fromUtf8("menuBornes"))
|
||||
self.menuA_propos = QtGui.QMenu(self.menubar)
|
||||
self.menuA_propos.setObjectName(_fromUtf8("menuA_propos"))
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
||||
self.statusbar.setObjectName(_fromUtf8("statusbar"))
|
||||
MainWindow.setStatusBar(self.statusbar)
|
||||
self.actionCharger = QtGui.QAction(MainWindow)
|
||||
self.actionCharger.setObjectName(_fromUtf8("actionCharger"))
|
||||
self.actionSauvegarder = QtGui.QAction(MainWindow)
|
||||
self.actionSauvegarder.setObjectName(_fromUtf8("actionSauvegarder"))
|
||||
self.actionAfficher = QtGui.QAction(MainWindow)
|
||||
self.actionAfficher.setObjectName(_fromUtf8("actionAfficher"))
|
||||
self.actionNouveau = QtGui.QAction(MainWindow)
|
||||
self.actionNouveau.setObjectName(_fromUtf8("actionNouveau"))
|
||||
self.actionRechercher = QtGui.QAction(MainWindow)
|
||||
self.actionRechercher.setObjectName(_fromUtf8("actionRechercher"))
|
||||
self.actionListe = QtGui.QAction(MainWindow)
|
||||
self.actionListe.setObjectName(_fromUtf8("actionListe"))
|
||||
self.actionAjouter = QtGui.QAction(MainWindow)
|
||||
self.actionAjouter.setObjectName(_fromUtf8("actionAjouter"))
|
||||
self.menuBorne.addSeparator()
|
||||
self.menuBorne.addAction(self.actionCharger)
|
||||
self.menuBorne.addAction(self.actionSauvegarder)
|
||||
self.menubar.addAction(self.menuBorne.menuAction())
|
||||
self.menubar.addAction(self.menuBornes.menuAction())
|
||||
self.menubar.addAction(self.menuA_propos.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
|
||||
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", 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.label_14.setText(_translate("MainWindow", "Niveau :", None))
|
||||
self.label_15.setText(_translate("MainWindow", "Place / niveau :", None))
|
||||
self.label_16.setText(_translate("MainWindow", "Place disponible :", None))
|
||||
self.label_17.setText(_translate("MainWindow", "Place Reserve Super Abo : ", None))
|
||||
self.pushButton_2.setText(_translate("MainWindow", "Creer/Modifier", None))
|
||||
self.pushButton.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_5), _translate("MainWindow", "Membres", None))
|
||||
self.menuBorne.setTitle(_translate("MainWindow", "Fichier", None))
|
||||
self.menuBornes.setTitle(_translate("MainWindow", "Quitter", None))
|
||||
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
||||
self.actionCharger.setText(_translate("MainWindow", "Charger", None))
|
||||
self.actionSauvegarder.setText(_translate("MainWindow", "Sauvegarder", None))
|
||||
self.actionAfficher.setText(_translate("MainWindow", "Afficher", None))
|
||||
self.actionNouveau.setText(_translate("MainWindow", "Nouveau", None))
|
||||
self.actionRechercher.setText(_translate("MainWindow", "Rechercher", None))
|
||||
self.actionListe.setText(_translate("MainWindow", "Liste", None))
|
||||
self.actionAjouter.setText(_translate("MainWindow", "Ajouter", None))
|
||||
|
1
src/v/test/TestBorne.py
Normal file
1
src/v/test/TestBorne.py
Normal file
@ -0,0 +1 @@
|
||||
__author__ = 'sidya'
|
14
src/v/test/TestCamera.py
Normal file
14
src/v/test/TestCamera.py
Normal file
@ -0,0 +1,14 @@
|
||||
from src.m.camera import Camera
|
||||
|
||||
__author__ = 'sidya'
|
||||
|
||||
from nose.tools import assert_equal
|
||||
from nose.tools import assert_not_equal
|
||||
from nose.tools import assert_raises
|
||||
from nose.tools import raises
|
||||
|
||||
|
||||
class testCamera:
|
||||
def test_TailleMax(self):
|
||||
c = Camera()
|
||||
assert_equal(c.capturerHauteur()<2.5)
|
4
src/v/test/TestPanneau.py
Normal file
4
src/v/test/TestPanneau.py
Normal file
@ -0,0 +1,4 @@
|
||||
__author__ = 'sidya'
|
||||
|
||||
class TestPanneau:
|
||||
pass
|
1
src/v/test/__init__.py
Normal file
1
src/v/test/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
__author__ = 'sidya'
|
178
ui/borne.ui
Normal file
178
ui/borne.ui
Normal file
@ -0,0 +1,178 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>412</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>40</y>
|
||||
<width>211</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Detection Arrivee Voiture</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLCDNumber" name="lcdNumber">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>80</y>
|
||||
<width>351</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>10</y>
|
||||
<width>151</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>NomParking</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>300</y>
|
||||
<width>272</width>
|
||||
<height>85</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Carte Membre ID </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Valider</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Non membre</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>Valider</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="text">
|
||||
<string>PayerAvecCarte</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>130</y>
|
||||
<width>261</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_7">
|
||||
<property name="text">
|
||||
<string><</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_10">
|
||||
<property name="text">
|
||||
<string>Annuler</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_8">
|
||||
<property name="text">
|
||||
<string>></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_9">
|
||||
<property name="text">
|
||||
<string>Valider</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<zorder>pushButton</zorder>
|
||||
<zorder>label</zorder>
|
||||
<zorder>lineEdit</zorder>
|
||||
<zorder>pushButton_2</zorder>
|
||||
<zorder>pushButton_3</zorder>
|
||||
<zorder>label_2</zorder>
|
||||
<zorder>lcdNumber</zorder>
|
||||
<zorder></zorder>
|
||||
<zorder>label_2</zorder>
|
||||
<zorder>pushButton_3</zorder>
|
||||
<zorder>pushButton_4</zorder>
|
||||
<zorder></zorder>
|
||||
<zorder>pushButton_7</zorder>
|
||||
<zorder>pushButton_8</zorder>
|
||||
<zorder>pushButton_9</zorder>
|
||||
<zorder>pushButton_10</zorder>
|
||||
<zorder>label_4</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
278
ui/main.ui
Normal file
278
ui/main.ui
Normal file
@ -0,0 +1,278 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>561</width>
|
||||
<height>479</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Administration</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>561</width>
|
||||
<height>441</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</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>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Parkings</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_13">
|
||||
<property name="text">
|
||||
<string>Nom :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>Niveau :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Place / niveau :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_16">
|
||||
<property name="text">
|
||||
<string>Place disponible :</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_17">
|
||||
<property name="text">
|
||||
<string>Place Reserve Super Abo : </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_4">
|
||||
<property name="text">
|
||||
<string>Details Places</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="text">
|
||||
<string>Borne</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_5">
|
||||
<property name="text">
|
||||
<string>Créer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Modifier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Supprimer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_5">
|
||||
<attribute name="title">
|
||||
<string>Membres</string>
|
||||
</attribute>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>431</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Services</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>561</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFichier">
|
||||
<property name="title">
|
||||
<string>Fichier</string>
|
||||
</property>
|
||||
<addaction name="actionCharger"/>
|
||||
<addaction name="actionSauvegarder"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionQuitter"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuA_propos">
|
||||
<property name="title">
|
||||
<string>A propos</string>
|
||||
</property>
|
||||
<addaction name="action"/>
|
||||
</widget>
|
||||
<addaction name="menuFichier"/>
|
||||
<addaction name="menuA_propos"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionCharger">
|
||||
<property name="text">
|
||||
<string>Charger</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSauvegarder">
|
||||
<property name="text">
|
||||
<string>Sauvegarder</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAfficher">
|
||||
<property name="text">
|
||||
<string>Afficher</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNouveau">
|
||||
<property name="text">
|
||||
<string>Nouveau</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRechercher">
|
||||
<property name="text">
|
||||
<string>Rechercher</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionListe">
|
||||
<property name="text">
|
||||
<string>Liste</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAjouter">
|
||||
<property name="text">
|
||||
<string>Ajouter</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQuitter">
|
||||
<property name="text">
|
||||
<string>Quitter</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action">
|
||||
<property name="text">
|
||||
<string>?</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Reference in New Issue
Block a user