本文整理汇总了C++中ValueTree类的典型用法代码示例。如果您正苦于以下问题:C++ ValueTree类的具体用法?C++ ValueTree怎么用?C++ ValueTree使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ValueTree类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: getValueTreePath
static void getValueTreePath (ValueTree v, const ValueTree& topLevelTree, Array<int>& path)
{
while (v != topLevelTree)
{
ValueTree parent (v.getParent());
if (! parent.isValid())
break;
path.add (parent.indexOf (v));
v = parent;
}
}
开发者ID:COx2,项目名称:JUCE_JAPAN_DEMO,代码行数:13,代码来源:juce_ValueTreeSynchroniser.cpp
示例2: sortGroup
static void sortGroup (ValueTree& state, bool keepGroupsAtStart, UndoManager* undoManager)
{
if (keepGroupsAtStart)
{
ItemSorterWithGroupsAtStart sorter;
state.sort (sorter, undoManager, true);
}
else
{
ItemSorter sorter;
state.sort (sorter, undoManager, true);
}
}
开发者ID:EthanZuo,项目名称:JUCE,代码行数:13,代码来源:jucer_Project.cpp
示例3: v
ValueTree AudioProcessorValueTreeState::getOrCreateChildValueTree (const String& paramID)
{
ValueTree v (state.getChildWithProperty (idPropertyID, paramID));
if (! v.isValid())
{
v = ValueTree (valueType);
v.setProperty (idPropertyID, paramID, undoManager);
state.addChild (v, -1, undoManager);
}
return v;
}
开发者ID:itarozzi,项目名称:GSWJ_Chapter2_02,代码行数:13,代码来源:juce_AudioProcessorValueTreeState.cpp
示例4: RestoreProperty
void StoredSettings::RestoreProperty(const Identifier& CategoryName, const Identifier& PropertyName, Value& Val)
{
ValueTree tree = (CategoryName == Identifiers::Category1) ? tree_root : tree_root.getOrCreateChildWithName(CategoryName, nullptr);
if(!tree.hasProperty(PropertyName)){
//If there isn't one then set a new one.
//プロパティーが存在しなければ、設定する
tree.setProperty(PropertyName, Val, nullptr);
}else{
//If the property already exists then just return it.
//存在していれば、そのプロパティーを参照する
Val.referTo(tree.getPropertyAsValue(PropertyName, nullptr));
}
}
开发者ID:hazama-yuinyan,项目名称:OpenBVEEditor,代码行数:13,代码来源:StoredSettings.cpp
示例5: loadTrackInfo
void TrackInfo::loadTrackInfo(ValueTree tags)
{
if (tags.hasType("ITEM")) {
title.setText (tags.getProperty(MusicColumns::columnNames[MusicColumns::Song].toString(), 0),dontSendNotification);
artist.setText (tags.getProperty(MusicColumns::columnNames[MusicColumns::Artist].toString(), 0),dontSendNotification);
album.setText (tags.getProperty(MusicColumns::columnNames[MusicColumns::Album].toString(), 0),dontSendNotification);
}
else {
title.setText ("Song Title",dontSendNotification);
artist.setText ("Artist",dontSendNotification);
album.setText("Album", dontSendNotification);
}
}
开发者ID:AndyBrown91,项目名称:MusicPlayer,代码行数:13,代码来源:TrackInfo.cpp
示例6: MethodItem
ApiCollection::ClassCollection::ClassCollection(const ValueTree &api) :
classApi(api),
name(api.getType().toString())
{
for (int i = 0; i < api.getNumChildren(); i++)
{
items.add(new MethodItem(api.getChild(i), name));
addAndMakeVisible(items.getLast());
}
}
开发者ID:christophhart,项目名称:HISE,代码行数:13,代码来源:ApiBrowser.cpp
示例7: c
Value AppearanceSettings::getColourValue (const String& colourName)
{
ValueTree c (settings.getChildWithProperty (Ids::name, colourName));
if (! c.isValid())
{
c = ValueTree ("COLOUR");
c.setProperty (Ids::name, colourName, nullptr);
settings.addChild (c, -1, nullptr);
}
return c.getPropertyAsValue (Ids::colour, nullptr);
}
开发者ID:0x4d52,项目名称:JUCE,代码行数:13,代码来源:jucer_AppearanceSettings.cpp
示例8: parseFile
void UnityProjectBuilder::parseFile (ValueTree file, const File& sourceDir)
{
const String path (file.getProperty (Ids::fileProp).toString());
const File sourceFile (projectFile.getSiblingFile (path));
const bool compile = bool (file.getProperty (Ids::compileProp));
if (compile && isValidSourceFile (sourceFile))
{
file.setProperty (Ids::compileProp, false, nullptr);
filesToAdd.add (sourceFile.getRelativePathFrom (sourceDir));
logOutput ("Adding file \"" + path + "\"...");
}
}
开发者ID:Salimlou,项目名称:drowaudio,代码行数:13,代码来源:dRowAudio_UnityProjectBuilder.cpp
示例9: DBG
void ScopeSync::applyConfiguration()
{
DBG("ScopeSync::applyConfiguration");
#ifdef __DLL_EFFECT__
scopeSyncAsync.toggleUpdateProcessing(false);
#endif
parameterController->toggleAsyncUpdates(false);
setGUIEnabled(false);
parameterController->endAllParameterChangeGestures();
systemError = String::empty;
systemErrorDetails = String::empty;
if (ScopeSyncApplication::inPluginContext())
parameterController->storeParameterValues();
parameterController->reset();
// Firstly create the BCMParameter entries for each of the Host Parameters
ValueTree parameterTree = configuration->getParameters();
for (int i = 0; i < parameterTree.getNumChildren(); i++)
parameterController->addParameter(parameterTree.getChild(i));
parameterController->setupHostParameters();
#ifndef __DLL_EFFECT__
pluginProcessor->updateHostDisplay();
#endif // __DLL_EFFECT__
#ifndef __DLL_EFFECT__
parameterController->restoreParameterValues();
#else
scopeSyncAsync.snapshot();
scopeSyncAsync.toggleUpdateProcessing(true);
#endif // __DLL_EFFECT__
UserSettings::getInstance()->updateConfigurationLibraryEntry(getConfigurationFile().getFullPathName(),
getConfigurationFile().getFileName(),
getConfigurationRoot());
setGUIReload(true);
if (configurationManagerWindow != nullptr)
{
configurationManagerWindow->refreshContent();
configurationManagerWindow->restoreWindowPosition();
}
parameterController->toggleAsyncUpdates(true);
}
开发者ID:nimmen,项目名称:scopesync,代码行数:51,代码来源:ScopeSync.cpp
示例10: wgs
ValueTree SAMCompiler::getWgForJunct(ValueTree waveguides, ValueTree j)
{
ValueTree wgs(Objects::waveguides);
for (int i = 0; i < waveguides.getNumChildren(); ++i)
{
ValueTree w = waveguides.getChild(i);
if (w[Ids::startVertex] == j[Ids::identifier]
|| w[Ids::endVertex] == j[Ids::identifier])
{
wgs.addChild(w.createCopy(), -1, nullptr);
}
}
return wgs;
}
开发者ID:eberdahl,项目名称:Synth-A-Modeler,代码行数:14,代码来源:SAMCompiler.cpp
示例11: getOwner
void CtrlrPanelCanvas::replaceComponent (CtrlrModulator &modulator, const String &targetComponentType)
{
CtrlrComponent *oldComponent = modulator.getComponent();
CtrlrComponent *newComponent = nullptr;
/* detach the existing component so it doesn't get notified about anything, the pointer will be invalid */
if (getOwner().getSelection())
{
getOwner().getSelection()->deselectAll();
getOwner().getSelection()->dispatchPendingMessages();
getOwner().getSelection()->removeChangeListener(oldComponent);
}
if (oldComponent)
{
/* keep a copy of the old properties, we need to find out if the component is in a group */
ValueTree oldComponentProperties = oldComponent->getObjectTree().createCopy();
modulator.setComponentType(targetComponentType, false);
/* get the new component pointer and attach it */
newComponent = modulator.getComponent();
if (getOwner().getSelection())
getOwner().getSelection()->addChangeListener (newComponent);
addAndMakeVisibleNg (modulator.getComponent(), nullptr, true);
/* attach the new component to any group components the old component was int */
if (oldComponentProperties.hasProperty(Ids::componentGroupName))
{
CtrlrGroup *group = dynamic_cast<CtrlrGroup*>(owner.getOwner().getComponent(oldComponentProperties.getProperty(Ids::componentGroupName)));
if (group)
{
group->setOwned (newComponent, true);
}
}
if (oldComponentProperties.hasProperty(Ids::componentTabName))
{
CtrlrTabsComponent *tabs = dynamic_cast<CtrlrTabsComponent*>(owner.getOwner().getComponent(oldComponentProperties.getProperty(Ids::componentTabName)));
if (tabs)
{
tabs->setOwned (newComponent, oldComponentProperties.getProperty(Ids::componentTabId), true);
}
}
/* copy any old properties to the new component */
for (int i=0; i<oldComponentProperties.getNumProperties(); i++)
{
const Identifier propName = oldComponentProperties.getPropertyName(i);
const var propValue = oldComponentProperties.getProperty(propName);
if (propName != Ids::uiType)
{
if (newComponent->getObjectTree().hasProperty(propName))
newComponent->setProperty (propName, propValue);
}
}
}
}
开发者ID:RomanKubiak,项目名称:ctrlr,代码行数:60,代码来源:CtrlrPanelCanvasHandlers.cpp
示例12: data
ValueTree ScannerManagerComponent::getForDocument()
{
ValueTree data ("SCANNERS");
for (unsigned i = 0; i < cues.size(); i++)
{
ValueTree cue ("CUE");
cue.setProperty ("x", cues[i]->getPosition(), nullptr);
data.addChild (cue, i, nullptr);
}
return data;
}
开发者ID:marmorkuchen-net,项目名称:kubismus,代码行数:14,代码来源:ScannerManagerComponent.cpp
示例13: exporters
void Project::removeDefunctExporters()
{
ValueTree exporters (projectRoot.getChildWithName (Tags::exporters));
for (;;)
{
ValueTree oldVC6Exporter (exporters.getChildWithName ("MSVC6"));
if (oldVC6Exporter.isValid())
exporters.removeChild (oldVC6Exporter, nullptr);
else
break;
}
}
开发者ID:lauyoume,项目名称:JUCE,代码行数:14,代码来源:jucer_Project.cpp
示例14: fc
bool MDLHelper::addOutputDSPVarIfNotExists(const MDLFile& mdlFile)
{
ValueTree mdlRoot = mdlFile.getMDLRoot();
bool outputDSPExists = false;
ValueTree fcb = mdlRoot.getOrCreateChildWithName(Objects::faustcodeblock, nullptr);
for (int i = 0; i < fcb.getNumChildren(); ++i)
{
ValueTree fc = fcb.getChild(i);
if (fc.hasProperty(Ids::value))
{
String fcStr = fc[Ids::value].toString();
if (fcStr.startsWith("outputDSP"))
{
outputDSPExists = true;
break;
}
}
}
if (!outputDSPExists)
{
ValueTree fc(Ids::faustcode);
fc.setProperty(Ids::value, "outputDSP=SAMlimiter:highpass(4,20.0);", nullptr);
fcb.addChild(fc, -1, nullptr);
return true;
}
return false;
}
开发者ID:alessandrostone,项目名称:SaM-Designer,代码行数:28,代码来源:MDLHelper.cpp
示例15: c
StringArray AppearanceSettings::getColourNames() const
{
StringArray s;
for (int i = 0; i < settings.getNumChildren(); ++i)
{
const ValueTree c (settings.getChild(i));
if (c.hasType ("COLOUR"))
s.add (c [Ids::name]);
}
return s;
}
开发者ID:Krewn,项目名称:LIOS,代码行数:14,代码来源:jucer_AppearanceSettings.cpp
示例16: restoreState
void CtrlrComponent::restoreState (const ValueTree &savedState)
{
restoreStateInProgress = true;
restoreProperties (savedState, componentTree, nullptr);
for (int i=0; i<savedState.getNumChildren(); i++)
{
componentTree.addChild (savedState.getChild(i).createCopy(), -1, 0);
}
restoreStateInProgress = false;
resized();
}
开发者ID:Srikrishna31,项目名称:ctrlr,代码行数:14,代码来源:CtrlrComponent.cpp
示例17: _DBG
ValueTree CtrlrMIDILibrary::scanChildrenForMenuIndex(ValueTree item, int itemIndexToFind, int ¤tIndex)
{
_DBG("CtrlrMIDILibrary::scanChildrenForMenuIndex");
if (isContainer (item))
{
_DBG("\tcontainer ["+item.getType().toString()+"]");
ValueTree child;
for (int topLevelIndex=0; topLevelIndex<item.getNumChildren(); topLevelIndex++)
{
child = scanChildrenForMenuIndex (item.getChild(topLevelIndex), itemIndexToFind, currentIndex);
if (child.isValid())
{
_DBG("\t\tvalid child found ["+child.getType().toString()+"] parent:["+child.getParent().getType().toString()+"]");
return (child);
}
currentIndex++;
}
}
if (itemIndexToFind == currentIndex)
{
_DBG("\t\titemIndexToFind == currentIndex ["+item.getType().toString()+"]");
return (item);
}
else
{
return (ValueTree());
}
}
开发者ID:gareth8118,项目名称:ctrlr,代码行数:32,代码来源:CtrlrMIDILibrary.cpp
示例18: createEmptyProgramTree
void CtrlrMIDILibrary::addNewProgram (const String programName, const int number, ValueTree unitToAddTo)
{
ValueTree program = createEmptyProgramTree();
program.addChild (owner.getProgram(), -1, nullptr);
program.setProperty (Ids::name, getDefaultProgramName(programName), nullptr);
program.setProperty (Ids::description, String::empty, nullptr);
program.setProperty (Ids::number, getCurrentProgramMIDINumber(number), nullptr);
program.setProperty (Ids::uuid, Uuid().toString(), nullptr);
if (unitToAddTo.isValid())
{
unitToAddTo.addChild (program, -1, 0);
}
else
{
if (isBank(getCurrentBank()))
{
getCurrentBank().addChild (program, -1, 0);
}
else
{
getRoot().addChild (program, -1, 0);
}
}
listeners.call (&CtrlrMIDILibrary::Listener::programListChanged);
}
开发者ID:gareth8118,项目名称:ctrlr,代码行数:29,代码来源:CtrlrMIDILibrary.cpp
示例19: canBeRenamed
const bool CtrlrLuaMethodEditor::canBeRenamed(const ValueTree &item) const
{
if ( item.getType() == Ids::luaMethod && ((int)item.getProperty(Ids::luaMethodSource) == CtrlrLuaMethod::codeInProperty) )
{
return (true);
}
if (item.getType() == Ids::luaMethodGroup)
{
return (true);
}
return (false);
}
开发者ID:grimtraveller,项目名称:ctrlr,代码行数:14,代码来源:CtrlrLuaMethodEditor.cpp
示例20: countLayers
LayerItem KeyItem::addLayer (const File& file)
{
const int layerIndex = countLayers();
ValueTree layerNode (Tags::layer);
layerNode.setProperty (Slugs::index, layerIndex, nullptr);
layerNode.setProperty (Slugs::file, file.getFullPathName(), nullptr);
layerNode.setProperty (Slugs::name, file.getFileNameWithoutExtension(), nullptr);
layerNode.setProperty (Slugs::note, getNote(), nullptr);
LayerItem layer (layerNode);
objectData.addChild (layerNode, layerIndex, nullptr);
return layer;
}
开发者ID:kushview,项目名称:ksp1,代码行数:15,代码来源:KeyItem.cpp
注:本文中的ValueTree类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论