Ejemplo n.º 1
0
 def __init__(self, mw, newdicts, convs):
     super().__init__()
     self.act_update = ActModelUpdate(mw.active_model)
     self.acts = []
     for d in newdicts:
         self.acts.append(
             command.ActFromCommand(comproj.AddDictionary(mw.proj, d)))
     for c in convs:
         self.acts.append(command.ActFromCommand(convert.ConvertTable(c)))
Ejemplo n.º 2
0
 def _exec(self):
     for d in self.newdicts:
         self.acts.append(
             command.ActFromCommand(comproj.AddDictionary(self.mw.proj, d)))
         self.acts[-1].redo()
     self.acts.append(command.ActFromCommand(self.com))
     self.acts[-1].redo()
     self.acts.append(
         ActAddModel(self.mw, self.mw.proj.data_tables[-1], True))
     self.acts[-1].redo()
     return True
Ejemplo n.º 3
0
 def _exec(self):
     for f in self.remf:
         self.acts.append(
             command.ActFromCommand(comproj.RemoveFilter(self.tmod.dt, f)))
         self.acts[-1].redo()
     for f in self.newf:
         self.acts.append(
             command.ActFromCommand(
                 comproj.AddFilter(self.tmod.dt.proj, f, [self.tmod.dt])))
         self.acts[-1].redo()
     uf = [f.id for f in self.usedf]
     self.acts.append(
         command.ActChangeAttr(self.tmod.dt, 'used_filters', uf))
     self.acts[-1].redo()
     self.act_update.redo()
     return True
Ejemplo n.º 4
0
 def _exec(self):
     self.act = command.ActFromCommand(
         comproj.SaveDBAs(self.mw.proj, self.fname))
     self.act.redo()
     self.mw.reset_title()
     self.mw.database_saved.emit()
     return True
Ejemplo n.º 5
0
 def __init__(self, mw, ret):
     super().__init__()
     self.act = command.ActFromCommand(
         comproj.ChangeDictionaries(mw.proj, ret))
     if mw.has_model():
         self.act_update = ActModelUpdate(mw.active_model)
     else:
         self.act_update = command.ActNone()
Ejemplo n.º 6
0
 def __init__(self, model, name, tp, data):
     super().__init__()
     self.act = command.ActFromCommand(
         funccol.CustomColumn(model.dt, name, tp, data))
     self.act_update = ActModelUpdate(model)
Ejemplo n.º 7
0
 def __init__(self, model, opts):
     super().__init__()
     self.act = command.ActFromCommand(
         funccol.NumRegressionColumns(model.dt, opts))
     self.act_update = ActModelUpdate(model)
Ejemplo n.º 8
0
 def __init__(self, model, name, xcol, ycol):
     super().__init__()
     self.act = command.ActFromCommand(
         funccol.NumIntegralColumn(model.dt, name, xcol, ycol))
     self.act_update = ActModelUpdate(model)
Ejemplo n.º 9
0
 def __init__(self, model, name, colnames, func, bg):
     super().__init__()
     self.act = command.ActFromCommand(
         funccol.NumFunctionColumn(model.dt, name, colnames, func, bg))
     self.act_update = ActModelUpdate(model)
Ejemplo n.º 10
0
 def __init__(self, tmod):
     super().__init__()
     self.act = command.ActFromCommand(
         comproj.UnapplyFilter(tmod.dt, 'all', True))
     self.act_update = ActModelUpdate(tmod)
Ejemplo n.º 11
0
 def __init__(self, tmod, flt):
     super().__init__()
     self.act = command.ActFromCommand(
         comproj.AddFilter(tmod.dt.proj, flt, [tmod.dt]))
     self.act_update = ActModelUpdate(tmod)
Ejemplo n.º 12
0
 def __init__(self, tmod, cnames, method):
     super().__init__()
     self.act = command.ActFromCommand(
         funccol.GroupCategories(tmod.dt, cnames, method))
     self.act_update = ActModelUpdate(tmod)
Ejemplo n.º 13
0
 def __init__(self, model, categories, delim, hide_source):
     super().__init__()
     self.act_merge = command.ActFromCommand(
         funccol.MergeCategories(model.dt, categories, delim, hide_source))
     self.act_update = ActModelUpdate(model)