Esempio n. 1
0
void RecordControl::handleEvent(int eventType, MidiMessage& event, int)
{
    const uint8* dataptr = event.getRawData();

    int eventId = *(dataptr+2);
    int eventChannel = *(dataptr+3);

    //std::cout << "Received event with id=" << eventId << " and ch=" << eventChannel << std::endl;

    if (eventType == TTL && eventChannel == triggerChannel)
    {

        //std::cout << "Trigger!" << std::endl;

        const MessageManagerLock mmLock;

        if (eventId == 1)
        {
            getControlPanel()->setRecordState(true);
        }
        else
        {
            getControlPanel()->setRecordState(false);
        }


    }

}
Esempio n. 2
0
void LLIMToastNotifyPanel::compactButtons()
{
    //we can't set follows in xml since it broke toasts behavior
    setFollows(FOLLOWS_LEFT|FOLLOWS_RIGHT|FOLLOWS_TOP);

    const child_list_t* children = getControlPanel()->getChildList();
    S32 offset = 0;
    // Children were added by addChild() which uses push_front to insert them into list,
    // so to get buttons in correct order reverse iterator is used (EXT-5906)
    for (child_list_t::const_reverse_iterator it = children->rbegin(); it != children->rend(); it++)
    {
        LLButton * button = dynamic_cast<LLButton*> (*it);
        if (button != NULL)
        {
            button->setOrigin( offset,button->getRect().mBottom);
            button->setLeftHPad(2 * HPAD);
            button->setRightHPad(2 * HPAD);
            // set zero width before perform autoResize()
            button->setRect(LLRect(button->getRect().mLeft,
                                   button->getRect().mTop,
                                   button->getRect().mLeft,
                                   button->getRect().mBottom));
            button->setAutoResize(true);
            button->autoResize();
            offset += HPAD + button->getRect().getWidth();
            button->setFollowsNone();
        }
    }

    if (mParentText)
    {
        mParentText->needsReflow();
    }
}
Esempio n. 3
0
String RecordNode::generateDirectoryName()
{
    Time calendar = Time::getCurrentTime();

    Array<int> t;
    t.add(calendar.getYear());
    t.add(calendar.getMonth()+1); // January = 0
    t.add(calendar.getDayOfMonth());
    t.add(calendar.getHours());
    t.add(calendar.getMinutes());
    t.add(calendar.getSeconds());

    String filename = getControlPanel()->getTextToPrepend();

    String datestring = "";

    for (int n = 0; n < t.size(); n++)
    {
        if (t[n] < 10)
            datestring += "0";

        datestring += t[n];

        if (n == 2)
            datestring += "_";
        else if (n < 5)
            datestring += "-";
    }

    getControlPanel()->setDateText(datestring);

    filename += datestring;
    filename += getControlPanel()->getTextToAppend();

    return filename;

}
void setPrependTextToRecordingDir(String text)
{
    getControlPanel()->setPrependText(text);
}
void createNewRecordingDir()
{
   getControlPanel()->labelTextChanged(NULL);
}
void setRecordingDirectory(String dir)
{
    getControlPanel()->setRecordingDirectory(dir);
}
void setAcquisitionStatus(bool enable)
{
    getControlPanel()->setAcquisitionState(enable);
}
bool getAcquisitionStatus()
{
	return getControlPanel()->getAcquisitionState();
}
void setRecordingStatus(bool enable)
{
    getControlPanel()->setRecordState(enable);
}
bool getRecordingStatus()
{
    return getControlPanel()->recordButton->getToggleState();
}
bool setSelectedRecordEngineId(String id)
{
	return getControlPanel()->setSelectedRecordEngineId(id);
}
String getSelectedRecordEngineId()
{
	return getControlPanel()->getSelectedRecordEngineId();
}