debug login & barre outils + ajout nouvelles images
|
@ -3,12 +3,14 @@
|
|||
from __future__ import unicode_literals
|
||||
import sys
|
||||
import os
|
||||
from PIL import Image,ImageTk
|
||||
from tkinter import *
|
||||
DOSSIER_COURRANT = os.path.dirname(os.path.abspath(__file__))
|
||||
DOSSIER_PARENT = os.path.dirname(DOSSIER_COURRANT)
|
||||
sys.path.append(DOSSIER_PARENT)
|
||||
from tkinter import *
|
||||
import Auth.authentification as auth
|
||||
from PIL import Image,ImageTk
|
||||
|
||||
import Auth.authentication as auth
|
||||
|
||||
|
||||
class Login():
|
||||
"""Classe gérant l'affichage de la fenêtre de login"""
|
||||
|
@ -19,10 +21,6 @@ class Login():
|
|||
self.fenetre = Tk()
|
||||
|
||||
self.fenetre.title('login')
|
||||
try:
|
||||
self.fenetre.iconbitmap("..\\icon.ico")
|
||||
except Exception:
|
||||
self.fenetre.iconbitmap("icon.ico")
|
||||
|
||||
# Création de nos widgets
|
||||
self.message = Label(self.fenetre, text="Merci de vous identifier")
|
||||
|
@ -49,4 +47,3 @@ class Login():
|
|||
|
||||
if auth.Auth.access == True:
|
||||
self.fenetre.destroy()
|
||||
|
||||
|
|
BIN
Images/Icone.ico
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
Images/Logo.png
Normal file
After Width: | Height: | Size: 8.8 KiB |
BIN
Images/add.png
Normal file
After Width: | Height: | Size: 744 B |
BIN
Images/browse.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
Images/quicktask.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
Images/quit.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
Images/stats.png
Normal file
After Width: | Height: | Size: 927 B |
|
@ -1,12 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
import os
|
||||
DOSSIER_COURRANT = os.path.dirname(os.path.abspath(__file__))
|
||||
DOSSIER_PARENT = os.path.dirname(DOSSIER_COURRANT)
|
||||
sys.path.append(DOSSIER_PARENT)
|
||||
from tkinter import *
|
||||
from tkinter.messagebox import *
|
||||
from PIL import Image, ImageTk
|
||||
DOSSIER_COURRANT = os.path.dirname(os.path.abspath(__file__))
|
||||
DOSSIER_PARENT = os.path.dirname(DOSSIER_COURRANT)
|
||||
sys.path.append(DOSSIER_PARENT)
|
||||
from Views.quickTask import QuickTask
|
||||
|
||||
|
||||
class BarreOutils():
|
||||
|
@ -17,11 +18,6 @@ class BarreOutils():
|
|||
def __init__(self):
|
||||
# céation de la fenetre
|
||||
self.fenetre = Tk()
|
||||
# icone fenetre
|
||||
try:
|
||||
self.fenetre.iconbitmap("..\icon.ico")
|
||||
except Exception:
|
||||
self.fenetre.iconbitmap("icon.ico")
|
||||
|
||||
# Booleen fermer : devient true quand on appuie sur le bouton deconnexion
|
||||
self.fermer = False
|
||||
|
@ -69,7 +65,7 @@ class BarreOutils():
|
|||
|
||||
################################################################################################################
|
||||
try:
|
||||
image = Image.open(fleche)
|
||||
image = Image.open("./Images/quicktask.png")
|
||||
except Exception:
|
||||
image = Image.open(fleche2)
|
||||
|
||||
|
@ -80,7 +76,7 @@ class BarreOutils():
|
|||
################################################################################################################
|
||||
# Bouton Nouveau Projet
|
||||
try:
|
||||
image = Image.open(plus)
|
||||
image = Image.open("./Images/add.png")
|
||||
except Exception:
|
||||
image = Image.open(plus2)
|
||||
photo = ImageTk.PhotoImage(image)
|
||||
|
@ -90,7 +86,7 @@ class BarreOutils():
|
|||
################################################################################################################
|
||||
# Bouton Rapports
|
||||
try:
|
||||
image = Image.open(graphe)
|
||||
image = Image.open("./Images/stats.png")
|
||||
except Exception:
|
||||
image = Image.open(graphe2)
|
||||
photo = ImageTk.PhotoImage(image)
|
||||
|
@ -100,7 +96,7 @@ class BarreOutils():
|
|||
################################################################################################################
|
||||
# Bouton Naviguer
|
||||
try:
|
||||
image = Image.open(loupe)
|
||||
image = Image.open("./Images/browse.png")
|
||||
except Exception:
|
||||
image = Image.open(loupe2)
|
||||
photo = ImageTk.PhotoImage(image)
|
||||
|
@ -110,7 +106,7 @@ class BarreOutils():
|
|||
################################################################################################################
|
||||
# Bouton Deconnexion
|
||||
try:
|
||||
image = Image.open(deco)
|
||||
image = Image.open("./Images/quit.png")
|
||||
except Exception:
|
||||
image = Image.open(deco2)
|
||||
photo = ImageTk.PhotoImage(image)
|
||||
|
@ -118,38 +114,35 @@ class BarreOutils():
|
|||
self.bouton_deconnexion.grid(row=7,column=1)
|
||||
self.bouton_deconnexion.image = photo
|
||||
################################################################################################################
|
||||
def deconnexion(self,*args):
|
||||
def deconnexion(self):
|
||||
"""L'utilisateur veut fermer le programme et se deconnecter"""
|
||||
self.callback()
|
||||
if self.fermer == True:
|
||||
self.fenetre.destroy()
|
||||
def open_taches_rapides(self,*args):
|
||||
def open_taches_rapides(self):
|
||||
"""L'utilisateur veut ouvrir la fenetre des taches rapides"""
|
||||
toplevel = Toplevel(self.fenetre)
|
||||
toplevel.title('Subroot')
|
||||
QuickTask(mother=self.fenetre)
|
||||
# TODO : ouvrir la fenetre des taches rapides
|
||||
def open_nouveau_projet(self,*args):
|
||||
def open_nouveau_projet(self):
|
||||
"""L'utilisateur veut ouvrir la fenetre des nouveaux projets"""
|
||||
# TODO : ouvrir la fenetre des nouveaux projets
|
||||
def open_rapports(self,*args):
|
||||
def open_rapports(self):
|
||||
"""L'utilisateur veut ouvrir la fenetre des rapports"""
|
||||
# TODO : ouvrir la fenetre des rapports
|
||||
def naviguer(self,*args):
|
||||
def naviguer(self):
|
||||
"""L'utilisateur veut ouvrir la fenetre des rapports"""
|
||||
# TODO : ouvrir la fenetre de navigation
|
||||
self.fenetre.state('iconic')
|
||||
|
||||
def geoliste(self,g):
|
||||
def geoliste(self, g):
|
||||
r=[i for i in range(0,len(g)) if not g[i].isdigit()]
|
||||
return [int(g[0:r[0]]),int(g[r[0]+1:r[1]]),int(g[r[1]+1:r[2]]),int(g[r[2]+1:])]
|
||||
|
||||
def callback(self):
|
||||
if askyesno('Deconnexion', 'Êtes-vous sûr de vouloir vous deconnecter ?'):
|
||||
self.fermer = True
|
||||
else:
|
||||
self.fermer = askyesno('Deconnexion', 'Êtes-vous sûr de vouloir vous deconnecter ?')
|
||||
#showinfo('Titre 3', 'Vous avez peur!')
|
||||
#showerror("Titre 4", "Aha")
|
||||
self.fermer = False
|
||||
|
||||
def resource_path(self, relative_path):
|
||||
""" Get absolute path to resource, works for dev and for PyInstaller """
|
||||
try:
|
||||
|
|
BIN
Menu/deco.jpg
Before Width: | Height: | Size: 9.3 KiB |
BIN
Menu/fleche.png
Before Width: | Height: | Size: 6.4 KiB |
BIN
Menu/graphe.png
Before Width: | Height: | Size: 8.3 KiB |
BIN
Menu/loupe.jpg
Before Width: | Height: | Size: 9.5 KiB |
BIN
Menu/plus4.png
Before Width: | Height: | Size: 42 KiB |