forked from openlp/openlp
Working sizers, add blank/live radio
bzr-revno: 4
This commit is contained in:
parent
fed67955a1
commit
33fd178b05
37
leftpanel.py
Normal file
37
leftpanel.py
Normal file
@ -0,0 +1,37 @@
|
||||
"""
|
||||
|
||||
wx.Panel for operator interface
|
||||
|
||||
"""
|
||||
|
||||
import wx
|
||||
|
||||
import oos
|
||||
|
||||
class LeftPanel(wx.Panel):
|
||||
"Left half of operator interface"
|
||||
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
"Panel constructor"
|
||||
|
||||
wx.Panel.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
oospanel = oos.OrderOfService(self)
|
||||
|
||||
self.goblank = wx.RadioButton(self, label="Blank Screen",
|
||||
style=wx.RB_GROUP)
|
||||
self.golive = wx.RadioButton(self, label="Go Live")
|
||||
|
||||
blankersizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
blankersizer.AddStretchSpacer()
|
||||
blankersizer.Add(self.goblank, 0, wx.RIGHT|wx.ALIGN_CENTER, 10)
|
||||
blankersizer.Add(self.golive, 0, wx.ALIGN_CENTER)
|
||||
blankersizer.AddStretchSpacer()
|
||||
|
||||
mainsizer = wx.BoxSizer(wx.VERTICAL)
|
||||
mainsizer.Add(oospanel, 1, wx.GROW|wx.BOTTOM, 10)
|
||||
mainsizer.Add(blankersizer, 0, wx.GROW)
|
||||
|
||||
self.SetSizer(mainsizer)
|
||||
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|
11
mainpanel.py
11
mainpanel.py
@ -7,7 +7,7 @@ wx.Panel for operator interface
|
||||
import wx
|
||||
|
||||
import controller
|
||||
import oos
|
||||
import leftpanel
|
||||
|
||||
class MainPanel(wx.Panel):
|
||||
"Operator interface"
|
||||
@ -17,13 +17,14 @@ class MainPanel(wx.Panel):
|
||||
|
||||
wx.Panel.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
controlbook = controller.Controller(self)
|
||||
oospanel = oos.OrderOfService(self)
|
||||
controlbook = controller.Controller(self, size=wx.Size(400,300))
|
||||
leftside = leftpanel.LeftPanel(self)
|
||||
|
||||
sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
sizer.Add(oospanel, 0, wx.TOP|wx.BOTTOM|wx.LEFT, 10)
|
||||
sizer.Add(controlbook, 1, wx.ALL, 10)
|
||||
sizer.Add(leftside, 0, wx.GROW|wx.TOP|wx.BOTTOM|wx.LEFT, 15)
|
||||
sizer.Add(controlbook, 1, wx.GROW|wx.ALL, 15)
|
||||
|
||||
self.SetSizerAndFit(sizer)
|
||||
sizer.SetSizeHints(parent)
|
||||
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|
||||
|
7
oos.py
7
oos.py
@ -19,12 +19,13 @@ class OrderOfService(wx.Panel):
|
||||
|
||||
sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
self.list = wx.ListBox(self, size=wx.Size(140, 250))
|
||||
self.list = wx.ListBox(self, size=wx.Size(180, 250))
|
||||
|
||||
self.list.Append("foo")
|
||||
|
||||
sizer.Add(self.list, 1, wx.BOTTOM, 10)
|
||||
sizer.Add(self.list, 1)
|
||||
#sizer.Add(self.list, 1, wx.GROW)
|
||||
|
||||
self.SetSizerAndFit(sizer)
|
||||
self.SetSizer(sizer)
|
||||
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80
|
||||
|
Loading…
Reference in New Issue
Block a user