コード例 #1
0
 def dialog_sample_std(self, factor):
     fname = dialog_save_report("{} {}".format(self.sample.display_file(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)
コード例 #2
0
 def dialog_std_sample(self, factor):
     fname = dialog_save_report("Эталон {} {}".format(
         self.std.name, self.sample.display_file(factor)))
     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)
コード例 #3
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)
コード例 #4
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)
コード例 #5
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)