def setCurrentProfile(self, prof):
        """
        Sets the current profile for this toolbar to the inputed profile.
        
        :param      prof | <projexui.widgets.xviewwidget.XViewProfile> || <str>
        """
        if prof is None:
            self.clearActive()
            return
        
        # loop through the profiles looking for a match
        profile = None
        blocked = self.signalsBlocked()
        self.blockSignals(True)
        for act in self._profileGroup.actions():
            if prof in (act.profile(), act.profile().name()):
                act.setChecked(True)
                profile = act.profile()
            else:
                act.setChecked(False)
        self.blockSignals(blocked)
        
        # update the current profile
        if profile == self._currentProfile and not self._viewWidget.isEmpty():
            return
        
        self._currentProfile = profile
        if self._viewWidget and profile and not blocked:
            self._viewWidget.restoreProfile(profile)
        
        if not blocked:
            self.loadProfileFinished.emit(profile)
            self.currentProfileChanged.emit(profile)