# HG changeset patch # User Chris Cannam # Date 1568975122 -3600 # Node ID 0586e6492785faa3761dc5a855fcb960a60c75ad # Parent 0fa155b84bac3db071a1b7fe797b47bbf74a8e95 Shorten name (Boxes -> Box) diff -r 0fa155b84bac -r 0586e6492785 layer/LayerFactory.cpp --- a/layer/LayerFactory.cpp Thu Sep 19 17:15:36 2019 +0100 +++ b/layer/LayerFactory.cpp Fri Sep 20 11:25:22 2019 +0100 @@ -78,7 +78,7 @@ case Notes: return Layer::tr("Notes"); case FlexiNotes: return Layer::tr("Flexible Notes"); case Regions: return Layer::tr("Regions"); - case TimeFrequencyBoxes: return Layer::tr("Time-Frequency Boxes"); + case TimeFrequencyBox: return Layer::tr("Time-Frequency Box"); case Text: return Layer::tr("Text"); case Image: return Layer::tr("Images"); case Colour3DPlot: return Layer::tr("Colour 3D Plot"); @@ -177,7 +177,7 @@ } if (ModelById::getAs(modelId)) { - types.insert(TimeFrequencyBoxes); + types.insert(TimeFrequencyBox); } if (ModelById::getAs(modelId)) { @@ -210,7 +210,7 @@ // types.insert(FlexiNotes); types.insert(Notes); types.insert(Regions); - types.insert(TimeFrequencyBoxes); + types.insert(TimeFrequencyBox); types.insert(Text); types.insert(Image); //!!! and in principle Colour3DPlot -- now that's a challenge @@ -228,7 +228,7 @@ if (dynamic_cast(layer)) return FlexiNotes; if (dynamic_cast(layer)) return Notes; if (dynamic_cast(layer)) return Regions; - if (dynamic_cast(layer)) return TimeFrequencyBoxes; + if (dynamic_cast(layer)) return TimeFrequencyBox; if (dynamic_cast(layer)) return Text; if (dynamic_cast(layer)) return Image; if (dynamic_cast(layer)) return Colour3DPlot; @@ -249,7 +249,7 @@ case Notes: return "notes"; case FlexiNotes: return "flexinotes"; case Regions: return "regions"; - case TimeFrequencyBoxes: return "timefrequencyboxes"; + case TimeFrequencyBox: return "timefrequencybox"; case Text: return "text"; case Image: return "image"; case Colour3DPlot: return "colour3d"; @@ -276,7 +276,7 @@ case Notes: return "notes"; case FlexiNotes: return "flexinotes"; case Regions: return "regions"; - case TimeFrequencyBoxes: return "timefrequencyboxes"; + case TimeFrequencyBox: return "timefrequencybox"; case Text: return "text"; case Image: return "image"; case Colour3DPlot: return "colour3dplot"; @@ -302,7 +302,7 @@ if (name == "notes") return Notes; if (name == "flexinotes") return FlexiNotes; if (name == "regions") return Regions; - if (name == "timefrequencyboxes") return TimeFrequencyBoxes; + if (name == "timefrequencybox") return TimeFrequencyBox; if (name == "text") return Text; if (name == "image") return Image; if (name == "colour3dplot") return Colour3DPlot; @@ -375,7 +375,7 @@ return std::make_shared(rate, 1, true); } else if (layerType == Regions) { return std::make_shared(rate, 1, true); - } else if (layerType == TimeFrequencyBoxes) { + } else if (layerType == TimeFrequencyBox) { return std::make_shared(rate, 1, true); } else if (layerType == Text) { return std::make_shared(rate, 1, true); @@ -454,7 +454,7 @@ layer = new RegionLayer; break; - case TimeFrequencyBoxes: + case TimeFrequencyBox: layer = new TimeFrequencyBoxLayer; break; diff -r 0fa155b84bac -r 0586e6492785 layer/LayerFactory.h --- a/layer/LayerFactory.h Thu Sep 19 17:15:36 2019 +0100 +++ b/layer/LayerFactory.h Fri Sep 20 11:25:22 2019 +0100 @@ -38,7 +38,7 @@ Notes, FlexiNotes, Regions, - TimeFrequencyBoxes, + TimeFrequencyBox, Text, Image, Colour3DPlot,