class ReportVars():
- def __init__(self, where_clause = ""):
+ def __init__(self, name = "", where_clause = ""):
+ self.name = name
self.where_clause = where_clause
def UniqueId(self):
class BranchWindow(QMdiSubWindow):
- def __init__(self, glb, event_id, name, report_vars, parent=None):
+ def __init__(self, glb, event_id, report_vars, parent=None):
super(BranchWindow, self).__init__(parent)
model_name = "Branch Events " + str(event_id) + " " + report_vars.UniqueId()
self.setWidget(self.vbox.Widget())
- AddSubWindow(glb.mainwindow.mdi_area, self, name + " Branch Events")
+ AddSubWindow(glb.mainwindow.mdi_area, self, report_vars.name + " Branch Events")
def ResizeColumnToContents(self, column, n):
# Using the view's resizeColumnToContents() here is extrememly slow
self.glb = glb
- self.name = ""
self.report_vars = ReportVars()
self.setWindowTitle(title)
def Ok(self):
vars = self.report_vars
- self.name = self.data_items[0].value
- if not self.name:
+ vars.name = self.data_items[0].value
+ if not vars.name:
self.ShowMessage("Report name is required")
return
for d in self.data_items:
CallGraphWindow(self.glb, self)
def NewBranchView(self, event_id):
- BranchWindow(self.glb, event_id, "", ReportVars(), self)
+ BranchWindow(self.glb, event_id, ReportVars(), self)
def NewSelectedBranchView(self, event_id):
dialog = SelectedBranchDialog(self.glb, self)
ret = dialog.exec_()
if ret:
- BranchWindow(self.glb, event_id, dialog.name, dialog.report_vars, self)
+ BranchWindow(self.glb, event_id, dialog.report_vars, self)
def NewTableView(self, table_name):
TableWindow(self.glb, table_name, self)