def __init__(self, parent):
     PropertiesDialog.__init__(
         self, parent, SignalIntegrity.App.Project['CalculationProperties'],
         parent, 'Calculation Properties')
     self.endFrequencyFrame = CalculationPropertySI(
         self.propertyListFrame, 'End Frequency',
         self.onendFrequencyEntered, None, self.project, 'EndFrequency',
         'Hz')
     self.frequencyPointsFrame = CalculationProperty(
         self.propertyListFrame, 'Frequency Points',
         self.onfrequencyPointsEntered, None, self.project,
         'FrequencyPoints')
     self.frequencyResolutionFrame = CalculationPropertySI(
         self.propertyListFrame, 'Frequency Resolution',
         self.onfrequencyResolutionEntered, None, self.project,
         'FrequencyResolution', 'Hz')
     self.userSampleRateFrame = CalculationPropertySI(
         self.propertyListFrame, 'User Sample Rate',
         self.onuserSampleRateEntered, None, self.project, 'UserSampleRate',
         'S/s')
     self.userSamplePeriodFrame = CalculationPropertySI(
         self.propertyListFrame, 'User Sample Period',
         self.onuserSamplePeriodEntered, None, self.project,
         'UserSamplePeriod', 's')
     self.baseSampleRateFrame = CalculationPropertySI(
         self.propertyListFrame, 'Base Sample Rate',
         self.onbaseSampleRateEntered, None, self.project, 'BaseSampleRate',
         'S/s')
     self.baseSamplePeriodFrame = CalculationPropertySI(
         self.propertyListFrame, 'Base Sample Period',
         self.onbaseSamplePeriodEntered, None, self.project,
         'BaseSamplePeriod', 's')
     self.timePointsFrame = CalculationProperty(self.propertyListFrame,
                                                'Time Points',
                                                self.ontimePointsEntered,
                                                None, self.project,
                                                'TimePoints')
     self.impulseResponseLengthFrame = CalculationPropertySI(
         self.propertyListFrame, 'Impulse Response Length',
         self.onimpulseLengthEntered, None, self.project,
         'ImpulseResponseLength', 's')
     PropertiesDialog.bind(self, '<Return>', self.ok)
     PropertiesDialog.bind(self, '<Escape>', self.cancel)
     PropertiesDialog.protocol(self, "WM_DELETE_WINDOW", self.onClosing)
     self.Save()
     self.Finish()
Beispiel #2
0
 def __init__(self, parent, project):
     PropertiesDialog.__init__(self, parent, project, parent,
                               'S-parameter Properties')
     self.inheritButton = tk.Button(
         self.propertyListFrame,
         text='Inherit Properties from Calculation Properties',
         command=self.onInherit)
     self.inheritButton.pack(side=tk.TOP, fill=tk.X, expand=tk.NO)
     self.endFrequencyFrame = CalculationPropertySI(
         self.propertyListFrame, 'End Frequency',
         self.onendFrequencyEntered, None, self.project, 'EndFrequency',
         'Hz')
     self.frequencyPointsFrame = CalculationProperty(
         self.propertyListFrame, 'Frequency Points',
         self.onfrequencyPointsEntered, None, self.project,
         'FrequencyPoints')
     self.frequencyResolutionFrame = CalculationPropertySI(
         self.propertyListFrame, 'Frequency Resolution',
         self.onfrequencyResolutionEntered, None, self.project,
         'FrequencyResolution', 'Hz')
     self.baseSampleRateFrame = CalculationPropertySI(
         self.propertyListFrame, 'Base Sample Rate',
         self.onbaseSampleRateEntered, None, self.project, 'BaseSampleRate',
         'S/s')
     self.baseSamplePeriodFrame = CalculationPropertySI(
         self.propertyListFrame, 'Base Sample Period',
         self.onbaseSamplePeriodEntered, None, self.project,
         'BaseSamplePeriod', 's')
     self.timePointsFrame = CalculationProperty(self.propertyListFrame,
                                                'Time Points',
                                                self.ontimePointsEntered,
                                                None, self.project,
                                                'TimePoints')
     self.impulseResponseLengthFrame = CalculationPropertySI(
         self.propertyListFrame, 'Impulse Response Length',
         self.onimpulseLengthEntered, None, self.project,
         'ImpulseResponseLength', 's')
     self.referenceImpedanceEntryFrame = tk.Frame(self,
                                                  relief=tk.RIDGE,
                                                  borderwidth=5)
     self.referenceImpedanceEntryFrame.pack(side=tk.TOP,
                                            fill=tk.X,
                                            expand=tk.NO)
     self.referenceImpedanceFrame = CalculationPropertySI(
         self.referenceImpedanceEntryFrame, 'Reference Impedance',
         self.onReferenceImpedanceEntered, None, self.project,
         'ReferenceImpedance', 'ohm')
     self.timeLimitsFrame = tk.Frame(self, relief=tk.RIDGE, borderwidth=5)
     self.timeLimitsFrame.pack(side=tk.TOP, fill=tk.X, expand=tk.NO)
     self.negativeTimeFrame = CalculationPropertySI(
         self.timeLimitsFrame, 'Negative Time Limit',
         self.onNegativeTimeLimitEntered, None, self.project,
         'TimeLimitNegative', 's')
     self.positiveTimeFrame = CalculationPropertySI(
         self.timeLimitsFrame, 'Positive Time Limit',
         self.onPositiveTimeLimitEntered, None, self.project,
         'TimeLimitPositive', 's')
     PropertiesDialog.bind(self, '<Return>', self.ok)
     PropertiesDialog.bind(self, '<Escape>', self.cancel)
     PropertiesDialog.protocol(self, "WM_DELETE_WINDOW", self.onClosing)
     self.Save()
     self.Finish()