Skip to content

Commit

Permalink
Add placeholder functions for main app
Browse files Browse the repository at this point in the history
  • Loading branch information
jwu910 committed Oct 23, 2019
1 parent e468197 commit 1fa8e92
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 32 deletions.
21 changes: 0 additions & 21 deletions ezpb/__init__.py

This file was deleted.

58 changes: 47 additions & 11 deletions ezpb/__main__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,57 @@
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.button import Button
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label

class EzPb(App):
def build(self):
layout = BoxLayout(
orientation='vertical')
Builder.load_string('''
<MainMenu>:
orientation: 'vertical'
size_hint_y: .5
Label:
text: 'Welcome to the Ez PhotoBooth!'
# Label:
# text: root.logs
BoxLayout:
orientation: 'horizontal'
size_hint: (1,.3)
Button:
text: 'Choose Printer'
on_press: root.choose_printer()
Button:
text: 'Choose Overlay Image'
on_press: root.choose_overlay()
Button:
text: 'Choose Destination Folder'
on_press: root.choose_destination()
Button:
text: 'Start'
on_press: root.start()
''')

class MainMenu(BoxLayout):
def choose_printer(self):
print("TODO: Find Printer")

def choose_overlay(self):
print("TODO: Select overlay image")

welcome = Label(text='Welcome to the Ez PhotoBooth!')
def choose_destination(self):
print("TODO: Set destination directory")

def start(self):
print("TODO: Start watching")

class Photobooth(App):
def build(self):
return MainMenu()

start = Button(text='Start', size_hint=(.2, .2))

layout.add_widget(welcome)
layout.add_widget(start)
class Notifications(BoxLayout):
def __init__(self):
self.message = 'Welcome to the Ez Photobooth'

return layout
def notify(self, message):
self.message = message

if __name__ == '__main__':
EzPb().run()
Photobooth().run()

0 comments on commit 1fa8e92

Please sign in to comment.