-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathomniprogramGUI.py
More file actions
159 lines (119 loc) · 4.37 KB
/
omniprogramGUI.py
File metadata and controls
159 lines (119 loc) · 4.37 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
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
#Jesse A. Jones
#Version: 2023-08-14.90
#All alphabet category programs imported as well as tkinter.
from tkinter import *
import aPrograms
import bPrograms
import cPrograms
import dPrograms
import ePrograms
import hPrograms
import kPrograms
import mPrograms
import rPrograms
import sPrograms
import tPrograms
import wPrograms
import yPrograms
import vPrograms
"""
This program is a compilation of various side projects
I have written over the course of two years or so.
These projects are generally time nerd related stuff,
nothing too serious. These projects were made for fun.
"""
class Omni(object):
#Creates all necessary buttons to call the appropriate functions.
def __init__(self, window = None):
self.window = window
self.soundsAllowed = False
self.frameTop = Frame(self.window)
self.frameTop.pack(side = TOP)
FONT = "Ariel 20"
self.quitButton = Button(self.frameTop, text = "Quit",
font = FONT, command = self.quitButtonAction)
self.quitButton.pack()
self.frameBottom = Frame(self.window)
self.frameBottom.pack(side = BOTTOM)
self.aButton = Button(self.frameBottom, text = "A Programs",
font = FONT, command = self.aFunc)
self.aButton.grid(row = 0, column = 0)
self.bButton = Button(self.frameBottom, text = "B Programs",
font = FONT, command = self.bFunc)
self.bButton.grid(row = 0, column = 1)
self.cButton = Button(self.frameBottom, text = "C Programs",
font = FONT, command = self.cFunc)
self.cButton.grid(row = 0, column = 2)
self.dButton = Button(self.frameBottom, text = "D Programs",
font = FONT, command = self.dFunc)
self.dButton.grid(row = 1, column = 0)
self.eButton = Button(self.frameBottom, text = "E Programs",
font = FONT, command = self.eFunc)
self.eButton.grid(row = 1, column = 1)
self.hButton = Button(self.frameBottom, text = "H Programs",
font = FONT, command = self.hFunc)
self.hButton.grid(row = 1, column = 2)
self.kButton = Button(self.frameBottom, text = "K Programs",
font = FONT, command = self.kFunc)
self.kButton.grid(row = 2, column = 0)
self.mButton = Button(self.frameBottom, text = "M Programs",
font = FONT, command = self.mFunc)
self.mButton.grid(row = 2, column = 1)
self.rButton = Button(self.frameBottom, text = "R Programs",
font = FONT, command = self.rFunc)
self.rButton.grid(row = 2, column = 2)
self.sButton = Button(self.frameBottom, text = "S Programs",
font = FONT, command = self.sFunc)
self.sButton.grid(row = 3, column = 0)
self.tButton = Button(self.frameBottom, text = "T Programs",
font = FONT, command = self.tFunc)
self.tButton.grid(row = 3, column = 1)
self.vButton = Button(self.frameBottom, text = "V Programs",
font = FONT, command = self.vFunc)
self.vButton.grid(row = 3, column = 2)
self.wButton = Button(self.frameBottom, text = "W Programs",
font = FONT, command = self.wFunc)
self.wButton.grid(row = 4, column = 0)
self.yButton = Button(self.frameBottom, text = "Y Programs",
font = FONT, command = self.yFunc)
self.yButton.grid(row = 4, column = 1)
#This method quits the main window.
def quitButtonAction(self):
self.window.destroy()
#All methods listed below call the alphabetized category programs.
def aFunc(self):
aPrograms.main()
def bFunc(self):
bPrograms.main()
def cFunc(self):
cPrograms.main()
def dFunc(self):
dPrograms.main()
def eFunc(self):
ePrograms.main()
def hFunc(self):
hPrograms.main()
def kFunc(self):
kPrograms.main()
def mFunc(self):
mPrograms.main()
def rFunc(self):
rPrograms.main()
def sFunc(self):
sPrograms.main()
def tFunc(self):
tPrograms.main()
def vFunc(self):
vPrograms.main()
def wFunc(self):
wPrograms.main()
def yFunc(self):
yPrograms.main()
def main():
#Sets up initial omniprogram menu.
root = Tk()
root.title("Omniprogram Mark II")
om = Omni(root)
root.mainloop()
if __name__ == "__main__":
main()