Sets the QStimulusModel for this editor

def setModel(self, model):
        """Sets the QStimulusModel for this editor"""
        self.stimModel = model
        self.parameterModel = model.autoParams()
        tone = self.stimModel.data(self.stimModel.index(0,0), QtCore.Qt.UserRole+1)
        info = tone.auto_details()

        # set max/mins
        fmax = info['frequency']['max']
        self.ui.freqStartSpnbx.setMaximum(fmax)
        self.ui.freqStopSpnbx.setMaximum(fmax)
        self.ui.freqStepSpnbx.setMaximum(500000)
        dbmax = info['intensity']['max']
        self.ui.dbStartSpnbx.setMaximum(dbmax)
        self.ui.dbStopSpnbx.setMaximum(dbmax)
        self.ui.dbStepSpnbx.setMaximum(500000)
        self.ui.durSpnbx.setMaximum(info['duration']['max'])
        self.ui.risefallSpnbx.setMaximum(info['risefall']['max'])

        self.fmapper.setModel(self.parameterModel)
        self.dbmapper.setModel(self.parameterModel)
        self.fmapper.addMapping(self.ui.freqStartSpnbx, 1)
        self.fmapper.addMapping(self.ui.freqStopSpnbx, 2)
        self.fmapper.addMapping(self.ui.freqStepSpnbx, 3)
        self.fmapper.addMapping(self.ui.freqNstepsLbl, 4, 'text')
        self.dbmapper.addMapping(self.ui.dbStartSpnbx, 1)
        self.dbmapper.addMapping(self.ui.dbStopSpnbx, 2)
        self.dbmapper.addMapping(self.ui.dbStepSpnbx, 3)
        self.dbmapper.addMapping(self.ui.dbNstepsLbl, 4, 'text')
        self.fmapper.toFirst()
        self.dbmapper.setCurrentIndex(1)

        self.ui.durSpnbx.setValue(tone.duration())
        self.ui.nrepsSpnbx.setValue(self.stimModel.repCount())
        self.ui.risefallSpnbx.setValue(tone.risefall())
        self.tone = tone