本文整理汇总了C++中PropertiesFile::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertiesFile::getValue方法的具体用法?C++ PropertiesFile::getValue怎么用?C++ PropertiesFile::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertiesFile
的用法示例。
在下文中一共展示了PropertiesFile::getValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sess
void
GuiApp::run()
{
commander().registerAllCommandsForTarget (JUCEApplication::getInstance());
commander().registerAllCommandsForTarget (this);
globals().session().open();
sessionDoc = new SessionDocument (globals().session());
content = new ContentComponent (*this);
content->setSize (800, 600);
mainWindow = new MainWindow (*this);
mainWindow->setContentNonOwned (content.get(), true);
PropertiesFile* pf = globals().settings().getUserSettings();
mainWindow->restoreWindowStateFromString (pf->getValue ("mainWindowState"));
#if JUCE_IOS || JUCE_ANDROID
Desktop& d = Desktop::getInstance();
d.setKioskModeComponent (mainWindow);
#endif
mainWindow->addToDesktop();
mainWindow->setVisible (true);
dispatch->startTimer (250);
openWindow (ELEMENT_PLUGIN_MANAGER);
File sess (pf->getValue ("lastSession"));
if (sess.existsAsFile()) {
sessionDoc->loadFrom (sess, true);
mainWindow->setName (sessionDoc->getDocumentTitle());
}
}
示例2: miosStudio
//==============================================================================
MidiSlider::MidiSlider(MiosStudio *_miosStudio, int _num, String _functionName, int _functionArg, int _midiChannel, int initialValue, bool _vertical)
: miosStudio(_miosStudio)
, sliderNum(_num)
, vertical(_vertical)
{
addAndMakeVisible(slider = new MidiSliderComponent(T("Slider")));
slider->setSliderStyle(vertical ? MidiSliderComponent::LinearVertical : MidiSliderComponent::LinearHorizontal);
slider->addListener(this);
// only used for horizontal sliders
addAndMakeVisible(sliderFunction = new ComboBox(String::empty));
sliderFunction->addListener(this);
// restore settings
PropertiesFile *propertiesFile = MiosStudioProperties::getInstance()->getCommonSettings(true);
if( propertiesFile ) {
_functionName = propertiesFile->getValue("slider" + String(sliderNum) + "FunctionName", _functionName);
_functionArg = propertiesFile->getIntValue("slider" + String(sliderNum) + "FunctionArg", _functionArg);
_midiChannel = propertiesFile->getIntValue("slider" + String(sliderNum) + "MidiChannel", _midiChannel);
initialValue = propertiesFile->getIntValue("slider" + String(sliderNum) + "InitialValue", initialValue);
}
setFunction(_functionName, _functionArg, _midiChannel, initialValue);
if( vertical )
setSize(24, 18+80);
else
setSize(128, 24+18);
}
示例3: loadSettingsFromFile
void ApplicationSettingsComponent::loadSettingsFromFile(){
PropertiesFile* properties = ApplicationConfiguration::getApplicationProperties();
#if JUCE_MAC || JUCE_IOS
DirectoryIterator it(File("/dev"), false, "tty.usbserial-*");
#elif JUCE_WINDOWS
DirectoryIterator it(File("\\\\.\\"), false, "COM*");
#elif JUCE_LINUX
DirectoryIterator it(File("/dev"), false, "ttyUSB*");
#endif
int index = 1;
serialPortComboBox->addItem("none", index);
while(it.next())
serialPortComboBox->addItem(it.getFile().getFullPathName(), ++index);
serialPortComboBox->setText(properties->getValue("serialport"));
serialSpeedComboBox->setText(properties->getValue("serialspeed"));
presetDirectoryEditor->setText(properties->getValue("presetdirectory"));
const StringArray& inputs = MidiInput::getDevices();
midiInputComboBox->addItem("none", ++index);
for(int i=0; i<inputs.size(); ++i)
midiInputComboBox->addItem(inputs[i], ++index);
#if ! JUCE_WINDOWS
midiInputComboBox->addItem("BlipZones", ++index);
#endif
midiInputComboBox->setText(properties->getValue("midiinput"));
const StringArray& outputs = MidiOutput::getDevices();
midiOutputComboBox->addItem("none", ++index);
for(int i=0; i<outputs.size(); ++i)
midiOutputComboBox->addItem(outputs[i], ++index);
#if ! JUCE_WINDOWS
midiOutputComboBox->addItem("BlipZones", ++index);
#endif
midiOutputComboBox->setText(properties->getValue("midioutput"));
oscHostEditor->setText(properties->getValue("oschost"));
oscPortEditor->setText(properties->getValue("oscport"));
std::cout << "loaded settings from file " << properties->getFile().getFullPathName() << std::endl;
}
示例4: getLastSearchPath
FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format)
{
return FileSearchPath (properties.getValue ("lastPluginScanPath_" + format.getName(),
format.getDefaultLocationsToSearch().toString()));
}