Skip to content

Commit

Permalink
skins/QMLDemo: Enable switching effects via comboboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Jun 15, 2021
1 parent 2b9f3e2 commit dea4f22
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion res/skins/QMLDemo/EffectUnit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import QtQuick.Layouts 1.12
import "Theme"

Item {
id: root

property int unitNumber // required

Skin.SectionBackground {
Expand All @@ -25,7 +27,8 @@ Item {
Item {
id: effect

property string group: "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + (index + 1) + "]"
property int effectNumber: index + 1
property string group: "[EffectRack1_EffectUnit" + unitNumber + "_Effect" + effectNumber + "]"

height: 50
Layout.fillWidth: true
Expand Down Expand Up @@ -56,6 +59,10 @@ Item {
// TODO: Add a way to retrieve effect names here
textRole: "display"
model: Mixxx.EffectsManager.visibleEffectsModel
onActivated: {
console.warn(1, root.unitNumber, effect.effectNumber, model.get(index).effectId);
Mixxx.EffectsManager.loadEffect(1, root.unitNumber, effect.effectNumber, model.get(index).effectId);
}
}

Skin.ControlMiniKnob {
Expand Down

0 comments on commit dea4f22

Please sign in to comment.