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


C++ ValueTree函数代码示例

本文整理汇总了C++中ValueTree函数的典型用法代码示例。如果您正苦于以下问题:C++ ValueTree函数的具体用法?C++ ValueTree怎么用?C++ ValueTree使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ValueTree函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: var

void StoredSettings::Apply(void)
{
	if(tree_root.getNumProperties() == 0){
		//We'll set various settings at the first start-up.
		//初回起動時にプロパティーを設定する
		tree_root.setProperty(Identifiers::RecentFiles, var(list.toString()), nullptr);

		tree_root.setProperty(Identifiers::Languages, var("en"), nullptr);
		tree_root.addChild(ValueTree(Identifiers::RecentSearches), -1, nullptr);
		tree_root.addChild(ValueTree(Identifiers::RecentReplaces), -1, nullptr);
	}

	list.restoreFromString(tree_root.getProperty(Identifiers::RecentFiles));
	list.removeNonExistentFiles();

	const String LANG_NAME = tree_root.getProperty(Identifiers::Languages);
	if(LANG_NAME != String("en")){
		File lang_file = File::getSpecialLocation(File::currentApplicationFile).getParentDirectory().getChildFile(String("languages/") + LANG_NAME + String(".txt"));
		LocalisedStrings::setCurrentMappings(new LocalisedStrings(lang_file));
		if(LANG_NAME == String("ja")){
			// UI表示フォントを日本語表示可能なものに変更する
			LookAndFeel::getDefaultLookAndFeel().setDefaultSansSerifTypefaceName(L"メイリオ");
		}
	}
	Desktop::getInstance().getComponent(0)->repaint();
}
开发者ID:hazama-yuinyan,项目名称:OpenBVEEditor,代码行数:26,代码来源:StoredSettings.cpp

示例2: switch

ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
    ProjectExporter* exp = nullptr;

    switch (index)
    {
        case 0:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter     ::getValueTreeTypeName (false)), false); break;
        case 1:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter     ::getValueTreeTypeName (true)), true); break;
        case 2:     exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
        case 3:     exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
        case 4:     exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
        case 5:     exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break;
        case 6:     exp = new MSVCProjectExporterVC2013 (project, ValueTree (MSVCProjectExporterVC2013::getValueTreeTypeName())); break;
        case 7:     exp = new MakefileProjectExporter   (project, ValueTree (MakefileProjectExporter  ::getValueTreeTypeName())); break;
        case 8:     exp = new AndroidProjectExporter    (project, ValueTree (AndroidProjectExporter   ::getValueTreeTypeName())); break;
        case 9:     exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter::getValueTreeTypeName())); break;

        default:    jassertfalse; return 0;
    }

    File juceFolder (ModuleList::getLocalModulesFolder (&project));
    File target (exp->getTargetFolder());

    if (FileHelpers::shouldPathsBeRelative (juceFolder.getFullPathName(), project.getFile().getFullPathName()))
        exp->getJuceFolderValue() = FileHelpers::getRelativePathFrom (juceFolder, project.getFile().getParentDirectory());
    else
        exp->getJuceFolderValue() = juceFolder.getFullPathName();

    exp->createDefaultConfigs();

    return exp;
}
开发者ID:Rahmatollah,项目名称:JUCE,代码行数:32,代码来源:jucer_ProjectExporter.cpp

示例3: switch

ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
    ProjectExporter* exp = nullptr;

    switch (index)
    {
        case 0:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter     ::getValueTreeTypeName (false)), false); break;
        case 1:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter     ::getValueTreeTypeName (true)), true); break;
        case 2:     exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
        case 3:     exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
        case 4:     exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
        case 5:     exp = new MSVCProjectExporterVC2012 (project, ValueTree (MSVCProjectExporterVC2012::getValueTreeTypeName())); break;
        case 6:     exp = new MSVCProjectExporterVC2013 (project, ValueTree (MSVCProjectExporterVC2013::getValueTreeTypeName())); break;
        case 7:     exp = new MakefileProjectExporter   (project, ValueTree (MakefileProjectExporter  ::getValueTreeTypeName())); break;
        case 8:     exp = new AndroidProjectExporter    (project, ValueTree (AndroidProjectExporter   ::getValueTreeTypeName())); break;
        case 9:     exp = new CodeBlocksProjectExporter (project, ValueTree (CodeBlocksProjectExporter::getValueTreeTypeName())); break;

        default:    jassertfalse; return 0;
    }

    exp->createDefaultConfigs();
    exp->createDefaultModulePaths();

    return exp;
}
开发者ID:Theadd,项目名称:Designi,代码行数:25,代码来源:ProjectExporter.cpp

示例4: getOrCreateChildWithName

    ValueTree getOrCreateChildWithName (const Identifier& typeToMatch, UndoManager* undoManager)
    {
        for (auto* s : children)
            if (s->type == typeToMatch)
                return ValueTree (*s);

        auto newObject = new SharedObject (typeToMatch);
        addChild (newObject, -1, undoManager);
        return ValueTree (*newObject);
    }
开发者ID:kmatheussen,项目名称:radium,代码行数:10,代码来源:juce_ValueTree.cpp

示例5: getChildWithName

    ValueTree getChildWithName (const Identifier& typeToMatch) const
    {
        for (int i = 0; i < children.size(); ++i)
        {
            SharedObject* const s = children.getObjectPointerUnchecked (i);
            if (s->type == typeToMatch)
                return ValueTree (s);
        }

        return ValueTree();
    }
开发者ID:COx2,项目名称:PizzaKnobFilter,代码行数:11,代码来源:juce_ValueTree.cpp

示例6: ValueTree

ValueTree ValueTree::SharedObject::getOrCreateChildWithName (const Identifier& typeToMatch, UndoManager* undoManager)
{
    for (int i = 0; i < children.size(); ++i)
        if (children.getUnchecked(i)->type == typeToMatch)
            return ValueTree (static_cast <SharedObject*> (children.getUnchecked(i)));

    SharedObject* const newObject = new SharedObject (typeToMatch);
    addChild (newObject, -1, undoManager);
    return ValueTree (newObject);

}
开发者ID:Labmind,项目名称:GUI,代码行数:11,代码来源:juce_ValueTree.cpp

示例7: getChildWithProperty

    ValueTree getChildWithProperty (const Identifier& propertyName, const var& propertyValue) const
    {
        for (int i = 0; i < children.size(); ++i)
        {
            SharedObject* const s = children.getObjectPointerUnchecked (i);
            if (s->properties[propertyName] == propertyValue)
                return ValueTree (s);
        }

        return ValueTree();
    }
开发者ID:COx2,项目名称:PizzaKnobFilter,代码行数:11,代码来源:juce_ValueTree.cpp

示例8: switch

ProjectExporter* ProjectExporter::createNewExporter (Project& project, const int index)
{
    ProjectExporter* exp = nullptr;

    switch (index)
    {
        case 0:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (false)), false); break;
        case 1:     exp = new XCodeProjectExporter      (project, ValueTree (XCodeProjectExporter::getValueTreeTypeName (true)), true); break;
        case 2:     exp = new MSVCProjectExporterVC6    (project, ValueTree (MSVCProjectExporterVC6::getValueTreeTypeName())); break;
        case 3:     exp = new MSVCProjectExporterVC2005 (project, ValueTree (MSVCProjectExporterVC2005::getValueTreeTypeName())); break;
        case 4:     exp = new MSVCProjectExporterVC2008 (project, ValueTree (MSVCProjectExporterVC2008::getValueTreeTypeName())); break;
        case 5:     exp = new MSVCProjectExporterVC2010 (project, ValueTree (MSVCProjectExporterVC2010::getValueTreeTypeName())); break;
        case 6:     exp = new MakefileProjectExporter   (project, ValueTree (MakefileProjectExporter::getValueTreeTypeName())); break;
        case 7:     exp = new AndroidProjectExporter    (project, ValueTree (AndroidProjectExporter::getValueTreeTypeName())); break;
        default:    jassertfalse; return 0;
    }

    File juceFolder (StoredSettings::getInstance()->getLastKnownJuceFolder());
    File target (exp->getTargetFolder());

    if (FileHelpers::shouldPathsBeRelative (juceFolder.getFullPathName(), project.getFile().getFullPathName()))
        exp->getJuceFolder() = juceFolder.getRelativePathFrom (project.getFile().getParentDirectory());
    else
        exp->getJuceFolder() = juceFolder.getFullPathName();

    exp->createLibraryModules();
    return exp;
}
开发者ID:noahadler,项目名称:nomadloop,代码行数:28,代码来源:jucer_ProjectExporter.cpp

示例9: getOrCreateChildWithName

    ValueTree getOrCreateChildWithName (const Identifier& typeToMatch, UndoManager* undoManager)
    {
        for (int i = 0; i < children.size(); ++i)
        {
            SharedObject* const s = children.getObjectPointerUnchecked (i);
            if (s->type == typeToMatch)
                return ValueTree (s);
        }

        SharedObject* const newObject = new SharedObject (typeToMatch);
        addChild (newObject, -1, undoManager);
        return ValueTree (newObject);

    }
开发者ID:COx2,项目名称:PizzaKnobFilter,代码行数:14,代码来源:juce_ValueTree.cpp

示例10: ValueTree

void BenderClientOptions::setDefaultOptions()
{
    benderPropertiesTree = ValueTree("bender-properties");
    benderPropertiesTree.setProperty ("destinationAddress", "localhost", nullptr);
    benderPropertiesTree.setProperty ("destinationPort", "9666", nullptr);
    benderPropertiesTree.setProperty ("localDataPort", "9667", nullptr);
}
开发者ID:RomanKubiak,项目名称:bender,代码行数:7,代码来源:BenderClientOptions.cpp

示例11: toggleExpandChannels

void RemoteChannels::buttonClicked(Button* a_button)
{
  if      (a_button == this->expandButton)
    toggleExpandChannels() ;
  else if (a_button == this->ignoreButton)
    this->subscriptions.addChild(ValueTree(this->configStore.getType()) , -1  , nullptr) ;
}
开发者ID:FeodorFitsner,项目名称:linjam,代码行数:7,代码来源:Channels.cpp

示例12: ValueTree

//==============================================================================
void ITunesLibrary::setLibraryTree (ValueTree& newTreeToUse)
{
    if (! newTreeToUse.isValid()) 
        newTreeToUse = ValueTree (MusicColumns::libraryIdentifier);

    libraryTree = newTreeToUse;
}
开发者ID:JeromeGill,项目名称:genie,代码行数:8,代码来源:dRowAudio_ITunesLibrary.cpp

示例13: ValueTree

void OnlineUnlockStatus::load()
{
    MemoryBlock mb;
    mb.fromBase64Encoding (getState());

    if (mb.getSize() > 0)
        status = ValueTree::readFromGZIPData (mb.getData(), mb.getSize());
    else
        status = ValueTree (stateTagName);

    StringArray localMachineNums (getLocalMachineIDs());

    if (machineNumberAllowed (StringArray ("1234"), localMachineNums))
        status.removeProperty (unlockedProp, nullptr);

    KeyFileUtils::KeyFileData data;
    data = KeyFileUtils::getDataFromKeyFile (KeyFileUtils::getXmlFromKeyFile (status[keyfileDataProp], getPublicKey()));

    if (data.keyFileExpires)
    {
        if (! doesProductIDMatch (data.appID))
            status.removeProperty (expiryTimeProp, nullptr);

        if (! machineNumberAllowed (data.machineNumbers, localMachineNums))
            status.removeProperty (expiryTimeProp, nullptr);
    }
    else
    {
        if (! doesProductIDMatch (data.appID))
            status.removeProperty (unlockedProp, nullptr);

        if (! machineNumberAllowed (data.machineNumbers, localMachineNums))
            status.removeProperty (unlockedProp, nullptr);
    }
}
开发者ID:azeteg,项目名称:HISE,代码行数:35,代码来源:juce_OnlineUnlockStatus.cpp

示例14: item

Project::Item Project::createNewGroup()
{
    Item item (*this, ValueTree (Tags::group));
    item.initialiseNodeValues();
    item.getName() = "New Group";
    return item;
}
开发者ID:randi2kewl,项目名称:ShoutOut,代码行数:7,代码来源:jucer_Project.cpp

示例15: UndoManager

//==============================================================================
ZenAutoTrimAudioProcessor::ZenAutoTrimAudioProcessor()
{
	// #TODO: bitwig parameter text showing normalized instead of in db
	undoManager = new UndoManager();
	params = new ZenAudioProcessorValueTreeState(*this, undoManager);
	
	gainParam = params->createAndAddDecibelParameter(gainParamID, "Gain", -96.0f, 18.0f, 0.0f);
	targetGainParam = params->createAndAddDecibelParameter(targetGainParamID, "TargetGain", -96.0f, 18.0f, -18.0f);
	autoGainEnableParam = params->createAndAddBoolParameter(autoGainEnableParamID, "AutoGain", false);
	bypassParam = params->createAndAddBoolParameter(bypassParamID, "Bypass", false);
	targetTypeParam = params->createAndAddIntParameter(targetTypeParamID, "Target Type", 0, CalibrationTarget::targetCount, CalibrationTarget::Peak);
	rmsWindowTimeParam = params->createAndAddIntParameter(rmsWindowTimeParamID, "RMS Window Time", 10, 5000, CalibrationTimeInMS::time300ms);

	params->state = ValueTree("ZenAutoTrim");

#ifdef JUCE_DEBUG
	//// #TODO: Change this to use Juce SharedResourcePointer - https://forum.juce.com/t/juce-singleton-implementation-confusion/17847/6
	//debugWindow = ZenDebugEditor::getInstance();
	//debugWindow->setSize(650, 400);
	////Open in bottom right corner
	//debugWindow->setTopLeftPosition(1900 - debugWindow->getWidth(), 1040 - debugWindow->getHeight());
	//// #TODO: add JUCE REF COUNTED OBJECT to zen GUI

#ifdef JUCE_MSVC  //Visual Studio mem leak diagnostics settings 
	_CrtSetDbgFlag(0); //Turn off VS memory dump output
	//_crtBreakAlloc = 5389;	//Break on this memory allocation number (When Debug)
#endif
#endif
}
开发者ID:SonicZentropy,项目名称:ZenAutoTrim,代码行数:30,代码来源:PluginProcessor.cpp


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