示例#1
0
void HexWidget::setIsEnabledClick(bool value)
{
    emit(requirePlayerIDnPhaseSignal());
    if(value)
    {
        setSelectState(1);
    } else {
        setSelectState(0);
    }
    isEnabledClick = value;
}
示例#2
0
void HexWidget::setIsEnableDrag(bool value)
{
    emit(requirePlayerIDnPhaseSignal());
    if(value)
    {
        setSelectState(1);
        this->setAcceptDrops(true);
    } else {
        setSelectState(0);
        this->setAcceptDrops(false);
    }
    isEnableDrag = value;
}
SelectableComponent::SelectableComponent (SelectableContainer* parentComponent, 
	const ValueTree& tree, 
	AudioSourcePlayer* sourcePlayer) 
    : parent(parentComponent), 
    valueTree(tree),
	audioSourcePlayer(sourcePlayer)
{
    jassert(parent != nullptr)     // 本类必须置于父级组件(容器)中!

    setSelectState(bool(valueTree[AppIdentifier::trackSelected]));
}