-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathround_tracks_gui.py
95 lines (65 loc) · 3.64 KB
/
round_tracks_gui.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
import wx.dataview
###########################################################################
## Class RoundTracksDialog
###########################################################################
class RoundTracksDialog ( wx.Dialog ):
def __init__( self, parent ):
wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Round Tracks", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )
self.SetSizeHints( wx.Size( 510,300 ), wx.DefaultSize )
grid_vert = wx.FlexGridSizer( 2, 1, 0, 0 )
grid_vert.AddGrowableCol( 0 )
grid_vert.AddGrowableRow( 0 )
grid_vert.SetFlexibleDirection( wx.BOTH )
grid_vert.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.netclasslist = wx.dataview.DataViewListCtrl( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
self.netclasslist.SetMinSize( wx.Size( 100,100 ) )
self.net_class = self.netclasslist.AppendTextColumn( u"Net Class", wx.dataview.DATAVIEW_CELL_INERT, 160, wx.ALIGN_LEFT, wx.dataview.DATAVIEW_COL_RESIZABLE|wx.dataview.DATAVIEW_COL_SORTABLE )
self.do_rounding = self.netclasslist.AppendToggleColumn( u"Rounding", wx.dataview.DATAVIEW_CELL_ACTIVATABLE, 80, wx.ALIGN_CENTER, wx.dataview.DATAVIEW_COL_SORTABLE )
self.scaling = self.netclasslist.AppendTextColumn( u"Scaling %", wx.dataview.DATAVIEW_CELL_EDITABLE, 80, wx.ALIGN_LEFT, wx.dataview.DATAVIEW_COL_SORTABLE )
self.max_length = self.netclasslist.AppendTextColumn( u"Length %", wx.dataview.DATAVIEW_CELL_EDITABLE, 80, wx.ALIGN_LEFT, wx.dataview.DATAVIEW_COL_SORTABLE )
self.passes = self.netclasslist.AppendTextColumn( u"Passes #", wx.dataview.DATAVIEW_CELL_EDITABLE, 80, wx.ALIGN_LEFT, wx.dataview.DATAVIEW_COL_SORTABLE )
grid_vert.Add( self.netclasslist, 1, wx.EXPAND|wx.TOP|wx.RIGHT|wx.LEFT, 5 )
grid_horiz = wx.FlexGridSizer( 0, 4, 0, 0 )
grid_horiz.AddGrowableCol( 2 )
grid_horiz.SetFlexibleDirection( wx.BOTH )
grid_horiz.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.do_create = wx.CheckBox( self, wx.ID_ANY, u"create a new file", wx.DefaultPosition, wx.DefaultSize, 0 )
self.do_create.SetValue(True)
grid_horiz.Add( self.do_create, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )
self.do_open = wx.CheckBox( self, wx.ID_ANY, u"open the newly created file", wx.DefaultPosition, wx.DefaultSize, 0 )
self.do_open.SetValue(True)
grid_horiz.Add( self.do_open, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 )
grid_horiz.Add( ( 0, 0), 1, wx.EXPAND, 5 )
self.apply = wx.Button( self, wx.ID_ANY, u"Run", wx.DefaultPosition, wx.Size( 120,-1 ), 0 )
self.apply.SetDefault()
grid_horiz.Add( self.apply, 0, wx.ALL|wx.EXPAND, 5 )
grid_vert.Add( grid_horiz, 1, wx.EXPAND, 5 )
self.SetSizer( grid_vert )
self.Layout()
grid_vert.Fit( self )
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_CLOSE, self.on_close )
self.netclasslist.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_DONE, self.on_item_editing, id = wx.ID_ANY )
self.do_create.Bind( wx.EVT_CHECKBOX, self.on_toggle_create )
self.apply.Bind( wx.EVT_BUTTON, self.run )
def __del__( self ):
pass
# Virtual event handlers, overide them in your derived class
def on_close( self, event ):
event.Skip()
def on_item_editing( self, event ):
event.Skip()
def on_toggle_create( self, event ):
event.Skip()
def run( self, event ):
event.Skip()