def __init__(self, parent, preferences): PropertiesDialog.__init__(self, parent, preferences, parent, 'Preferences') self.plotWidthFrame = CalculationProperty(self.propertyListFrame, 'plot width', None, self.onUpdatePreferences, preferences, 'Appearance.PlotWidth') self.plotHeightFrame = CalculationProperty(self.propertyListFrame, 'plot height', None, self.onUpdatePreferences, preferences, 'Appearance.PlotHeight') self.plotDPIFrame = CalculationProperty(self.propertyListFrame, 'plot DPI', None, self.onUpdatePreferences, preferences, 'Appearance.PlotDPI') self.matPlotLibColorFrame = CalculationPropertyColor( self.propertyListFrame, 'plot color', None, self.onUpdateColors, preferences, 'Appearance.Color.Plot') self.plotCursors = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'show cursor values on plots', None, self.onUpdatePreferences, preferences, 'Appearance.PlotCursorValues') self.Finish()
def __init__(self, parent, preferences): PropertiesDialog.__init__(self, parent, preferences, parent, 'Preferences') self.fontSizeFrame = CalculationProperty(self.propertyListFrame, 'font size', None, self.onUpdatePreferences, preferences, 'Appearance.FontSize') self.backgroundColorFrame = CalculationPropertyColor( self.propertyListFrame, 'background color', None, self.onUpdateColors, preferences, 'Appearance.Color.Background') self.foregroundColorFrame = CalculationPropertyColor( self.propertyListFrame, 'foreground color', None, self.onUpdateColors, preferences, 'Appearance.Color.Foreground') #self.activeBackgroundColorFrame=CalculationPropertyColor(self.propertyListFrame,'active background color',None,self.onUpdateColors,preferences,'Appearance.Color.ActiveBackground') #self.activeForegroundColorFrame=CalculationPropertyColor(self.propertyListFrame,'active foreground color',None,self.onUpdateColors,preferences,'Appearance.Color.ActiveForeground') self.matPlotLibColorFrame = CalculationPropertyColor( self.propertyListFrame, 'plot color', None, self.onUpdateColors, preferences, 'Appearance.Color.Plot') self.plotCursors = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'show cursor values on plots', None, self.onUpdatePreferences, preferences, 'Appearance.PlotCursorValues') self.showAllPinNumbers = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'show all pin numbers', None, self.onUpdatePreferences, preferences, 'Appearance.AllPinNumbersVisible') self.useSinX = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'use SinX/X for resampling (otherwise linear)', None, self.onUpdatePreferences, preferences, 'Calculation.UseSinX') self.trySVD = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'try SVD in calculations (experimental)', None, self.onUpdatePreferences, preferences, 'Calculation.TrySVD') self.retainRecentFilesFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'retain recent project files', None, self.onUpdatePreferences, preferences, 'ProjectFiles.RetainLastFilesOpened') self.openLastFileFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'open last file on start', None, self.onUpdatePreferences, preferences, 'ProjectFiles.OpenLastFile') self.askSaveCurrentFileFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'ask to save current file', None, self.onUpdatePreferences, preferences, 'ProjectFiles.AskToSaveCurrentFile') self.cacheResult = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'cache results', None, self.onUpdatePreferences, preferences, 'Cache.CacheResults') self.useOnlineHelp = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'use online help', None, self.onUpdatePreferences, preferences, 'OnlineHelp.UseOnlineHelp') self.onlineHelpURL = CalculationProperty(self.propertyListFrame, 'online help url', None, self.onUpdatePreferences, preferences, 'OnlineHelp.URL') self.Finish()
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') self.Finish()
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()
def cancel(self, event): self.Restore() PropertiesDialog.destroy(self)
def ok(self, event): self.parent.statusbar.set('Calculation Properties Modified') self.parent.history.Event('modify calculation properties') PropertiesDialog.destroy(self)
def __init__(self,project,parent): PropertiesDialog.__init__(self,parent,project,parent.parent,'Eye Diagram Properties') self.transient(parent) self.pixelsX=int(self.project['UI']*self.project['Columns']*self.project['ScaleX']/100.) self.pixelsY=int(self.project['Rows']*self.project['ScaleY']/100.) self.LeftFrame=tk.Frame(self.propertyListFrame) self.LeftFrame.pack(side=tk.LEFT,fill=tk.X,expand=tk.NO,anchor=tk.NW) self.RightFrame=tk.Frame(self.propertyListFrame) self.RightFrame.pack(side=tk.LEFT,fill=tk.X,expand=tk.NO,anchor=tk.NW) self.GeneralFrame=tk.Frame(self.LeftFrame, relief=tk.RIDGE, borderwidth=5) self.GeneralFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.EnhancedPrecisionFrame=tk.Frame(self.LeftFrame, relief=tk.RIDGE, borderwidth=5) self.EnhancedPrecisionFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.YAxisFrame=tk.Frame(self.LeftFrame, relief=tk.RIDGE, borderwidth=5) self.YAxisFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.JitterNoiseFrame=tk.Frame(self.LeftFrame, relief=tk.RIDGE, borderwidth=5) self.JitterNoiseFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.LogIntensityFrame=tk.Frame(self.LeftFrame, relief=tk.RIDGE, borderwidth=5) self.LogIntensityFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.AutoAlignFrame=tk.Frame(self.RightFrame, relief=tk.RIDGE, borderwidth=5) self.AutoAlignFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.MeasurementsFrame=tk.Frame(self.RightFrame, relief=tk.RIDGE, borderwidth=5) self.MeasurementsFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.BitsPerSymbol=CalculationProperty(self.GeneralFrame,'Bits per Symbol',self.onUpdateFromChanges,None,self.project,'Alignment.BitsPerSymbol',tooltip='The number of bits transmitted per symbol\n1=NRZ, or PAM-2, 2=PAM-4, 3=PAM-8') self.Color=CalculationPropertyColor(self.GeneralFrame,'Color',self.onUpdateFromChanges,None,self.project,'Color',tooltip='The color of the eye in the eye diagram if Invert is True,\notherwise is the background color') self.UIFrame=CalculationProperty(self.GeneralFrame,'Number of UI',self.onUpdateUI,None,self.project,'UI',tooltip='The number of unit intervals that will be shown in the eye diagram plot generated') self.RowsFrame=CalculationProperty(self.GeneralFrame,'Number of Rows',self.onUpdateRows,None,self.project,'Rows',tooltip='The number of pixels vertically in the raw eye diagram.\nThis is scaled by the factor in \'Scale X\'') self.ColsFrame=CalculationProperty(self.GeneralFrame,'Number of Columns',self.onUpdateCols,None,self.project,'Columns',tooltip='The number of pixels horixontally in one UI in the raw eye diagram.\nThis is scaled by the factor in \'Scale Y\'') self.SaturationFrame=CalculationPropertySI(self.GeneralFrame,'Saturation',self.onUpdateFromChanges,None,self.project,'Saturation','%') self.ScaleXFrame=CalculationPropertySI(self.GeneralFrame,'Scale X',self.onUpdateScaleX,None,self.project,'ScaleX','%') self.ScaleYFrame=CalculationPropertySI(self.GeneralFrame,'Scale Y',self.onUpdateScaleY,None,self.project,'ScaleY','%') self.AutoAlign=CalculationPropertyTrueFalseButton(self.AutoAlignFrame,'Auto Align Eye',self.onUpdateFromChanges,None,self.project,'Alignment.AutoAlign') self.BERExponent=CalculationProperty(self.AutoAlignFrame,'BER Exponent for Alignment',self.onUpdateFromChanges,None,self.project,'Alignment.BERForAlignment') self.AlignmentMode=CalculationPropertyChoices(self.AutoAlignFrame,'Alignment Mode',self.onUpdateFromChanges,None,self.AlignmentModeChoices,self.project,'Alignment.Mode') self.VerticalAlignmentMode=CalculationPropertyChoices(self.AutoAlignFrame,'Vertical Alignment',self.onUpdateFromChanges,None,self.VerticalAlignmentModeChoices,self.project,'Alignment.Vertical') self.HorizontalAlignmentMode=CalculationPropertyChoices(self.AutoAlignFrame,'Horizontal Alignment',self.onUpdateFromChanges,None,self.HorizontalAlignmentModeChoices,self.project,'Alignment.Horizontal') self.Measurements=CalculationPropertyTrueFalseButton(self.MeasurementsFrame,'Measure Eye Parameters',self.onUpdateFromChanges,None,self.project,'Measure.Measure') self.BERForMeasure=CalculationProperty(self.MeasurementsFrame,'BER Exponent for Measure',self.onUpdateFromChanges,None,self.project,'Measure.BERForMeasure') if SignalIntegrity.App.Preferences['Features.OpticalMeasurements']: self.NoisePenalty=CalculationPropertySI(self.MeasurementsFrame,'Noise Penalty',self.onUpdateFromChanges,None,self.project,'Measure.NoisePenalty','dB') self.DecisionMode=CalculationPropertyChoices(self.MeasurementsFrame,'Decision Level',self.onUpdateFromChanges,None,self.DecisionChoices,self.project,'Decision.Mode') self.BathtubFrame=tk.Frame(self.MeasurementsFrame,relief=tk.RIDGE, borderwidth=5) self.BathtubFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.BathtubCurves=CalculationPropertyTrueFalseButton(self.BathtubFrame,'Measure Bathtub Curves',self.onUpdateFromChanges,None,self.project,'Bathtub.Measure') self.DecadesFromJoin=CalculationProperty(self.BathtubFrame,'Decades Above for Fit',self.onUpdateFromChanges,None,self.project,'Bathtub.DecadesFromJoinForFit') self.MinPointsForFit=CalculationProperty(self.BathtubFrame,'Minimum Points for Fit',self.onUpdateFromChanges,None,self.project,'Bathtub.MinPointsForFit') self.AnnotateFrame=tk.Frame(self.MeasurementsFrame,relief=tk.RIDGE, borderwidth=5) self.AnnotateFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.Annotate=CalculationPropertyTrueFalseButton(self.AnnotateFrame,'Annotate Eye with Measurements',self.onUpdateFromChanges,None,self.project,'Annotation.Annotate') self.AnnotationColor=CalculationPropertyColor(self.AnnotateFrame,'Annotation Color',self.onUpdateFromChanges,None,self.project,'Annotation.Color') self.AnnotateMeanLevels=CalculationPropertyTrueFalseButton(self.AnnotateFrame,'Annotate Mean Levels',self.onUpdateFromChanges,None,self.project,'Annotation.MeanLevels') self.AnnotateLevelExtents=CalculationPropertyTrueFalseButton(self.AnnotateFrame,'Annotate Level Extents',self.onUpdateFromChanges,None,self.project,'Annotation.LevelExtents') self.AnnotateEyeWidth=CalculationPropertyTrueFalseButton(self.AnnotateFrame,'Annotate Eye Width',self.onUpdateFromChanges,None,self.project,'Annotation.EyeWidth') self.AnnotateEyeHeight=CalculationPropertyTrueFalseButton(self.AnnotateFrame,'Annotate Eye Height',self.onUpdateFromChanges,None,self.project,'Annotation.EyeHeight') self.ContoursFrame=tk.Frame(self.AnnotateFrame, relief=tk.RIDGE, borderwidth=5) self.ContoursFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.AnnotateContour=CalculationPropertyTrueFalseButton(self.ContoursFrame,'Annotate Contour',self.onUpdateFromChanges,None,self.project,'Annotation.Contours.Show') self.ContourMode=CalculationPropertyChoices(self.ContoursFrame,'Which Contours to Show',self.onUpdateFromChanges,None,self.ContourChoices,self.project,'Annotation.Contours.Which') self.EnhancedPrecisionMode=CalculationPropertyChoices(self.EnhancedPrecisionFrame,'Enhanced Precision Mode',self.onUpdateFromChanges,None,self.EnhancedPrecisionChoices,self.project,'EnhancedPrecision.Mode') self.EnhancedPrecisionSteps=CalculationProperty(self.EnhancedPrecisionFrame,'Enhanced Precision Steps',self.onUpdateFromChanges,None,self.project,'EnhancedPrecision.FixedEnhancement') self.YAxisModeFrame=CalculationPropertyChoices(self.YAxisFrame,'Y Axis',self.onUpdateFromChanges,None,self.YAxisModeChoices,self.project,'YAxis.Mode') self.MaxYFrame=CalculationPropertySI(self.YAxisFrame,'Maximum Y',self.onUpdateFromChanges,None,self.project,'YAxis.Max','V') self.MinYFrame=CalculationPropertySI(self.YAxisFrame,'Minimum Y',self.onUpdateFromChanges,None,self.project,'YAxis.Min','V') self.Mode=CalculationPropertyChoices(self.JitterNoiseFrame,'Eye Mode',self.onUpdateFromChanges,None,self.ModeChoices,self.project,'Mode') self.JitterSeconds=CalculationPropertySI(self.JitterNoiseFrame,'Random Jitter (s)',self.onUpdateFromChanges,None,self.project,'JitterNoise.JitterS','s') self.JitterDeterministicPkS=CalculationPropertySI(self.JitterNoiseFrame,'Deterministic Jitter (s, pk)',self.onUpdateFromChanges,None,self.project,'JitterNoise.JitterDeterministicPkS','s') self.Noise=CalculationPropertySI(self.JitterNoiseFrame,'Noise',self.onUpdateFromChanges,None,self.project,'JitterNoise.Noise','V') self.MaxWindowWidthHeightPixels=CalculationPropertySI(self.JitterNoiseFrame,'Max Kernel Pixels',self.onUpdateFromChanges,None,self.project,'JitterNoise.MaxKernelPixels','pixels') self.Invert=CalculationPropertyTrueFalseButton(self.LeftFrame,'Invert Plot',self.onUpdateFromChanges,None,self.project,'Invert') self.LogIntensity=CalculationPropertyTrueFalseButton(self.LogIntensityFrame,'Log Intensity',self.onUpdateFromChanges,None,self.project,'JitterNoise.LogIntensity.LogIntensity') self.MinExponent=CalculationProperty(self.LogIntensityFrame,'Min Exponent',self.onUpdateFromChanges,None,self.project,'JitterNoise.LogIntensity.MinExponent') self.MaxExponent=CalculationProperty(self.LogIntensityFrame,'Max Exponent',self.onUpdateFromChanges,None,self.project,'JitterNoise.LogIntensity.MaxExponent') self.SaveToPreferencesFrame=tk.Frame(self.RightFrame,relief=tk.RIDGE, borderwidth=5) self.SaveToPreferencesFrame.pack(side=tk.TOP,fill=tk.X,expand=tk.NO) self.SaveToPreferencesButton = tk.Button(self.SaveToPreferencesFrame,text='Save Properties to Global Preferences',command=self.onSaveToPreferences,width=CalculationProperty.labelWidth) self.SaveToPreferencesButton.pack(side=tk.TOP,expand=tk.YES) self.Finish()
def Finish(self): self.UpdateStrings() PropertiesDialog.Finish(self)
def Finish(self): PropertiesDialog.Finish(self)
def __init__(self, parent, preferences): PropertiesDialog.__init__(self, parent, preferences, parent, 'Preferences') self.fontSizeFrame = CalculationProperty(self.propertyListFrame, 'font size', None, self.onUpdatePreferences, preferences, 'Appearance.FontSize') self.initialGridFrame = CalculationProperty(self.propertyListFrame, 'initial grid', None, self.onUpdatePreferences, preferences, 'Appearance.InitialGrid') self.backgroundColorFrame = CalculationPropertyColor( self.propertyListFrame, 'background color', None, self.onUpdateColors, preferences, 'Appearance.Color.Background') self.foregroundColorFrame = CalculationPropertyColor( self.propertyListFrame, 'foreground color', None, self.onUpdateColors, preferences, 'Appearance.Color.Foreground') #self.activeBackgroundColorFrame=CalculationPropertyColor(self.propertyListFrame,'active background color',None,self.onUpdateColors,preferences,'Appearance.Color.ActiveBackground') #self.activeForegroundColorFrame=CalculationPropertyColor(self.propertyListFrame,'active foreground color',None,self.onUpdateColors,preferences,'Appearance.Color.ActiveForeground') self.showAllPinNumbers = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'show all pin numbers', None, self.onUpdatePreferences, preferences, 'Appearance.AllPinNumbersVisible') self.useSinX = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'use SinX/X for resampling (otherwise linear)', None, self.onUpdatePreferences, preferences, 'Calculation.UseSinX') self.trySVD = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'try SVD in calculations (experimental)', None, self.onUpdatePreferences, preferences, 'Calculation.TrySVD') self.enforce12458 = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'enforce 12458 sequence in calculation properties', None, self.onUpdatePreferences, preferences, 'Calculation.Enforce12458') self.maximumWaveformSize = CalculationPropertySI( self.propertyListFrame, 'maximum waveform size', None, self.onUpdatePreferences, preferences, 'Calculation.MaximumWaveformSize', 'pts') self.retainRecentFilesFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'retain recent project files', None, self.onUpdatePreferences, preferences, 'ProjectFiles.RetainLastFilesOpened') self.openLastFileFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'open last file on start', None, self.onUpdatePreferences, preferences, 'ProjectFiles.OpenLastFile') self.askSaveCurrentFileFrame = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'ask to save current file', None, self.onUpdatePreferences, preferences, 'ProjectFiles.AskToSaveCurrentFile') self.preferLeCroyWaveform = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'prefer saving waveforms in LeCroy format', None, self.onUpdatePreferences, preferences, 'ProjectFiles.PreferSaveWaveformsLeCroyFormat') self.cacheResult = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'cache results', None, self.onUpdatePreferences, preferences, 'Cache.CacheResults') self.useOnlineHelp = CalculationPropertyTrueFalseButton( self.propertyListFrame, 'use online help', None, self.onUpdatePreferences, preferences, 'OnlineHelp.UseOnlineHelp') self.onlineHelpURL = CalculationProperty(self.propertyListFrame, 'online help url', None, self.onUpdatePreferences, preferences, 'OnlineHelp.URL') self.Finish()
def Finish(self): self.onlineHelpURL.Show( self.project.GetValue('OnlineHelp.UseOnlineHelp')) PropertiesDialog.Finish(self)
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()
def destroy(self): PropertiesDialog.destroy(self)