bool ControlParameter::operator==(const ControlParameter &control)
{
    return m_type == control.getType() &&
        m_controllerValue == control.getControllerValue() &&
        m_min == control.getMin() &&
        m_max == control.getMax();
}
// @return the active ruler's parameter situation, or NULL if none.
// Return is owned by caller.
// @author Tom Breton (Tehom)
SelectionSituation *
ControlRulerWidget::getSituation(void)
{
    ControllerEventsRuler *ruler = getActiveRuler();
    if (!ruler) { return 0; }
    EventSelection * selection = ruler->getEventSelection();
    if (!selection) { return 0; }
    ControlParameter * cp = ruler->getControlParameter();
    if (!cp) { return 0; }
    return
        new SelectionSituation(cp->getType(), selection);
}
ControlParameter::ControlParameter(const ControlParameter &control):
        XmlExportable(),
        m_name(control.getName()),
        m_type(control.getType()),
        m_description(control.getDescription()),
        m_min(control.getMin()),
        m_max(control.getMax()),
        m_default(control.getDefault()),
        m_controllerValue(control.getControllerValue()),
        m_colourIndex(control.getColourIndex()),
        m_ipbPosition(control.getIPBPosition())
{
}
Exemple #4
0
// Check to see if passed ControlParameter is unique.  Either the
// type must be unique or in the case of Controller::EventType the
// ControllerValue must be unique.
//
// Controllers (Control type)
//
//
bool 
MidiDevice::isUniqueControlParameter(const ControlParameter &con) const
{
    return
        findControlParameter(con.getType(), con.getControllerValue()) == 0;
}