-
Notifications
You must be signed in to change notification settings - Fork 2
/
HOME.py
178 lines (152 loc) · 6.98 KB
/
HOME.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.26
# in conjunction with Tcl version 8.6
# Nov 11, 2019 04:24:56 PM IST platform: Windows NT
import sys
import pandas as pd
from geo import geomap
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
import HOME_support
def vp_start_gui():
'''Starting point when module is the main routine.'''
global val, w, root
root = tk.Tk()
top = Toplevel1 (root)
HOME_support.init(root, top)
root.mainloop()
w = None
def create_Toplevel1(root, *args, **kwargs):
'''Starting point when module is imported by another program.'''
global w, w_win, rt
rt = root
w = tk.Toplevel (root)
top = Toplevel1 (w)
HOME_support.init(w, top, *args, **kwargs)
return (w, top)
def destroy_Toplevel1():
global w
w.destroy()
w = None
class Toplevel1:
def __init__(self, top=None):
'''This class configures and populates the toplevel window.
top is the toplevel containing window.'''
_bgcolor = '#d9d9d9' # X11 color: 'gray85'
_fgcolor = '#32a89d' # X11 color: 'black'
_compcolor = '#d9d9d9' # X11 color: 'gray85'
_ana1color = '#d9d9d9' # X11 color: 'gray85'
_ana2color = '#ececec' # Closest X11 color: 'gray92'
top.geometry("650x457+382+140")
top.minsize(120, 1)
top.maxsize(1370, 749)
top.resizable(1, 0)
top.title("HOME")
top.configure(background="#32a89d")
self.menubar = tk.Menu(top,font="TkMenuFont",bg=_bgcolor,fg='#ff8040')
top.configure(menu = self.menubar)
self.Frame1 = tk.Frame(top)
self.Frame1.place(relx=0.015, rely=0.044, relheight=0.93, relwidth=0.962)
self.Frame1.configure(relief='groove')
self.Frame1.configure(borderwidth="2")
self.Frame1.configure(relief="groove")
self.Frame1.configure(background="#d9d9d9")
self.Canvas1 = tk.Canvas(self.Frame1)
self.Canvas1.place(relx=0.0, rely=0.0, relheight=1.0, relwidth=1.0)
self.Canvas1.configure(background="#50eb4d")
self.Canvas1.configure(borderwidth="2")
self.Canvas1.configure(insertbackground="black")
self.Canvas1.configure(relief="ridge")
self.Canvas1.configure(selectbackground="#a88732")
self.Canvas1.configure(selectforeground="black")
def open1():
df = pd.read_excel(io='F:\PROJECT\FRMS\DATASETS\REFUGEES.xlsx')
print(df.head(2000))
def open2():
df = pd.read_excel(io='F:\PROJECT\FRMS\DATASETS\MISSING_PEOPLE.xlsx')
print(df.head(2000))
def open3():
df = pd.read_excel(io='F:\PROJECT\FRMS\DATASETS\SUPPLIES.xlsx')
print(df.head(2000))
self.Button1 = tk.Button(self.Canvas1,command=lambda: open1())
self.Button1.place(relx=0.144, rely=0.306, height=24, width=151)
self.Button1.configure(activebackground="#ececec")
self.Button1.configure(activeforeground="#000000")
self.Button1.configure(background="#d9d9d9")
self.Button1.configure(disabledforeground="#a3a3a3")
self.Button1.configure(foreground="#000000")
self.Button1.configure(highlightbackground="#d9d9d9")
self.Button1.configure(highlightcolor="black")
self.Button1.configure(pady="0")
self.Button1.configure(text='''REFUGEE'S INFORMATION''')
self.Button2 = tk.Button(self.Canvas1,command=lambda: open2())
self.Button2.place(relx=0.592, rely=0.306, height=24, width=157)
self.Button2.configure(activebackground="#ececec")
self.Button2.configure(activeforeground="#000000")
self.Button2.configure(background="#d9d9d9")
self.Button2.configure(disabledforeground="#a3a3a3")
self.Button2.configure(foreground="#000000")
self.Button2.configure(highlightbackground="#d9d9d9")
self.Button2.configure(highlightcolor="black")
self.Button2.configure(pady="0")
self.Button2.configure(text='''MISSING PEOPLE'S DETAILS''')
self.Button3 = tk.Button(self.Canvas1,command=lambda: open3())
self.Button3.place(relx=0.144, rely=0.588, height=24, width=154)
self.Button3.configure(activebackground="#ececec")
self.Button3.configure(activeforeground="#000000")
self.Button3.configure(background="#d9d9d9")
self.Button3.configure(disabledforeground="#a3a3a3")
self.Button3.configure(foreground="#000000")
self.Button3.configure(highlightbackground="#d9d9d9")
self.Button3.configure(highlightcolor="black")
self.Button3.configure(pady="0")
self.Button3.configure(text='''SUPPLIES INFORMATION''')
self.Button4 = tk.Button(self.Canvas1,command=lambda: geomap())
self.Button4.place(relx=0.508, rely=0.588, height=24, width=250)
self.Button4.configure(activebackground="#ececec")
self.Button4.configure(activeforeground="#000000")
self.Button4.configure(background="#d9d9d9")
self.Button4.configure(disabledforeground="#a3a3a3")
self.Button4.configure(foreground="#000000")
self.Button4.configure(highlightbackground="#d9d9d9")
self.Button4.configure(highlightcolor="black")
self.Button4.configure(pady="0")
self.Button4.configure(text='''SHOW LATEST FLOOD AFFECTED AREA''')
self.Label1 = tk.Label(self.Canvas1)
self.Label1.place(relx=0.288, rely=0.094, height=50, width=300)
self.Label1.configure(background="#eb6f4d")
self.Label1.configure(disabledforeground="#a3a3a3")
self.Label1.configure(foreground="#000000")
self.Label1.configure(text='''FLOOD RELIEF SHELTER MANAGEMENT SYSTEM''')
self.Label2 = tk.Label(self.Canvas1)
self.Label2.place(relx=0.100, rely=0.894, height=30, width=500)
self.Label2.configure(background="#58d92e")
self.Label2.configure(disabledforeground="#58d92e")
self.Label2.configure(foreground="#000000")
self.Label2.configure(text='''Created by Jahnavi Prasad and Shreedhar Niskawade''')
def show_refugee():
print("working")
@staticmethod
def popup1(event, *args, **kwargs):
Popupmenu1 = tk.Menu(root, tearoff=0)
Popupmenu1.configure(activebackground="#f9f9f9")
Popupmenu1.configure(activeborderwidth="5")
Popupmenu1.configure(activeforeground="black")
Popupmenu1.configure(background="#d9d9d9")
Popupmenu1.configure(borderwidth="5")
Popupmenu1.configure(disabledforeground="#a3a3a3")
Popupmenu1.configure(font="{Symbol} 30")
Popupmenu1.configure(foreground="black")
Popupmenu1.post(event.x_root, event.y_root)
if __name__ == '__main__':
vp_start_gui()