-
Notifications
You must be signed in to change notification settings - Fork 11
/
MidSectionMeasurementsPanel.py
60 lines (40 loc) · 1.52 KB
/
MidSectionMeasurementsPanel.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# All works in this code have been curated by ECCC and licensed under the GNU General Public License v3.0.
# Read more: https://www.gnu.org/licenses/gpl-3.0.en.html
from MidSectionHeader import *
from MidSectionSummaryTable import *
from MidsectionImportPanel import MidsectionImportPanel
class MidSectionMeasurementsPanel(wx.Panel):
def __init__(self, mode, lang, *args, **kwargs):
super(MidSectionMeasurementsPanel, self).__init__(*args, **kwargs)
self.mode = mode
self.lang = lang
# self.manager = manager
self.InitUI()
def InitUI(self):
layout = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(layout)
self.header = MidSectionHeader(self.mode, self)
self.table = MidSectionSummaryTable(self, size=(-1, 300))
# self.plot = MidsectionImportPanel(parent=self)
self.plot = None
# self.plot.Hide()
layout.Add(self.header, 1, wx.EXPAND)
layout.Add(self.table, 1, wx.EXPAND|wx.BOTTOM, 20)
# layout.Add(self.plot, 0, wx.EXPAND|wx.ALL)
def UpdateSummary(self, values):
self.header.UpdateSummary(values)
def GetPlotPanel(self):
return self.plot
def GetHeaderPanel(self):
return self.header
def GetSumTablePanel(self):
return self.table
def main():
app = wx.App()
frame = wx.Frame(None, size=(940, 850))
MidSectionMeasurementsPanel("debug", wx.LANGUAGE_FRENCH, frame)
frame.Centre()
frame.Show()
app.MainLoop()
if __name__ == '__main__':
main()