Sets the locked state for this panel to the inputed state.
        
        :param      state | <bool>

def setLocked(self, state, force=False):
        """
        Sets the locked state for this panel to the inputed state.
        
        :param      state | <bool>
        """
        if not force and state == self._locked:
            return
        
        self._locked = state
        tabbar = self.tabBar()
        tabbar.setLocked(state)
        if self.hideTabsWhenLocked():
            tabbar.setVisible(self.count() > 1 or not state)
        else:
            tabbar.setVisible(True)

        if tabbar.isVisible():
            self.setContentsMargins(6, tabbar.height(), 6, 6)
        else:
            self.setContentsMargins(1, 1, 1, 1)

        self.adjustSizeConstraint()