Baby Language Lab Scripts
A collection of data processing tools.
 All Classes Namespaces Files Functions Variables Pages
main_window.py
Go to the documentation of this file.
1 from gi.repository import Gtk as gtk
2 
3 from utils.ui_utils import UIUtils
4 from ui.reliability2_app.create_check_window import CreateCheckWindow
5 from ui.reliability2_app.load_window import LoadWindow
6 
7 class MainWindow():
8  def __init__(self):
9  self.window = gtk.Window(gtk.WindowType.TOPLEVEL)
10  self.window.set_title('Reliability App 2')
11  self.window.connect('destroy', lambda x: gtk.main_quit())
12  self.window.set_border_width(10)
13  self.window.set_default_size(210, 100)
14 
15  box = gtk.VBox(False, 5)
16 
17  create_button = UIUtils.create_button('New', UIUtils.BUTTON_ICONS.CREATE)
18  create_button.connect('clicked', lambda w: CreateCheckWindow())
19  box.pack_start(create_button, False, False, 0)
20 
21  load_button = UIUtils.create_button('Load', UIUtils.BUTTON_ICONS.OPEN)
22  load_button.connect('clicked', lambda w: LoadWindow())
23  box.pack_start(load_button, False, False, 0)
24 
25  exit_button = UIUtils.create_button('Exit', UIUtils.BUTTON_ICONS.EXIT)
26  exit_button.connect('clicked', lambda widget: gtk.main_quit())
27  box.pack_start(exit_button, False, False, 0)
28 
29  self.window.add(box)
30  self.window.show_all()