Exemplo n.º 1
0
 def save_report(self):
     factor = QDialogStds.settings(self, get_stds=False)
     if factor is None:
         return
     fname = dialog_save_report("{} {}".format(Sample.display_file_group(factor), self.std.display_file()))
     if not fname:
         return
     if factor == FACTORS_ALL:
         Printer("doc", self.report.get_report).print(fname)
     else:
         Printer("doc", self.reports[factor].get_report).print(fname)
Exemplo n.º 2
0
 def save_report_group(self):
     factor, stds = QDialogStds.settings(self, get_stds=True, std_main=self.std.name)
     if factor is None:
         return
     fname = dialog_save_report("{} Группа эталонов".format(Sample.display_file_group(factor)))
     if not fname:
         return
     stds = [Standard.standards[std] for std in stds]
     if factor == FACTORS_ALL:
         report = MulSamplesMulStandards(self.samples, stds)
     else:
         report = MulFactorSamplesMulStandards(self.samples, factor, stds)
     Printer("doc", report.get_report).print(fname)
Exemplo n.º 3
0
 def save_report_group(self):
     factor, stds = QDialogStds.settings(self,
                                         get_stds=True,
                                         std_main=self.std.name)
     if factor is None:
         return
     if not len(stds):
         return
     if len(stds) == 1:
         self.dialog_std_sample(factor)
     else:
         fname = dialog_save_report("Группа эталонов {}".format(
             self.sample.display_file(factor)))
         stds = [Standard.standards[std] for std in stds]
         if not fname:
             return
         if factor == FACTORS_ALL:
             report = MulStandardsSample(stds, self.sample)
         else:
             report = MulStandardsFactorSample(stds, self.sample, factor)
         Printer('doc', report.get_report).print(fname)
Exemplo n.º 4
0
 def save_report(self):
     factor = QDialogStds.settings(self, get_stds=False)
     if factor is None:
         return
     self.dialog_sample_std(factor)