class_docstr: QSpectrumAnalyzer main window
class_docstr_tok: ["QSpectrumAnalyzer","main","window"]
code: def on_persistenceButton_clicked(self):
      prev_persistence_length = (
          self.spectrumPlotWidget.persistence_length
      )
      dialog = QSpectrumAnalyzerPersistence(self)
      if dialog.exec_():
          settings = QtCore.QSettings()
          persistence_length = settings.value(
              "persistence_length", 5, int
          )
          self.spectrumPlotWidget.persistence_length = (
              persistence_length
          )
          self.spectrumPlotWidget.persistence_decay = settings.value(
              "persistence_decay", "exponential"
          )
  
          # If only decay function has been changed, just reset colors
          if persistence_length == prev_persistence_length:
              self.spectrumPlotWidget.set_colors()
          else:
              self.spectrumPlotWidget.recalculate_persistence(
                  self.data_storage
              )
  
imports: import sys, os, signal, time, argparse
  from Qt import QtCore, QtGui, QtWidgets
  from qspectrumanalyzer import backends
  from qspectrumanalyzer.version import __version__
  from qspectrumanalyzer.data import DataStorage
  from qspectrumanalyzer.plot import SpectrumPlotWidget, WaterfallPlotWidget
  from qspectrumanalyzer.utils import str_to_color, human_time
  from qspectrumanalyzer.settings import QSpectrumAnalyzerSettings
  from qspectrumanalyzer.smoothing import QSpectrumAnalyzerSmoothing
  from qspectrumanalyzer.persistence import QSpectrumAnalyzerPersistence
  from qspectrumanalyzer.colors import QSpectrumAnalyzerColors
  from qspectrumanalyzer.baseline import QSpectrumAnalyzerBaseline
  from qspectrumanalyzer.ui_qspectrumanalyzer import Ui_QSpectrumAnalyzerMainWindow
label_desc: Use image node_id 29 for calling the QSpectrumAnalyzerMainWindow obj's underlying member method code with example usage: obj.on_persistenceButton_clicked() without return types