示例#1
0
 def init(self, retico_widget, mpane, module_list, file_list):
     self.retico_widget = retico_widget
     self.mpane = mpane
     with flx.VBox(css_class="stupid-vbox") as stupid_vbox:
         stupid_vbox.set_padding("20px")
         with flx.TreeWidget(max_selected=1, style="height: 300px;",
                             flex=1) as self.module_tree:
             for k in module_list.keys():
                 with flx.TreeItem(text=k, checked=None):
                     for m in module_list[k]:
                         flx.TreeItem(text=m, checked=None)
         self.add_module_button = flx.Button(text="Add Module")
         flx.Widget(style="min-height:50px;")
         self.run_button = flx.Button(text="Run", css_class="menu-button")
         self.stop_button = flx.Button(text="Stop", css_class="menu-button")
         self.stop_button.set_disabled(True)
         flx.Widget(style="min-height:50px;")
         self.file_tree = flx.TreeWidget(max_selected=1,
                                         style="height:300px;",
                                         flex=1)
         self.update_file_tree(file_list)
         self.load_button = flx.Button(text="Load")
         self.filename_edit = flx.LineEdit()
         self.save_button = flx.Button(text="Save")
         self.clear_button = flx.Button(text="Clear")
         flx.Widget(flex=1)
示例#2
0
 def init(self):
     with flx.FormLayout():
         with flx.TreeWidget(flex=2, title='Defaults:'):
             self.defaults = []
             for i in range(max_scheduled):
                 self.defaults[i] = flx.TreeItem(checked=False)
                 self.defaults[i].set_visible(False)
         flx.Widget(flex=1)
         with flx.TreeWidget(title='Screens', max_selected=0) as self.screens:
             self.screens = []
             for i in range(screen_num):
                 self.screens[i] = flx.TreeItem(checked=False)
                 self.screens[i].set_visible(False)
             self.update_screens()
         self.add_button = flx.Button(text='Add New Default')
示例#3
0
 def init(self):
     
     with flx.HSplit():
         with flx.TreeWidget(max_selected=1, flex=1) as self.videolist:
             for name in sorted(videos):
                 flx.TreeItem(text=name)
         
         self.player = flx.VideoWidget(flex=5)
示例#4
0
 def init(self):
     self.json = None
     with flx.FormLayout() as self.form:
         self.name = flx.ComboBox(title='Display Name:', options=screens)
         self.rotation = flx.ComboBox(title='Rotation:', options=rotations)
         flx.Widget(flex=1)
         with flx.TreeWidget(flex=2, title='Defaults:', max_selected = 1) as self.default_box:
             self.defaults = []
             for i in range(max_scheduled):
                 self.defaults[i] = flx.TreeItem(title=str(i), checked=False)
                 self.defaults[i].set_visible(False)
         with flx.TreeWidget(flex=2, title='Events:', max_selected = 1) as self.event_box:
             self.events = []
             for i in range(max_scheduled):
                 self.events[i] = flx.TreeItem(title=str(i), checked=False)
                 self.events[i].set_visible(False)
         self.delete = flx.Button(text='Delete Selected Entries')
         self.revert = flx.Button(text='Revert Changes')
         self.upload = flx.Button(text='Save and Upload')
         flx.Widget(flex=5)
示例#5
0
 def init(self):
     with flx.HSplit():
         with flx.VBox(flex=1):
             self.summary = flx.TreeWidget(flex=1, max_selected=1)
         with flx.VSplit(flex=1):
             with flx.GroupWidget(css_class="list", flex=6, title="Detail"):
                 self.detail = flx.Label(flex=1, css_class="detail")
                 self.detail.set_wrap(2)
             with flx.GroupWidget(css_class="list", flex=4,
                                  title="hexdump"):
                 self.hexdump = flx.Label(flex=1, css_class="detail")
                 self.hexdump.set_wrap(1)
示例#6
0
 def init(self):
     with flx.HSplit():
         with flx.TreeWidget(flex=1, max_selected=1) as self.tree:
             for t in ['foo', 'bar', 'spam', 'eggs']:
                 with flx.TreeItem(text=t, checked=None):
                     for i in range(4):
                         item2 = flx.TreeItem(text=t + ' %i' % i,
                                              checked=False)
                         if i == 2:
                             with item2:
                                 flx.TreeItem(title='A',
                                              text='more info on A')
                                 flx.TreeItem(title='B',
                                              text='more info on B')
示例#7
0
 def init(self):
     # A nice and cosy tree view
     with flx.DropdownContainer(text='Scene graph'):
         with flx.TreeWidget(max_selected=1):
             for i in range(20):
                 flx.TreeItem(text='foo %i' % i, checked=False)
示例#8
0
 def init(self):
     with flx.TreeWidget(flex=2, title='Events:'):
         self.events = []
         for i in range(max_scheduled):
             self.events[i] = flx.TreeItem(title=str(i), checked=False)
             self.events[i].set_visible(False)