Ejemplo n.º 1
0
void CueControl::attachCue(CuePointer pCue, int hotCue) {
    HotcueControl* pControl = m_hotcueControls.value(hotCue, NULL);
    if (pControl == NULL) {
        return;
    }
    if (pControl->getCue() != NULL) {
        detachCue(pControl->getHotcueNumber());
    }
    connect(pCue.get(), SIGNAL(updated()),
            this, SLOT(cueUpdated()),
            Qt::DirectConnection);

    pControl->setCue(pCue);

}
Ejemplo n.º 2
0
void CueControl::attachCue(Cue* pCue, int hotCue) {
    if (hotCue < 0 || hotCue >= m_iNumHotCues) {
        return;
    }
    HotcueControl* pControl = m_hotcueControl[hotCue];
    if (pControl->getCue() != NULL) {
        detachCue(pControl->getHotcueNumber());
    }
    pControl->setCue(pCue);
    connect(pCue, SIGNAL(updated()),
            this, SLOT(cueUpdated()),
            Qt::DirectConnection);

    pControl->getPosition()->set(pCue->getPosition());
    pControl->getEnabled()->set(pCue->getPosition() == -1 ? 0.0 : 1.0);
}
Ejemplo n.º 3
0
void CueControl::attachCue(Cue* pCue, int hotCue) {
    HotcueControl* pControl = m_hotcueControl.value(hotCue, NULL);
    if (pControl == NULL) {
        return;
    }
    if (pControl->getCue() != NULL) {
        detachCue(pControl->getHotcueNumber());
    }
    connect(pCue, SIGNAL(updated()),
            this, SLOT(cueUpdated()),
            Qt::DirectConnection);

    pControl->getPosition()->set(pCue->getPosition());
    pControl->getEnabled()->set(pCue->getPosition() == -1 ? 0.0 : 1.0);
    // set pCue only if all other data is in place
    // because we have a null check for valid data else where  in the code
    pControl->setCue(pCue);

}