当前位置: 首页>>代码示例>>C++>>正文


C++ PropertiesFile::getValue方法代码示例

本文整理汇总了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());
        }
    }
开发者ID:bketech,项目名称:element,代码行数:34,代码来源:GuiApp.cpp

示例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);
}
开发者ID:JKcompute,项目名称:395_midi_controller,代码行数:30,代码来源:MidiSlider.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:40,代码来源:

示例4: getLastSearchPath

FileSearchPath PluginListComponent::getLastSearchPath (PropertiesFile& properties, AudioPluginFormat& format)
{
    return FileSearchPath (properties.getValue ("lastPluginScanPath_" + format.getName(),
                                                format.getDefaultLocationsToSearch().toString()));
}
开发者ID:COx2,项目名称:PizzaKnobFilter,代码行数:5,代码来源:juce_PluginListComponent.cpp


注:本文中的PropertiesFile::getValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。