-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay.py
More file actions
51 lines (41 loc) · 1.49 KB
/
display.py
File metadata and controls
51 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from tkinter import *
from tkinter import Tk, Label,Frame, Button, Menu
from main import EyeDet
import cv2
import dlib
from math import hypot
from pynput.keyboard import Controller
#import time
#from test import test
class display(EyeDet):
global count
global entry
count=0
def print_me():
print(entry.get())
def __init__(self, master):
global count
global entry
elem = EyeDet()
master.title("IDetector")
master.geometry("600x400+200+0")
menu = Menu(master)
master.config(menu=menu, bg="#49504F")
subMenu = Menu(menu)
menu.add_cascade(label="File", menu=subMenu)
subMenu.add_command(label="Exit", command=self.finish)
self.container1 = Frame(master, width=100, height=100)
self.container1.pack()
self.title = Label(self.container1, text="Welcome To IDetector", fg="#C9E9E5", bg="#49504F", font="Helvetica 40", pady=40, bd=2)
self.title.grid(row=0, columnspan=5)
self.container2 = Frame(master, width=100, height=20)
self.container2.pack()
self.button1 = Button(self.container2, text="Click here to start eye detection and do wonderful things", bg="#eee", font="Times 15", height=10, width = 60)
self.button1.grid(row=0)
self.button1.bind("<Button-1>", elem.starter)
def finish(self):
root.destroy()
if __name__ =="__main__":
root = Tk()
start = display(root)
root.mainloop()