summaryrefslogtreecommitdiffstats
path: root/src/effects/effectchainslot.cpp
diff options
context:
space:
mode:
authorKshitij Gupta <kgupta119@gmail.com>2018-08-04 04:27:35 +0530
committerKshitij Gupta <kgupta119@gmail.com>2018-10-18 06:42:41 +0530
commit94e983c2f74208093c8b5f47a959b0680004d7fa (patch)
tree81d8fae6226e2a4f53709c51780285bb7b7d392b /src/effects/effectchainslot.cpp
parenta526371b54d7cccd2eaed57a9f10049fc9983b52 (diff)
Effect Parameter Hiding/Rearrangement
Diffstat (limited to 'src/effects/effectchainslot.cpp')
-rw-r--r--src/effects/effectchainslot.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/effects/effectchainslot.cpp b/src/effects/effectchainslot.cpp
index e5ecb37851..a0155f0ece 100644
--- a/src/effects/effectchainslot.cpp
+++ b/src/effects/effectchainslot.cpp
@@ -192,9 +192,21 @@ void EffectChainSlot::loadEffect(const unsigned int iEffectSlotNumber,
m_enabledInputChannels);
}
-void EffectChainSlot::reloadAllEffects() {
- for (EffectSlotPointer pSlot : m_effectSlots) {
- pSlot->reload(m_enabledInputChannels);
+void EffectChainSlot::hideEffectParameter(EffectManifestPointer pManifest,
+ const unsigned int position) {
+ for (EffectSlotPointer pEffectSlot : m_effectSlots) {
+ if (pEffectSlot->getManifest() == pManifest) {
+ pEffectSlot->hideEffectParameter(position);
+ }
+ }
+}
+
+void EffectChainSlot::setEffectParameterPosition(EffectManifestPointer pManifest,
+ const unsigned int parameterId, const unsigned int position) {
+ for (EffectSlotPointer pEffectSlot : m_effectSlots) {
+ if (pEffectSlot->getManifest() == pManifest) {
+ pEffectSlot->setEffectParameterPosition(parameterId, position);
+ }
}
}
@@ -232,14 +244,14 @@ void EffectChainSlot::setSuperParameterDefaultValue(double value) {
EffectSlotPointer EffectChainSlot::addEffectSlot(const QString& group) {
// qDebug() << debugString() << "addEffectSlot" << group;
- EffectSlot* pEffectSlot = new EffectSlot(group, m_pEffectsManager, m_effectSlots.size(), m_pEngineEffectChain);
+ EffectSlotPointer pEffectSlot = EffectSlotPointer(
+ new EffectSlot(group, m_pEffectsManager, m_effectSlots.size(), m_pEngineEffectChain));
- EffectSlotPointer pSlot(pEffectSlot);
- m_effectSlots.append(pSlot);
+ m_effectSlots.append(pEffectSlot);
int numEffectSlots = m_pControlNumEffectSlots->get() + 1;
m_pControlNumEffectSlots->forceSet(numEffectSlots);
m_pControlChainFocusedEffect->setStates(numEffectSlots);
- return pSlot;
+ return pEffectSlot;
}
void EffectChainSlot::registerInputChannel(const ChannelHandleAndGroup& handle_group,
@@ -276,8 +288,8 @@ EffectSlotPointer EffectChainSlot::getEffectSlot(unsigned int slotNumber) {
}
void EffectChainSlot::slotControlClear(double v) {
- for (EffectSlotPointer pSlot : m_effectSlots) {
- pSlot->slotClear(v);
+ for (EffectSlotPointer pEffectSlot : m_effectSlots) {
+ pEffectSlot->slotClear(v);
}
}
@@ -285,8 +297,8 @@ void EffectChainSlot::slotControlChainSuperParameter(double v, bool force) {
// qDebug() << debugString() << "slotControlChainSuperParameter" << v;
m_pControlChainSuperParameter->set(v);
- for (const auto& pSlot : m_effectSlots) {
- pSlot->setMetaParameter(v, force);
+ for (const auto& pEffectSlot : m_effectSlots) {
+ pEffectSlot->setMetaParameter(v, force);
}
}