本文整理汇总了C++中PropertiesFile::setValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertiesFile::setValue方法的具体用法?C++ PropertiesFile::setValue怎么用?C++ PropertiesFile::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertiesFile
的用法示例。
在下文中一共展示了PropertiesFile::setValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setFunction
//==============================================================================
void MidiSlider::setFunction(const String &_functionName, const int &_functionArg, const int &_midiChannel, const int &initialValue)
{
functionName = _functionName;
functionArg = _functionArg;
midiChannel = _midiChannel;
slider->snapsBackOnRelease = 0;
if( functionName.containsWholeWord(T("CC")) ) {
String labelStr(functionArg);
sliderFunction->clear(true);
for(int i=0; i<128; ++i) {
sliderFunction->addItem(T("CC") + String(i) + T(": ") + String(MidiSliderCcNames[i]), i+1);
}
sliderFunction->setSelectedId(functionArg+1, true);
} else if( functionName.containsWholeWord(T("PB")) ) {
String labelStr(functionArg);
slider->snapsBackOnRelease = 1;
sliderFunction->clear();
} else {
sliderFunction->clear();
}
slider->setValue(initialValue, dontSendNotification); // don't send update message
// store settings
PropertiesFile *propertiesFile = MiosStudioProperties::getInstance()->getCommonSettings(true);
if( propertiesFile ) {
propertiesFile->setValue("slider" + String(sliderNum) + "FunctionName",_functionName);
propertiesFile->setValue("slider" + String(sliderNum) + "FunctionArg", functionArg);
propertiesFile->setValue("slider" + String(sliderNum) + "MidiChannel", midiChannel);
propertiesFile->setValue("slider" + String(sliderNum) + "InitialValue", slider->getValue());
}
}
示例2: changeListenerCallback
void changeListenerCallback(void *something){
printf("Some audio change thing.\n");
if(audioDeviceManager.getCurrentAudioDevice()!=NULL){
samplerate=audioDeviceManager.getCurrentAudioDevice()->getCurrentSampleRate();
propertiesfile->setValue("audiodevicemanager",audioDeviceManager.createStateXml());
}else{
fprintf(stderr,"Gakkegakke\n");
}
}
示例3: f
GuiApp::~GuiApp()
{
PropertiesFile* pf = globals().settings().getUserSettings();
pf->setValue ("mainWindowState", mainWindow->getWindowStateAsString());
File f (sessionDoc->getFile());
if (f.existsAsFile()) {
pf->setValue ("lastSession", f.getFullPathName());
}
render.detach();
mainWindow->setVisible (false);
mainWindow->removeFromDesktop();
mainWindow = nullptr;
windowManager = nullptr;
LookAndFeel::setDefaultLookAndFeel (nullptr);
}
示例4: saveSettingsToFile
void ApplicationSettingsComponent::saveSettingsToFile(){
PropertiesFile* properties = ApplicationConfiguration::getApplicationProperties();
properties->setValue("serialport", serialPortComboBox->getText());
properties->setValue("serialspeed", serialSpeedComboBox->getText());
properties->setValue("presetdirectory", presetDirectoryEditor->getText());
properties->setValue("midiinput", midiInputComboBox->getText());
properties->setValue("midioutput", midiOutputComboBox->getText());
properties->setValue("oschost", oscHostEditor->getText());
properties->setValue("oscport", oscPortEditor->getText());
properties->saveIfNeeded();
std::cout << "saved settings to file " << properties->getFile().getFullPathName() << std::endl;
}
示例5: setLastSearchPath
void PluginListComponent::setLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format,
const FileSearchPath& newPath)
{
properties.setValue ("lastPluginScanPath_" + format.getName(), newPath.toString());
}