Sets the QStimulusModel *model* for the StimulusView

def setModel(self, model):
        """Sets the QStimulusModel *model* for the StimulusView"""
        # disconnect old signals
        try:
            self.ui.parametizer.randomizeCkbx.toggled.disconnect()
            self.ui.parametizer.randomizeCkbx.disconnect()
        except TypeError:
            # disconnecting without any current connections throws error
            pass

        self.ui.trackview.setModel(model)
        self.ui.nrepsSpnbx.setValue(model.repCount())

        self.ui.parametizer.randomizeCkbx.toggled.connect(model.randomToggle)
        self.ui.parametizer.randomizeCkbx.setChecked(bool(model.reorder()))

        # extract the QAutoParameterModel from the QStimulusModel and 
        # set in the AutoParameterView
        autoParamModel = model.autoParams()
        self.ui.parametizer.setModel(autoParamModel)
        # whether the auto parameters are emtpy 
        # affects the enable-ness of the StimlusView
        autoParamModel.emptied.connect(self.ui.trackview.emptySelection)
        autoParamModel.countChanged.connect(self.updateTraceCount)
        self.updateTraceCount()