New changelist
This commit is contained in:
parent
3f5c766e2f
commit
e091f37ca2
@ -8,14 +8,16 @@ __author__ = 'sidya'
|
|||||||
|
|
||||||
class Acces:
|
class Acces:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__parkings = {}
|
self.__parking = Parking()
|
||||||
self.__clients = {}
|
self.__camera = Camera()
|
||||||
|
self.__borne = Borne()
|
||||||
|
self.__panneau = Panneau()
|
||||||
|
|
||||||
def actionnerCamera(self, client):
|
def actionnerCamera(self):
|
||||||
pass
|
return self.__camera.donnerVoiture()
|
||||||
|
|
||||||
def actionnerPanneau(self):
|
def majPanneau(self):
|
||||||
pass
|
self.__panneau.afficherNbPlaceDisponible()
|
||||||
|
|
||||||
def lancerProcedureImmatr(self, voiture):
|
def lancerProcedureEntree(self,client):
|
||||||
pass
|
self.__borne.afficher("Inserer votre carte ou valider")
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
from PyQt4 import QtGui
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from src.v.MainWindow import Ui_MainWindow
|
from src.v.MainWindow import Ui_MainWindow
|
||||||
from src.c.log.log import Log
|
from src.c.log.log import Log
|
||||||
|
|
||||||
|
|
||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
#Init des logs
|
# Init des logs
|
||||||
self.log = Log()
|
self.log = Log()
|
||||||
|
|
||||||
|
#Liste Clients et Parking
|
||||||
|
self.__clients = {}
|
||||||
|
self.__Parkings = {}
|
||||||
|
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QtGui.QApplication(sys.argv)
|
||||||
self.view = QtGui.QMainWindow()
|
self.view = QtGui.QMainWindow()
|
||||||
self.ui = Ui_MainWindow()
|
self.ui = Ui_MainWindow()
|
||||||
@ -18,20 +25,20 @@ class Main:
|
|||||||
|
|
||||||
#Chargement activité
|
#Chargement activité
|
||||||
self.loadLastActivity()
|
self.loadLastActivity()
|
||||||
|
self.ui.addListeParkings(10)
|
||||||
|
|
||||||
self.view.show()
|
self.view.show()
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
|
||||||
def activity(self,msg,lvl):
|
def activity(self, msg, lvl):
|
||||||
self.log.printL(msg,10)
|
self.log.printL(msg, lvl)
|
||||||
self.ui.addItemActivite(self.activite.readlines()[-1])
|
self.ui.addItemActivite(self.activite.readlines()[-1])
|
||||||
|
|
||||||
def loadLastActivity(self):
|
def loadLastActivity(self):
|
||||||
try:
|
try:
|
||||||
self.activite = open("log/activity.log", "r")
|
self.activite = open("log/activity.log", "r")
|
||||||
except IOError :
|
except IOError:
|
||||||
self.activite = open("log/activity.log", "w")
|
self.activite = open("log/activity.log", "w")
|
||||||
self.activite.close()
|
self.activite.close()
|
||||||
self.activite = open("log/activity.log", "r")
|
self.activite = open("log/activity.log", "r")
|
||||||
|
@ -2,9 +2,6 @@ __author__ = 'sidya'
|
|||||||
|
|
||||||
|
|
||||||
class Teleporteur :
|
class Teleporteur :
|
||||||
def __init__(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def teleporterVoiture(self, voiture, place):
|
def teleporterVoiture(self, voiture, place):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
from src.m.Place import Place, TypePlace, ListeTypePlace
|
from src.m.Place import Place, ListeTypePlace
|
||||||
|
|
||||||
|
|
||||||
class Parking:
|
class Parking:
|
||||||
"""
|
"""
|
||||||
Definie un parking
|
Definie un parking
|
||||||
"""
|
"""
|
||||||
def __init__(self, nbNiv, typePlacesParNiv):
|
def __init__(self, nbNiv, typePlacesParNiv,nom):
|
||||||
#self.__nbPlacesParNiveau = placesParNiv
|
self.__nom = nom
|
||||||
|
self.__nbPlacesParNiveau = typePlacesParNiv.nbPlaceTotal
|
||||||
self.__prix = 10
|
self.__prix = 10
|
||||||
self.__nbNiveaux = nbNiv
|
self.__nbNiveaux = nbNiv
|
||||||
self.__Places = {}
|
self.__Places = {}
|
||||||
@ -16,21 +17,21 @@ class Parking:
|
|||||||
l = []
|
l = []
|
||||||
for t in typePlacesParNiv.liste:
|
for t in typePlacesParNiv.liste:
|
||||||
for i in range(0, t.nb):
|
for i in range(0, t.nb):
|
||||||
l.append(Place(i+1, n, t.longueur, t.hauteur))
|
l.append(Place(i + 1, n, t.longueur, t.hauteur))
|
||||||
self.__Places[n+1] = l
|
self.__Places[n ] = l
|
||||||
|
|
||||||
def recherchePlace(self, voiture):
|
def recherchePlace(self, voiture):
|
||||||
trouve = False
|
place = None
|
||||||
for i in range(0, self.__nbNiveaux):
|
for i in range(0, self.__nbNiveaux):
|
||||||
if trouve :
|
if place != None:
|
||||||
break
|
break
|
||||||
l = [p for p in self.__Places[i].estLibre]
|
l = [p for p in self.__Places[i].estLibre]
|
||||||
for p in l :
|
for p in l:
|
||||||
if p.dimValide(voiture.hauteur, voiture.longueur) :
|
if p.dimValide(voiture.hauteur, voiture.longueur):
|
||||||
pass
|
pass
|
||||||
trouve = True
|
place = p
|
||||||
break
|
break
|
||||||
return trouve
|
return place
|
||||||
|
|
||||||
def nbPlacesLibresNiveau(self, niveau):
|
def nbPlacesLibresNiveau(self, niveau):
|
||||||
i = 0
|
i = 0
|
||||||
@ -39,6 +40,12 @@ class Parking:
|
|||||||
i += 1
|
i += 1
|
||||||
return i
|
return i
|
||||||
|
|
||||||
|
def nbPlacesLibresParking(self):
|
||||||
|
nbP = 0
|
||||||
|
for i in range(0,self.__nbNiveaux) :
|
||||||
|
nbP += self.nbPlacesLibresNiveau(i)
|
||||||
|
return nbP
|
||||||
|
|
||||||
def addAbonnement(self, Abonnement):
|
def addAbonnement(self, Abonnement):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
|
import sys
|
||||||
|
import datetime
|
||||||
|
|
||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
|
|
||||||
class Place :
|
class Place:
|
||||||
def __init__(self,numero,niveau,longueur,hauteur):
|
"""
|
||||||
|
Representation d'une place dans un parking
|
||||||
|
"""
|
||||||
|
def __init__(self, numero, niveau, longueur, hauteur):
|
||||||
self.__numero = numero
|
self.__numero = numero
|
||||||
self.__niveau = niveau
|
self.__niveau = niveau
|
||||||
self.__longueur = longueur
|
self.__longueur = longueur
|
||||||
self.__hauteur = hauteur
|
self.__hauteur = hauteur
|
||||||
self.__estLibre = True
|
self.__estLibre = True
|
||||||
self.__estReserver = False
|
self.__estReserver = False
|
||||||
|
self.__Placement = None
|
||||||
@property
|
@property
|
||||||
def estLibre(self):
|
def estLibre(self):
|
||||||
return self.__estLibre
|
return self.__estLibre
|
||||||
@ -18,15 +24,36 @@ class Place :
|
|||||||
def estReserver(self):
|
def estReserver(self):
|
||||||
return self.__estReserver
|
return self.__estReserver
|
||||||
|
|
||||||
def dimValide(self,h,l):
|
def dimValide(self, h, l):
|
||||||
return h<self.__hauteur and l<self.__longueur
|
return h < self.__hauteur and l < self.__longueur
|
||||||
|
|
||||||
def addPlacement(self, placement):
|
def reserver(self):
|
||||||
pass
|
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 :
|
class TypePlace:
|
||||||
def __init__(self,h,l,nb):
|
"""
|
||||||
|
Classe qui permet de définir un type de place
|
||||||
|
"""
|
||||||
|
def __init__(self, h, l, nb):
|
||||||
self.__hauteur = h
|
self.__hauteur = h
|
||||||
self.__longueur = l
|
self.__longueur = l
|
||||||
self.__nb = nb
|
self.__nb = nb
|
||||||
@ -44,13 +71,33 @@ class TypePlace :
|
|||||||
return self.__nb
|
return self.__nb
|
||||||
|
|
||||||
|
|
||||||
class ListeTypePlace :
|
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):
|
def __init__(self):
|
||||||
self.l = []
|
self.l = []
|
||||||
|
|
||||||
def add(self,h,l,nb):
|
def add(self, h, l, nb):
|
||||||
self.l.append(TypePlace(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
|
@property
|
||||||
def liste(self):
|
def liste(self):
|
||||||
return self.l
|
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
|
114
src/v/Borne.py
114
src/v/Borne.py
@ -1,8 +1,116 @@
|
|||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
class Borne:
|
# -*- coding: utf-8 -*-
|
||||||
def __init__(self):
|
|
||||||
pass
|
# 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):
|
def delivrerTicket(self, client):
|
||||||
pass
|
pass
|
||||||
|
@ -2,6 +2,9 @@ __author__ = 'sidya'
|
|||||||
|
|
||||||
|
|
||||||
class Camera:
|
class Camera:
|
||||||
def __init__(self):
|
def detecterVoiture(self):
|
||||||
pass
|
return True
|
||||||
|
|
||||||
|
def donnerVoiture(self):
|
||||||
|
v = Voiture() # need classe voiture \o/
|
||||||
|
return v
|
||||||
|
@ -2,13 +2,12 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'main.ui'
|
# Form implementation generated from reading ui file 'main.ui'
|
||||||
#
|
#
|
||||||
# Created: Wed Dec 10 16:36:07 2014
|
# Created: Tue Dec 23 18:26:40 2014
|
||||||
# by: PyQt4 UI code generator 4.11.3
|
# by: PyQt4 UI code generator 4.11.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from PyQt4.QtGui import QListWidgetItem
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_fromUtf8 = QtCore.QString.fromUtf8
|
_fromUtf8 = QtCore.QString.fromUtf8
|
||||||
@ -27,7 +26,7 @@ except AttributeError:
|
|||||||
class Ui_MainWindow(object):
|
class Ui_MainWindow(object):
|
||||||
def setupUi(self, MainWindow):
|
def setupUi(self, MainWindow):
|
||||||
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
MainWindow.setObjectName(_fromUtf8("MainWindow"))
|
||||||
MainWindow.resize(522, 412)
|
MainWindow.resize(553, 479)
|
||||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
self.centralwidget = QtGui.QWidget(MainWindow)
|
||||||
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
|
||||||
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
self.tabWidget = QtGui.QTabWidget(self.centralwidget)
|
||||||
@ -38,9 +37,9 @@ class Ui_MainWindow(object):
|
|||||||
self.label = QtGui.QLabel(self.tab)
|
self.label = QtGui.QLabel(self.tab)
|
||||||
self.label.setGeometry(QtCore.QRect(40, 10, 61, 15))
|
self.label.setGeometry(QtCore.QRect(40, 10, 61, 15))
|
||||||
self.label.setObjectName(_fromUtf8("label"))
|
self.label.setObjectName(_fromUtf8("label"))
|
||||||
self.log = QtGui.QListWidget(self.tab)
|
self.listWidget = QtGui.QListWidget(self.tab)
|
||||||
self.log.setGeometry(QtCore.QRect(30, 40, 421, 241))
|
self.listWidget.setGeometry(QtCore.QRect(60, 50, 431, 261))
|
||||||
self.log.setObjectName(_fromUtf8("log"))
|
self.listWidget.setObjectName(_fromUtf8("listWidget"))
|
||||||
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
self.tabWidget.addTab(self.tab, _fromUtf8(""))
|
||||||
self.tab_2 = QtGui.QWidget()
|
self.tab_2 = QtGui.QWidget()
|
||||||
self.tab_2.setObjectName(_fromUtf8("tab_2"))
|
self.tab_2.setObjectName(_fromUtf8("tab_2"))
|
||||||
@ -92,18 +91,18 @@ class Ui_MainWindow(object):
|
|||||||
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
|
||||||
self.tab_5 = QtGui.QWidget()
|
self.tab_5 = QtGui.QWidget()
|
||||||
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
self.tab_5.setObjectName(_fromUtf8("tab_5"))
|
||||||
self.tableView = QtGui.QTableView(self.tab_5)
|
self.tableWidget = QtGui.QTableWidget(self.tab_5)
|
||||||
self.tableView.setGeometry(QtCore.QRect(50, 40, 431, 201))
|
self.tableWidget.setGeometry(QtCore.QRect(60, 20, 431, 351))
|
||||||
self.tableView.setObjectName(_fromUtf8("tableView"))
|
self.tableWidget.setObjectName(_fromUtf8("tableWidget"))
|
||||||
|
self.tableWidget.setColumnCount(0)
|
||||||
|
self.tableWidget.setRowCount(0)
|
||||||
self.tabWidget.addTab(self.tab_5, _fromUtf8(""))
|
self.tabWidget.addTab(self.tab_5, _fromUtf8(""))
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
MainWindow.setCentralWidget(self.centralwidget)
|
||||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 522, 25))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 553, 25))
|
||||||
self.menubar.setObjectName(_fromUtf8("menubar"))
|
self.menubar.setObjectName(_fromUtf8("menubar"))
|
||||||
self.menuBorne = QtGui.QMenu(self.menubar)
|
self.menuFichier = QtGui.QMenu(self.menubar)
|
||||||
self.menuBorne.setObjectName(_fromUtf8("menuBorne"))
|
self.menuFichier.setObjectName(_fromUtf8("menuFichier"))
|
||||||
self.menuBornes = QtGui.QMenu(self.menubar)
|
|
||||||
self.menuBornes.setObjectName(_fromUtf8("menuBornes"))
|
|
||||||
self.menuA_propos = QtGui.QMenu(self.menubar)
|
self.menuA_propos = QtGui.QMenu(self.menubar)
|
||||||
self.menuA_propos.setObjectName(_fromUtf8("menuA_propos"))
|
self.menuA_propos.setObjectName(_fromUtf8("menuA_propos"))
|
||||||
MainWindow.setMenuBar(self.menubar)
|
MainWindow.setMenuBar(self.menubar)
|
||||||
@ -124,21 +123,21 @@ class Ui_MainWindow(object):
|
|||||||
self.actionListe.setObjectName(_fromUtf8("actionListe"))
|
self.actionListe.setObjectName(_fromUtf8("actionListe"))
|
||||||
self.actionAjouter = QtGui.QAction(MainWindow)
|
self.actionAjouter = QtGui.QAction(MainWindow)
|
||||||
self.actionAjouter.setObjectName(_fromUtf8("actionAjouter"))
|
self.actionAjouter.setObjectName(_fromUtf8("actionAjouter"))
|
||||||
self.menuBorne.addSeparator()
|
self.actionQuitter = QtGui.QAction(MainWindow)
|
||||||
self.menuBorne.addAction(self.actionCharger)
|
self.actionQuitter.setObjectName(_fromUtf8("actionQuitter"))
|
||||||
self.menuBorne.addAction(self.actionSauvegarder)
|
self.menuFichier.addAction(self.actionCharger)
|
||||||
self.menubar.addAction(self.menuBorne.menuAction())
|
self.menuFichier.addAction(self.actionSauvegarder)
|
||||||
self.menubar.addAction(self.menuBornes.menuAction())
|
self.menuFichier.addSeparator()
|
||||||
|
self.menuFichier.addAction(self.actionQuitter)
|
||||||
|
self.menubar.addAction(self.menuFichier.menuAction())
|
||||||
self.menubar.addAction(self.menuA_propos.menuAction())
|
self.menubar.addAction(self.menuA_propos.menuAction())
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
self.tabWidget.setCurrentIndex(0)
|
self.tabWidget.setCurrentIndex(2)
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
def retranslateUi(self, MainWindow):
|
||||||
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
|
MainWindow.setWindowTitle(_translate("MainWindow", "Administration", None))
|
||||||
self.label.setText(_translate("MainWindow", "Activité :", None))
|
self.label.setText(_translate("MainWindow", "Activité :", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Activite", None))
|
||||||
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
self.label_13.setText(_translate("MainWindow", "Nom :", None))
|
||||||
@ -150,8 +149,7 @@ class Ui_MainWindow(object):
|
|||||||
self.pushButton.setText(_translate("MainWindow", "Supprimer", 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_2), _translate("MainWindow", "Parkings", None))
|
||||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Membres", None))
|
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_5), _translate("MainWindow", "Membres", None))
|
||||||
self.menuBorne.setTitle(_translate("MainWindow", "Fichier", None))
|
self.menuFichier.setTitle(_translate("MainWindow", "Fichier", None))
|
||||||
self.menuBornes.setTitle(_translate("MainWindow", "Quitter", None))
|
|
||||||
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
self.menuA_propos.setTitle(_translate("MainWindow", "A propos", None))
|
||||||
self.actionCharger.setText(_translate("MainWindow", "Charger", None))
|
self.actionCharger.setText(_translate("MainWindow", "Charger", None))
|
||||||
self.actionSauvegarder.setText(_translate("MainWindow", "Sauvegarder", None))
|
self.actionSauvegarder.setText(_translate("MainWindow", "Sauvegarder", None))
|
||||||
@ -160,9 +158,15 @@ class Ui_MainWindow(object):
|
|||||||
self.actionRechercher.setText(_translate("MainWindow", "Rechercher", None))
|
self.actionRechercher.setText(_translate("MainWindow", "Rechercher", None))
|
||||||
self.actionListe.setText(_translate("MainWindow", "Liste", None))
|
self.actionListe.setText(_translate("MainWindow", "Liste", None))
|
||||||
self.actionAjouter.setText(_translate("MainWindow", "Ajouter", None))
|
self.actionAjouter.setText(_translate("MainWindow", "Ajouter", None))
|
||||||
|
self.actionQuitter.setText(_translate("MainWindow", "Quitter", None))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################NOT GENERATED####################################################
|
################################NOT GENERATED####################################################
|
||||||
def addItemActivite(self, line) :
|
def addItemActivite(self, line) :
|
||||||
self.log.addItem(line)
|
self.log.addItem(line)
|
||||||
|
|
||||||
|
def addListeParkings(self, parkings) :
|
||||||
|
self.comboBox.addItem("lol")
|
@ -1,8 +1,6 @@
|
|||||||
__author__ = 'sidya'
|
__author__ = 'sidya'
|
||||||
|
|
||||||
class Panneau:
|
|
||||||
def __init__(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
class Panneau:
|
||||||
def afficherNbPlaceDisponible(self, parking):
|
def afficherNbPlaceDisponible(self, parking):
|
||||||
pass
|
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))
|
||||||
|
|
Reference in New Issue
Block a user