equal
deleted
inserted
replaced
108 |
108 |
109 self.Preview = wx.Panel(id=wxID_BLOCKPROPERTIESDIALOGPREVIEW, |
109 self.Preview = wx.Panel(id=wxID_BLOCKPROPERTIESDIALOGPREVIEW, |
110 name='Preview', parent=self.MainPanel, pos=wx.Point(274, 104), |
110 name='Preview', parent=self.MainPanel, pos=wx.Point(274, 104), |
111 size=wx.Size(300, 200), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
111 size=wx.Size(300, 200), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
112 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
112 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
113 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
113 |
114 |
114 self._init_sizers() |
115 self._init_sizers() |
115 |
116 |
116 def __init__(self, parent): |
117 def __init__(self, parent): |
117 self._init_ctrls(parent) |
118 self._init_ctrls(parent) |
128 |
129 |
129 def FindTreeItem(self, root, name, inputs = None): |
130 def FindTreeItem(self, root, name, inputs = None): |
130 if root.IsOk(): |
131 if root.IsOk(): |
131 pydata = self.TypeTree.GetPyData(root) |
132 pydata = self.TypeTree.GetPyData(root) |
132 if inputs and "inputs" in pydata: |
133 if inputs and "inputs" in pydata: |
133 print inputs, pydata["inputs"] |
|
134 same_inputs = pydata["inputs"] == inputs |
134 same_inputs = pydata["inputs"] == inputs |
135 else: |
135 else: |
136 same_inputs = True |
136 same_inputs = True |
137 if self.TypeTree.GetItemText(root) == name and same_inputs: |
137 if self.TypeTree.GetItemText(root) == name and same_inputs: |
138 return root |
138 return root |
338 |
338 |
339 self.Preview = wx.Panel(id=wxID_VARIABLEPROPERTIESDIALOGPREVIEW, |
339 self.Preview = wx.Panel(id=wxID_VARIABLEPROPERTIESDIALOGPREVIEW, |
340 name='Preview', parent=self.MainPanel, pos=wx.Point(24, 170), |
340 name='Preview', parent=self.MainPanel, pos=wx.Point(24, 170), |
341 size=wx.Size(350, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
341 size=wx.Size(350, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
342 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
342 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
343 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
343 |
344 |
344 self._init_sizers() |
345 self._init_sizers() |
345 |
346 |
346 def __init__(self, parent): |
347 def __init__(self, parent): |
347 self._init_ctrls(parent) |
348 self._init_ctrls(parent) |
549 |
550 |
550 self.Preview = wx.Panel(id=wxID_CONNECTIONPROPERTIESDIALOGPREVIEW, |
551 self.Preview = wx.Panel(id=wxID_CONNECTIONPROPERTIESDIALOGPREVIEW, |
551 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
552 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
552 size=wx.Size(150, 100), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
553 size=wx.Size(150, 100), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
553 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
554 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
555 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
554 |
556 |
555 self._init_sizers() |
557 self._init_sizers() |
556 |
558 |
557 def __init__(self, parent): |
559 def __init__(self, parent): |
558 self._init_ctrls(parent) |
560 self._init_ctrls(parent) |
696 |
698 |
697 self.Preview = wx.Panel(id=wxID_LDELEMENTDIALOGPREVIEW, |
699 self.Preview = wx.Panel(id=wxID_LDELEMENTDIALOGPREVIEW, |
698 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
700 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
699 size=wx.Size(150, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
701 size=wx.Size(150, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
700 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
702 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
703 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
701 |
704 |
702 self._init_sizers() |
705 self._init_sizers() |
703 |
706 |
704 def __init__(self, parent, type): |
707 def __init__(self, parent, type): |
705 self.Type = type |
708 self.Type = type |
867 |
870 |
868 self.Preview = wx.Panel(id=wxID_LDPOWERRAILDIALOGPREVIEW, |
871 self.Preview = wx.Panel(id=wxID_LDPOWERRAILDIALOGPREVIEW, |
869 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
872 name='Preview', parent=self.MainPanel, pos=wx.Point(174, 48), |
870 size=wx.Size(150, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
873 size=wx.Size(150, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
871 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
874 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
875 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
872 |
876 |
873 self._init_sizers() |
877 self._init_sizers() |
874 |
878 |
875 def __init__(self, parent, type = LEFTRAIL, number = 1): |
879 def __init__(self, parent, type = LEFTRAIL, number = 1): |
876 self._init_ctrls(parent) |
880 self._init_ctrls(parent) |
1133 |
1137 |
1134 self.Preview = wx.Panel(id=wxID_DIVERGENCECREATEDIALOGPREVIEW, |
1138 self.Preview = wx.Panel(id=wxID_DIVERGENCECREATEDIALOGPREVIEW, |
1135 name='Preview', parent=self.MainPanel, pos=wx.Point(250, 48), |
1139 name='Preview', parent=self.MainPanel, pos=wx.Point(250, 48), |
1136 size=wx.Size(225, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
1140 size=wx.Size(225, 150), style=wx.TAB_TRAVERSAL|wx.SIMPLE_BORDER) |
1137 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
1141 self.Preview.SetBackgroundColour(wxColour(255,255,255)) |
|
1142 setattr(self.Preview, "GetDrawingMode", lambda:FREEDRAWING_MODE) |
1138 |
1143 |
1139 self._init_sizers() |
1144 self._init_sizers() |
1140 |
1145 |
1141 def __init__(self, parent): |
1146 def __init__(self, parent): |
1142 self._init_ctrls(parent) |
1147 self._init_ctrls(parent) |
1520 self.Table.ResetView(self.ActionsGrid) |
1525 self.Table.ResetView(self.ActionsGrid) |
1521 |
1526 |
1522 def GetValues(self): |
1527 def GetValues(self): |
1523 values = [] |
1528 values = [] |
1524 for data in self.Table.GetData(): |
1529 for data in self.Table.GetData(): |
1525 print data |
|
1526 action = {"qualifier" : data["Qualifier"], "value" : data["Value"]} |
1530 action = {"qualifier" : data["Qualifier"], "value" : data["Value"]} |
1527 if data["Type"] in ["Action", "Variable"]: |
1531 if data["Type"] in ["Action", "Variable"]: |
1528 action["type"] = "reference" |
1532 action["type"] = "reference" |
1529 else: |
1533 else: |
1530 action["type"] = "inline" |
1534 action["type"] = "inline" |
1588 self.Variables = [var["Name"].upper() for var in variables] |
1592 self.Variables = [var["Name"].upper() for var in variables] |
1589 |
1593 |
1590 def SetStepNames(self, step_names): |
1594 def SetStepNames(self, step_names): |
1591 self.StepNames = [step_name.upper() for step_name in step_names] |
1595 self.StepNames = [step_name.upper() for step_name in step_names] |
1592 |
1596 |
|
1597 def GetValue(self): |
|
1598 return self.GetSizer().GetItem(1).GetWindow().GetValue() |