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 from ui.reliability_app.create_window import CreateWindow
3 from ui.reliability_app.load_window import LoadWindow
4 from utils.ui_utils import UIUtils
5 
6 class MainWindow():
7  def __init__(self):
8  self.window = gtk.Window(gtk.WindowType.TOPLEVEL)
9  self.window.set_title('Reliability App')
10  self.window.connect('destroy', lambda x: gtk.main_quit())
11  self.window.set_border_width(10)
12  self.window.set_default_size(210, 150)
13 
14  box = gtk.VBox(False, 5)
15  create_button = UIUtils.create_button('Create Check', UIUtils.BUTTON_ICONS.CREATE)
16  create_button.connect('clicked', lambda widget, data=None: CreateWindow())
17  box.pack_start(create_button, False, False, 0)
18  create_button.show()
19 
20  load_button = UIUtils.create_button('Load Check', UIUtils.BUTTON_ICONS.RUN)
21  load_button.connect('clicked', lambda widget, data=None: LoadWindow())
22  box.pack_start(load_button, False, False, 0)
23  load_button.show()
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  exit_button.show()
29 
30  self.window.add(box)
31  box.show()
32  self.window.show()
33