Пример #1
0
//--------------------------------------------------------------
Animation::Animation(string name_) : midiInterface()
{
	M_zeroAll();
	m_name			= name_;
	setMidiName(m_name);
	populateConfigurations();
}
Пример #2
0
//--------------------------------------------------------------
void Animation::saveConfiguration(string filename)
{
	createDirConfiguration();
    if (mp_UIcanvas)
    {
        mp_UIcanvas->saveSettings( ofToDataPath("Config/animations/"+m_name+"/"+filename) );
		populateConfigurations();
    }
}
Пример #3
0
void ConfigurationPanel::add()
{
    ConfigurationDialog dialog;
    dialog.setWindowTitle(tr("Add Configuration"));
    dialog.setSettings(m_settings);
    if (dialog.exec() == QDialog::Accepted) {
        const QString key = dialog.key();
        m_settings->setStyle(key, dialog.value());
        populateConfigurations(key);
    }
}
Пример #4
0
//--------------------------------------------------------------
Animation::Animation(string name_,string pathAbsScript_) : midiInterface()
{
	M_zeroAll();
	m_name			= name_;
	m_pathAbsScript = pathAbsScript_;

	mp_obj = JS_NewObject(ofxJSGetContext(), NULL, NULL, ofxJSGetGlobalObj());
    JSBool ok = JS_SetPrivate(ofxJSGetContext(), mp_obj, (void*)this);
	JS_AddNamedRoot(ofxJSGetContext(), &mp_obj, m_name.c_str());
    
    
    ofxJSDefineFunctionObject(mp_obj, "newSlider", Animation::jsNewSlider, 4);
    ofxJSDefineFunctionObject(mp_obj, "newToggle", Animation::jsNewToggle, 4);


    sm_mapJSObj_Anim[mp_obj] = this;

    // printf("#### setting private %s for obj %p, this=%p\n", ok == JS_TRUE ? "OK" : "NO", mp_obj, this);
	setMidiName(m_name);
	populateConfigurations();
}
Пример #5
0
void ConfigurationPanel::remove()
{
    m_settings->removeStyle(ui->configurations->currentText());
    populateConfigurations();
}
Пример #6
0
void ConfigurationPanel::setSettings(AbstractSettings *settings)
{
    m_settings = settings;
    populateConfigurations();
}