diff --git a/data/locale/ar.ts b/data/locale/ar.ts
index 0d44c22bf5c..4aca06e5149 100644
--- a/data/locale/ar.ts
+++ b/data/locale/ar.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New Mixer Channel
diff --git a/data/locale/bs.ts b/data/locale/bs.ts
index 7abf0baf1e1..8050af8c246 100644
--- a/data/locale/bs.ts
+++ b/data/locale/bs.ts
@@ -2698,14 +2698,14 @@ Please make sure you have write-permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
The Mixer channel receives input from one or more instrument tracks.
It in turn can be routed to multiple other mixer channels. LMMS automatically takes care of preventing infinite loops for you and doesn't allow making a connection that would result in an infinite loop.
@@ -2716,27 +2716,27 @@ You can remove and move mixer channels in the context menu, which is accessed by
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
@@ -2789,12 +2789,12 @@ You can remove and move mixer channels in the context menu, which is accessed by
-
+
Rename mixer channel
-
+
Enter the new name for this mixer channel
@@ -9752,7 +9752,7 @@ Please make sure you have read-permission to the file and the directory containi
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
Assign to:
diff --git a/data/locale/ca.ts b/data/locale/ca.ts
index 0e27c39db80..2b06d075423 100644
--- a/data/locale/ca.ts
+++ b/data/locale/ca.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/cs.ts b/data/locale/cs.ts
index 022f554592a..16982e4aee4 100644
--- a/data/locale/cs.ts
+++ b/data/locale/cs.ts
@@ -5334,62 +5334,62 @@ Ověřte si prosím, zda máte povolen zápis do souboru a do složky, ve které
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Množství odeslaného kanálu
-
+
Move &left
Přesunout do&leva
-
+
Move &right
Přesun dop&rava
-
+
Rename &channel
Přejmenovat &kanál
-
+
R&emove channel
Př&esunout kanál
-
+
Remove &unused channels
Odstranit nepo&užívané kanály
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Přiřadit k:
-
+
New mixer Channel
Nový efektový kanál
diff --git a/data/locale/de.ts b/data/locale/de.ts
index 7817857fdff..d5d0625c269 100644
--- a/data/locale/de.ts
+++ b/data/locale/de.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Kanal Sendemenge
-
+
Move &left
Nach &links verschieben
-
+
Move &right
Nach &rechts verschieben
-
+
Rename &channel
&Kanal umbenennen
-
+
R&emove channel
Kanal &Entfernen
-
+
Remove &unused channels
Entferne &unbenutzte Kanäle
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Weise hinzu:
-
+
New mixer Channel
Neuer FX-Kanal
diff --git a/data/locale/el.ts b/data/locale/el.ts
index 07e61778f1e..130d5c63efb 100644
--- a/data/locale/el.ts
+++ b/data/locale/el.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/en.ts b/data/locale/en.ts
index 15c3ab1f07c..246311921af 100644
--- a/data/locale/en.ts
+++ b/data/locale/en.ts
@@ -5335,62 +5335,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/eo.ts b/data/locale/eo.ts
index 0dd9c405f67..88e92cda859 100644
--- a/data/locale/eo.ts
+++ b/data/locale/eo.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/es.ts b/data/locale/es.ts
index 3953ddc11bf..26c7437842b 100644
--- a/data/locale/es.ts
+++ b/data/locale/es.ts
@@ -5334,62 +5334,62 @@ Asegúrate de tener permisos de escritura tanto del archivo como del directorio
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Cantidad de envío del canal
-
+
Move &left
Mover a la Izquierda (&L)
-
+
Move &right
Mover a la Derecha (&R)
-
+
Rename &channel
Renombrar &Canal
-
+
R&emove channel
Borrar canal (&E)
-
+
Remove &unused channels
Quitar los canales que no esten en &uso
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Asignar a:
-
+
New mixer Channel
Nuevo Canal FX
diff --git a/data/locale/eu.ts b/data/locale/eu.ts
index fe6495c0a65..7e815a26180 100644
--- a/data/locale/eu.ts
+++ b/data/locale/eu.ts
@@ -5614,62 +5614,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/fa.ts b/data/locale/fa.ts
index b376a8424f8..b167716fd84 100644
--- a/data/locale/fa.ts
+++ b/data/locale/fa.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/fr.ts b/data/locale/fr.ts
index 4862f4263ce..0386fb4c614 100644
--- a/data/locale/fr.ts
+++ b/data/locale/fr.ts
@@ -5618,62 +5618,62 @@ Veuillez vous assurez que vous avez les droits d'écriture sur le fichier e
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Quantité de signal envoyé du canal
-
+
Move &left
Déplacer à &gauche
-
+
Move &right
Déplacer à &droite
-
+
Rename &channel
&Renommer le canal
-
+
R&emove channel
&Supprimer le canal
-
+
Remove &unused channels
Supprimer les canaux &inutilisés
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Assigner à :
-
+
New mixer Channel
Nouveau canal d'effet
diff --git a/data/locale/gl.ts b/data/locale/gl.ts
index a1a9e6bf1a4..01cd543227c 100644
--- a/data/locale/gl.ts
+++ b/data/locale/gl.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/he.ts b/data/locale/he.ts
index fef0caa9178..2699b7e1abd 100644
--- a/data/locale/he.ts
+++ b/data/locale/he.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/hi_IN.ts b/data/locale/hi_IN.ts
index 82cf364e332..5b2eeebf5b3 100644
--- a/data/locale/hi_IN.ts
+++ b/data/locale/hi_IN.ts
@@ -5335,62 +5335,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/hu_HU.ts b/data/locale/hu_HU.ts
index a0f1e4d4542..88ef6a43155 100644
--- a/data/locale/hu_HU.ts
+++ b/data/locale/hu_HU.ts
@@ -5339,62 +5339,62 @@ Ellenőrizd, hogy rendelkezel-e a szükséges engedélyekkel és próbáld újra
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
Mozgatás &balra
-
+
Move &right
Mozgatás &jobbra
-
+
Rename &channel
Csatorna át&nevezése
-
+
R&emove channel
Csatorna &eltávolítása
-
+
Remove &unused channels
&Nem használt csatornák eltávolítása
-
+
Set channel color
Szín módosítása
-
+
Remove channel color
Szín eltávolítása
-
+
Pick random channel color
Véletlenszerű szín
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Hozzárendelés:
-
+
New mixer Channel
Új csatorna
diff --git a/data/locale/id.ts b/data/locale/id.ts
index c504740e936..4adeb9b229e 100644
--- a/data/locale/id.ts
+++ b/data/locale/id.ts
@@ -5335,62 +5335,62 @@ Pastikan Anda memiliki izin menulis ke file dan direktori yang berisi berkas ter
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Jumlah kirim saluran
-
+
Move &left
Pindah ke &kiri
-
+
Move &right
Pindah ke &kanan
-
+
Rename &channel
Ganti nama &saluran
-
+
R&emove channel
H&apus saluran
-
+
Remove &unused channels
Hapus &saluran yang tak terpakai
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
Saluran FX Baru
diff --git a/data/locale/it.ts b/data/locale/it.ts
index d5a68e6e7c3..104a3bdbc4a 100644
--- a/data/locale/it.ts
+++ b/data/locale/it.ts
@@ -5339,62 +5339,62 @@ Si prega di controllare i permessi di scrittura sul file e la cartella che lo co
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Quantità di segnale inviata dal canale
-
+
Move &left
Sposta a &sinistra
-
+
Move &right
Sposta a $destra
-
+
Rename &channel
Rinomina &canale
-
+
R&emove channel
R&imuovi canale
-
+
Remove &unused channels
Rimuovi canali in&utilizzati
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Assegna a:
-
+
New mixer Channel
Nuovo canale FX
diff --git a/data/locale/ja.ts b/data/locale/ja.ts
index 14b38c6984f..84c5c8a6a83 100644
--- a/data/locale/ja.ts
+++ b/data/locale/ja.ts
@@ -5335,62 +5335,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
一つ左へ (&l)
-
+
Move &right
一つ右へ (&r)
-
+
Rename &channel
チャンネル名を変更 (&c)
-
+
R&emove channel
チャンネルを削除 (&e)
-
+
Remove &unused channels
使用していないチャンネルを削除 (&u)
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/ka.ts b/data/locale/ka.ts
index 51eededf26b..bd789045749 100644
--- a/data/locale/ka.ts
+++ b/data/locale/ka.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/ko.ts b/data/locale/ko.ts
index 43b99e7f437..036c7323130 100644
--- a/data/locale/ko.ts
+++ b/data/locale/ko.ts
@@ -5337,62 +5337,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
왼쪽으로 이동(&L)
-
+
Move &right
오른쪽으로 이동(&R)
-
+
Rename &channel
채널 이름 바꾸기(&C)
-
+
R&emove channel
채널 제거(&R)
-
+
Remove &unused channels
사용하지 않는 채널 제거(&U)
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
채널 할당:
-
+
New mixer Channel
새 FX 채널
diff --git a/data/locale/ms_MY.ts b/data/locale/ms_MY.ts
index ff34784219a..dc3561ea248 100644
--- a/data/locale/ms_MY.ts
+++ b/data/locale/ms_MY.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/nb.ts b/data/locale/nb.ts
index 659344d64de..adfc6d8566a 100644
--- a/data/locale/nb.ts
+++ b/data/locale/nb.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/nl.ts b/data/locale/nl.ts
index 7ff3e8735a8..8d13041357f 100644
--- a/data/locale/nl.ts
+++ b/data/locale/nl.ts
@@ -5335,62 +5335,62 @@ Zorg ervoor dat u schrijfbevoegdheid heeft voor het bestand en voor de map die h
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Hoeveelheid kanaal-send
-
+
Move &left
&Links verplaatsen
-
+
Move &right
&Rechts verplaatsen
-
+
Rename &channel
&Kanaal hernoemen
-
+
R&emove channel
Kanaal v&erwijderen
-
+
Remove &unused channels
Ongebr&uikte kanalen verwijderen
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Toewijzen aan:
-
+
New mixer Channel
Nieuw FX-kanaal
diff --git a/data/locale/oc.ts b/data/locale/oc.ts
index 045eaf3ad69..be804cfca2b 100644
--- a/data/locale/oc.ts
+++ b/data/locale/oc.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/pl.ts b/data/locale/pl.ts
index ff36a8daca6..3a12f08152f 100644
--- a/data/locale/pl.ts
+++ b/data/locale/pl.ts
@@ -5619,62 +5619,62 @@ Upewnij się, że masz uprawnienia do zapisu do pliku i katalogu zawierającego
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Ilość wysyłania kanału
-
+
Move &left
Przesuń w &lewo
-
+
Move &right
Przesuń w p&rawo
-
+
Rename &channel
Zmień nazwę &kanału
-
+
R&emove channel
Usuń k&anał
-
+
Remove &unused channels
&Usuń nieużywane kanały
-
+
Set channel color
Ustaw kolor kanału
-
+
Remove channel color
Usuń kolor kanału
-
+
Pick random channel color
Ustaw losowy kolor kanału
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Przypisz do:
-
+
New mixer Channel
Nowy kanał efektów
diff --git a/data/locale/pt.ts b/data/locale/pt.ts
index f8cfe76181c..d88d0fa242f 100644
--- a/data/locale/pt.ts
+++ b/data/locale/pt.ts
@@ -5336,62 +5336,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Quantidade de envio de canal
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
Renomear canal
-
+
R&emove channel
Remover canal
-
+
Remove &unused channels
Remover canais não utilizados
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Atribuir a:
-
+
New mixer Channel
Novo Canal FX
diff --git a/data/locale/ro.ts b/data/locale/ro.ts
index 58abbba9959..4823ca57ed4 100644
--- a/data/locale/ro.ts
+++ b/data/locale/ro.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/ru.ts b/data/locale/ru.ts
index 73b7e06ad2e..dee2b848246 100644
--- a/data/locale/ru.ts
+++ b/data/locale/ru.ts
@@ -5348,62 +5348,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Величина отправки канала
-
+
Move &left
Подвинуть в&лево
-
+
Move &right
Подвинуть в&право
-
+
Rename &channel
Пере&именовать канал
-
+
R&emove channel
&Удалить канал
-
+
Remove &unused channels
Удалить &неиспользуемые каналы
-
+
Set channel color
Установить цвет канала
-
+
Remove channel color
Удалить цвет канала
-
+
Pick random channel color
Выбрать случайный цвет канала
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Назначить на:
-
+
New mixer Channel
Новый канал ЭФ
diff --git a/data/locale/sl.ts b/data/locale/sl.ts
index e7bfbc3081c..1aa67d54d6b 100644
--- a/data/locale/sl.ts
+++ b/data/locale/sl.ts
@@ -5333,62 +5333,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
-
+
Move &left
-
+
Move &right
-
+
Rename &channel
-
+
R&emove channel
-
+
Remove &unused channels
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
-
+
New mixer Channel
diff --git a/data/locale/sr.ts b/data/locale/sr.ts
index 183936bc74c..557890f3596 100644
--- a/data/locale/sr.ts
+++ b/data/locale/sr.ts
@@ -2178,7 +2178,7 @@ Please make sure you have write-permission to the file and the directory contain
- MixerLine
+ MixerChannelView
Channel send amount
@@ -7752,7 +7752,7 @@ Please make sure you have read-permission to the file and the directory containi
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
Assign to:
diff --git a/data/locale/sv.ts b/data/locale/sv.ts
index f5d4e0fb496..b40306cac9d 100644
--- a/data/locale/sv.ts
+++ b/data/locale/sv.ts
@@ -5617,62 +5617,62 @@ Se till att du har skrivbehörighet till filen och mappen som innehåller filen
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Kanalsändningsbelopp
-
+
Move &left
Flytta &vänster
-
+
Move &right
Flytta &höger
-
+
Rename &channel
Byt namn på &kanal
-
+
R&emove channel
T&a bort kanal
-
+
Remove &unused channels
Ta bort &oanvända kanaler
-
+
Set channel color
Ställ in kanalfärg
-
+
Remove channel color
Ta bort kanalfärg
-
+
Pick random channel color
Välj slumpmässig kanalfärg
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Tilldela till:
-
+
New mixer Channel
Ny FX-kanal
diff --git a/data/locale/tr.ts b/data/locale/tr.ts
index b899337a543..bd469667f40 100644
--- a/data/locale/tr.ts
+++ b/data/locale/tr.ts
@@ -5619,62 +5619,62 @@ Lütfen dosyaya ve dosyayı içeren dizine yazma izniniz olduğundan emin olun v
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Kanal gönderme miktarı
-
+
Move &left
Sol&a taşı
-
+
Move &right
&Sağa taşı
-
+
Rename &channel
&Kanalı yeniden adlandır
-
+
R&emove channel
Kanalı k&aldır
-
+
Remove &unused channels
&Kullanılmayan kanalları kaldırın
-
+
Set channel color
Kanal rengini ayarla
-
+
Remove channel color
Kanal rengini kaldır
-
+
Pick random channel color
Rastgele kanal rengi seçin
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Ata:
-
+
New mixer Channel
Yeni FX Kanalı
diff --git a/data/locale/uk.ts b/data/locale/uk.ts
index 9fb6389c956..245c433a1b1 100644
--- a/data/locale/uk.ts
+++ b/data/locale/uk.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
Величина відправки каналу
-
+
Move &left
Рухати вліво &L
-
+
Move &right
Рухати вправо &R
-
+
Rename &channel
Перейменувати канал &C
-
+
R&emove channel
Видалити канал &e
-
+
Remove &unused channels
Видалити канали які &не використовуються
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
Призначити до:
-
+
New mixer Channel
Новий ефект каналу
diff --git a/data/locale/zh_CN.ts b/data/locale/zh_CN.ts
index 9b783b963dd..57c08034156 100644
--- a/data/locale/zh_CN.ts
+++ b/data/locale/zh_CN.ts
@@ -5343,62 +5343,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
通道发送的数量
-
+
Move &left
向左移(&L)
-
+
Move &right
向右移(&R)
-
+
Rename &channel
重命名通道(&C)
-
+
R&emove channel
删除通道(&E)
-
+
Remove &unused channels
移除所有未用通道(&U)
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
分配给:
-
+
New mixer Channel
新的效果通道
diff --git a/data/locale/zh_TW.ts b/data/locale/zh_TW.ts
index a3a727edb0b..9348dfb3252 100644
--- a/data/locale/zh_TW.ts
+++ b/data/locale/zh_TW.ts
@@ -5334,62 +5334,62 @@ Please make sure you have write permission to the file and the directory contain
- MixerLine
+ MixerChannelView
-
+
Channel send amount
通道發送的數量
-
+
Move &left
向左移(&L)
-
+
Move &right
向右移(&R)
-
+
Rename &channel
重命名通道(&C)
-
+
R&emove channel
刪除通道(&E)
-
+
Remove &unused channels
移除所有未用通道(&U)
-
+
Set channel color
-
+
Remove channel color
-
+
Pick random channel color
- MixerLineLcdSpinBox
+ MixerChannelLcdSpinBox
-
+
Assign to:
分配給:
-
+
New mixer Channel
新的效果通道
diff --git a/data/themes/classic/style.css b/data/themes/classic/style.css
index 9eeb41993be..3ef39765122 100644
--- a/data/themes/classic/style.css
+++ b/data/themes/classic/style.css
@@ -632,7 +632,7 @@ lmms--gui--ControllerRackView QPushButton {
font-size: 10px;
}
-lmms--gui--MixerLine {
+lmms--gui--MixerChannelView {
background: #5b6571;
color: #e0e0e0;
qproperty-backgroundActive: qlineargradient(spread:reflect, x1:0, y1:0, x2:1, y2:0,
@@ -643,6 +643,11 @@ lmms--gui--MixerLine {
qproperty-strokeInnerInactive: rgba( 255, 255, 255, 50 );
}
+lmms--gui--MixerChannelView QGraphicsView {
+ background: transparent;
+ border-style: none;
+}
+
/* persistent peak markers for fx peak meters */
lmms--gui--Fader {
qproperty-peakGreen: rgb( 74, 253, 133);
diff --git a/data/themes/default/receive_bg_arrow.png b/data/themes/default/receive_bg_arrow.png
index d4961540ad0..368a1bf15a9 100644
Binary files a/data/themes/default/receive_bg_arrow.png and b/data/themes/default/receive_bg_arrow.png differ
diff --git a/data/themes/default/send_bg_arrow.png b/data/themes/default/send_bg_arrow.png
index 05a8c7366b4..311505b6850 100644
Binary files a/data/themes/default/send_bg_arrow.png and b/data/themes/default/send_bg_arrow.png differ
diff --git a/data/themes/default/style.css b/data/themes/default/style.css
index 7963f51a417..3a8f411de78 100644
--- a/data/themes/default/style.css
+++ b/data/themes/default/style.css
@@ -674,7 +674,7 @@ lmms--gui--ControllerRackView QPushButton {
font-size: 10px;
}
-lmms--gui--MixerLine {
+lmms--gui--MixerChannelView {
background: #14161A;
color: #d1d8e4;
qproperty-backgroundActive: #3B424A;
@@ -684,6 +684,11 @@ lmms--gui--MixerLine {
qproperty-strokeInnerInactive: #0C0D0F;
}
+lmms--gui--MixerChannelView QGraphicsView {
+ background: transparent;
+ border-style: none;
+}
+
/* persistent peak markers for fx peak meters */
lmms--gui--Fader {
qproperty-peakGreen: #0ad45c;
diff --git a/include/InstrumentTrackView.h b/include/InstrumentTrackView.h
index d7d5fb83a39..e89a576e916 100644
--- a/include/InstrumentTrackView.h
+++ b/include/InstrumentTrackView.h
@@ -25,7 +25,7 @@
#ifndef LMMS_GUI_INSTRUMENT_TRACK_VIEW_H
#define LMMS_GUI_INSTRUMENT_TRACK_VIEW_H
-#include "MixerLineLcdSpinBox.h"
+#include "MixerChannelLcdSpinBox.h"
#include "TrackView.h"
#include "InstrumentTrack.h"
@@ -99,7 +99,7 @@ private slots:
// widgets in track-settings-widget
TrackLabelButton * m_tlb;
- MixerLineLcdSpinBox* m_mixerChannelNumber;
+ MixerChannelLcdSpinBox* m_mixerChannelNumber;
Knob * m_volumeKnob;
Knob * m_panningKnob;
FadeButton * m_activityIndicator;
diff --git a/include/InstrumentTrackWindow.h b/include/InstrumentTrackWindow.h
index 971c63899c3..48a352cbd30 100644
--- a/include/InstrumentTrackWindow.h
+++ b/include/InstrumentTrackWindow.h
@@ -43,7 +43,7 @@ namespace gui
{
class EffectRackView;
-class MixerLineLcdSpinBox;
+class MixerChannelLcdSpinBox;
class InstrumentFunctionArpeggioView;
class InstrumentFunctionNoteStackingView;
class InstrumentMidiIOView;
@@ -142,7 +142,7 @@ protected slots:
QLabel * m_pitchLabel;
LcdSpinBox* m_pitchRangeSpinBox;
QLabel * m_pitchRangeLabel;
- MixerLineLcdSpinBox * m_mixerChannelNumber;
+ MixerChannelLcdSpinBox * m_mixerChannelNumber;
diff --git a/include/MixerLineLcdSpinBox.h b/include/MixerChannelLcdSpinBox.h
similarity index 74%
rename from include/MixerLineLcdSpinBox.h
rename to include/MixerChannelLcdSpinBox.h
index 1ae2813f292..0abd9f100f1 100644
--- a/include/MixerLineLcdSpinBox.h
+++ b/include/MixerChannelLcdSpinBox.h
@@ -1,5 +1,5 @@
/*
- * MixerLineLcdSpinBox.h - a specialization of LcdSpnBox for setting mixer channels
+ * MixerChannelLcdSpinBox.h - a specialization of LcdSpnBox for setting mixer channels
*
* Copyright (c) 2004-2014 Tobias Doerffel
*
@@ -22,8 +22,8 @@
*
*/
-#ifndef LMMS_GUI_MIXER_LINE_LCD_SPIN_BOX_H
-#define LMMS_GUI_MIXER_LINE_LCD_SPIN_BOX_H
+#ifndef LMMS_GUI_MIXER_CHANNEL_LCD_SPIN_BOX_H
+#define LMMS_GUI_MIXER_CHANNEL_LCD_SPIN_BOX_H
#include "LcdSpinBox.h"
@@ -34,14 +34,14 @@ namespace lmms::gui
class TrackView;
-class MixerLineLcdSpinBox : public LcdSpinBox
+class MixerChannelLcdSpinBox : public LcdSpinBox
{
Q_OBJECT
public:
- MixerLineLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) :
+ MixerChannelLcdSpinBox(int numDigits, QWidget * parent, const QString& name, TrackView * tv = nullptr) :
LcdSpinBox(numDigits, parent, name), m_tv(tv)
{}
- ~MixerLineLcdSpinBox() override = default;
+ ~MixerChannelLcdSpinBox() override = default;
void setTrackView(TrackView * tv);
@@ -56,4 +56,4 @@ class MixerLineLcdSpinBox : public LcdSpinBox
} // namespace lmms::gui
-#endif // LMMS_GUI_MIXER_LINE_LCD_SPIN_BOX_H
+#endif // LMMS_GUI_MIXER_CHANNEL_LCD_SPIN_BOX_H
diff --git a/include/MixerChannelView.h b/include/MixerChannelView.h
new file mode 100644
index 00000000000..8d2306f919f
--- /dev/null
+++ b/include/MixerChannelView.h
@@ -0,0 +1,131 @@
+/*
+ * MixerChannelView.h - the mixer channel view
+ *
+ * Copyright (c) 2022 saker
+ *
+ * This file is part of LMMS - https://lmms.io
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program (see COPYING); if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ */
+
+#ifndef MIXER_CHANNEL_VIEW_H
+#define MIXER_CHANNEL_VIEW_H
+
+#include "EffectRackView.h"
+#include "Fader.h"
+#include "Knob.h"
+#include "LcdWidget.h"
+#include "PixmapButton.h"
+#include "SendButtonIndicator.h"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace lmms::gui
+{
+ constexpr int MIXER_CHANNEL_INNER_BORDER_SIZE = 3;
+ constexpr int MIXER_CHANNEL_OUTER_BORDER_SIZE = 1;
+
+ class MixerChannelView : public QWidget
+ {
+ Q_OBJECT
+ Q_PROPERTY(QBrush backgroundActive READ backgroundActive WRITE setBackgroundActive)
+ Q_PROPERTY(QColor strokeOuterActive READ strokeOuterActive WRITE setStrokeOuterActive)
+ Q_PROPERTY(QColor strokeOuterInactive READ strokeOuterInactive WRITE setStrokeOuterInactive)
+ Q_PROPERTY(QColor strokeInnerActive READ strokeInnerActive WRITE setStrokeInnerActive)
+ Q_PROPERTY(QColor strokeInnerInactive READ strokeInnerInactive WRITE setStrokeInnerInactive)
+ public:
+ enum class SendReceiveState
+ {
+ None, SendToThis, ReceiveFromThis
+ };
+
+ MixerChannelView(QWidget* parent, MixerView* mixerView, int channelIndex);
+ void paintEvent(QPaintEvent* event) override;
+ void contextMenuEvent(QContextMenuEvent*) override;
+ void mousePressEvent(QMouseEvent*) override;
+ void mouseDoubleClickEvent(QMouseEvent*) override;
+ bool eventFilter(QObject* dist, QEvent* event) override;
+
+ int channelIndex() const;
+ void setChannelIndex(int index);
+
+ SendReceiveState sendReceiveState() const;
+ void setSendReceiveState(const SendReceiveState& state);
+
+ QBrush backgroundActive() const;
+ void setBackgroundActive(const QBrush& c);
+
+ QColor strokeOuterActive() const;
+ void setStrokeOuterActive(const QColor& c);
+
+ QColor strokeOuterInactive() const;
+ void setStrokeOuterInactive(const QColor& c);
+
+ QColor strokeInnerActive() const;
+ void setStrokeInnerActive(const QColor& c);
+
+ QColor strokeInnerInactive() const;
+ void setStrokeInnerInactive(const QColor& c);
+
+ public slots:
+ void renameChannel();
+ void resetColor();
+ void selectColor();
+ void randomizeColor();
+
+ private slots:
+ void renameFinished();
+ void removeChannel();
+ void removeUnusedChannels();
+ void moveChannelLeft();
+ void moveChannelRight();
+
+ private:
+ QString elideName(const QString& name);
+
+ private:
+ SendButtonIndicator* m_sendButton;
+ Knob* m_sendKnob;
+ LcdWidget* m_channelNumberLcd;
+ QLineEdit* m_renameLineEdit;
+ QGraphicsView* m_renameLineEditView;
+ QLabel* m_sendArrow;
+ QLabel* m_receiveArrow;
+ PixmapButton* m_muteButton;
+ PixmapButton* m_soloButton;
+ Fader* m_fader;
+ EffectRackView* m_effectRackView;
+ MixerView* m_mixerView;
+ SendReceiveState m_sendReceiveState = SendReceiveState::None;
+ int m_channelIndex = 0;
+ bool m_inRename = false;
+
+ QBrush m_backgroundActive;
+ QColor m_strokeOuterActive;
+ QColor m_strokeOuterInactive;
+ QColor m_strokeInnerActive;
+ QColor m_strokeInnerInactive;
+
+ friend class MixerView;
+ };
+} // namespace lmms::gui
+
+#endif
\ No newline at end of file
diff --git a/include/MixerLine.h b/include/MixerLine.h
deleted file mode 100644
index 655b30ec371..00000000000
--- a/include/MixerLine.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * MixerLine.h - Mixer line widget
- *
- * Copyright (c) 2009 Andrew Kelley
- * Copyright (c) 2014 Tobias Doerffel
- *
- * This file is part of LMMS - https://lmms.io
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program (see COPYING); if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- */
-
-#ifndef LMMS_GUI_MIXER_LINE_H
-#define LMMS_GUI_MIXER_LINE_H
-
-#include
-
-class QGraphicsView;
-class QLineEdit;
-
-namespace lmms::gui
-{
-
-
-class Knob;
-class LcdWidget;
-class MixerView;
-class SendButtonIndicator;
-
-class MixerLine : public QWidget
-{
- Q_OBJECT
-public:
- Q_PROPERTY( QBrush backgroundActive READ backgroundActive WRITE setBackgroundActive )
- Q_PROPERTY( QColor strokeOuterActive READ strokeOuterActive WRITE setStrokeOuterActive )
- Q_PROPERTY( QColor strokeOuterInactive READ strokeOuterInactive WRITE setStrokeOuterInactive )
- Q_PROPERTY( QColor strokeInnerActive READ strokeInnerActive WRITE setStrokeInnerActive )
- Q_PROPERTY( QColor strokeInnerInactive READ strokeInnerInactive WRITE setStrokeInnerInactive )
- MixerLine( QWidget * _parent, MixerView * _mv, int _channelIndex);
- ~MixerLine() override;
-
- void paintEvent( QPaintEvent * ) override;
- void mousePressEvent( QMouseEvent * ) override;
- void mouseDoubleClickEvent( QMouseEvent * ) override;
- void contextMenuEvent( QContextMenuEvent * ) override;
-
- inline int channelIndex() { return m_channelIndex; }
- void setChannelIndex(int index);
-
- Knob * m_sendKnob;
- SendButtonIndicator * m_sendBtn;
-
- QBrush backgroundActive() const;
- void setBackgroundActive( const QBrush & c );
-
- QColor strokeOuterActive() const;
- void setStrokeOuterActive( const QColor & c );
-
- QColor strokeOuterInactive() const;
- void setStrokeOuterInactive( const QColor & c );
-
- QColor strokeInnerActive() const;
- void setStrokeInnerActive( const QColor & c );
-
- QColor strokeInnerInactive() const;
- void setStrokeInnerInactive( const QColor & c );
-
- static const int MixerLineHeight;
-
- bool eventFilter (QObject *dist, QEvent *event) override;
-
-private:
- void drawMixerLine( QPainter* p, const MixerLine *mixerLine, bool isActive, bool sendToThis, bool receiveFromThis );
- QString elideName( const QString & name );
-
- MixerView * m_mv;
- LcdWidget* m_lcd;
- int m_channelIndex;
- QBrush m_backgroundActive;
- QColor m_strokeOuterActive;
- QColor m_strokeOuterInactive;
- QColor m_strokeInnerActive;
- QColor m_strokeInnerInactive;
- bool m_inRename;
- QLineEdit * m_renameLineEdit;
- QGraphicsView * m_view;
-
-public slots:
- void renameChannel();
- void resetColor();
- void selectColor();
- void randomizeColor();
-
-private slots:
- void renameFinished();
- void removeChannel();
- void removeUnusedChannels();
- void moveChannelLeft();
- void moveChannelRight();
-};
-
-
-} // namespace lmms::gui
-
-#endif // LMMS_GUI_MIXER_LINE_H
diff --git a/include/MixerView.h b/include/MixerView.h
index 2bb5ed4170f..a477864810e 100644
--- a/include/MixerView.h
+++ b/include/MixerView.h
@@ -2,7 +2,7 @@
* MixerView.h - effect-mixer-view for LMMS
*
* Copyright (c) 2008-2014 Tobias Doerffel
- *
+ *
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@
#include
#include
+#include "MixerChannelView.h"
#include "ModelView.h"
#include "Engine.h"
#include "Fader.h"
@@ -37,61 +38,38 @@
#include "embed.h"
#include "EffectRackView.h"
-class QButtonGroup;
-
-
namespace lmms::gui
{
-
-class MixerLine;
-
class LMMS_EXPORT MixerView : public QWidget, public ModelView,
public SerializingObjectHook
{
Q_OBJECT
public:
- class MixerChannelView
- {
- public:
- MixerChannelView(QWidget * _parent, MixerView * _mv, int _chIndex );
-
- void setChannelIndex( int index );
-
- MixerLine * m_mixerLine;
- PixmapButton * m_muteBtn;
- PixmapButton * m_soloBtn;
- Fader * m_fader;
- EffectRackView * m_rackView;
- };
-
-
MixerView();
- ~MixerView() override;
-
- void keyPressEvent(QKeyEvent * e) override;
+ void keyPressEvent(QKeyEvent* e) override;
- void saveSettings( QDomDocument & _doc, QDomElement & _this ) override;
- void loadSettings( const QDomElement & _this ) override;
+ void saveSettings(QDomDocument& doc, QDomElement& domElement) override;
+ void loadSettings(const QDomElement& domElement) override;
- inline MixerLine * currentMixerLine()
+ inline MixerChannelView* currentMixerChannel()
{
- return m_currentMixerLine;
+ return m_currentMixerChannel;
}
- inline MixerChannelView * channelView(int index)
+ inline MixerChannelView* channelView(int index)
{
return m_mixerChannelViews[index];
}
- void setCurrentMixerLine( MixerLine * _line );
- void setCurrentMixerLine( int _line );
+ void setCurrentMixerChannel(MixerChannelView* channel);
+ void setCurrentMixerChannel(int channel);
void clear();
// display the send button and knob correctly
- void updateMixerLine(int index);
+ void updateMixerChannel(int index);
// notify the view that a mixer channel was deleted
void deleteChannel(int index);
@@ -115,22 +93,22 @@ public slots:
int addNewChannel();
protected:
- void closeEvent( QCloseEvent * _ce ) override;
-
+ void closeEvent(QCloseEvent* ce) override;
+
private slots:
void updateFaders();
void toggledSolo();
private:
- QVector m_mixerChannelViews;
+ QVector m_mixerChannelViews;
- MixerLine * m_currentMixerLine;
+ MixerChannelView* m_currentMixerChannel;
- QScrollArea * channelArea;
- QHBoxLayout * chLayout;
- QWidget * m_channelAreaWidget;
- QStackedLayout * m_racksLayout;
- QWidget * m_racksWidget;
+ QScrollArea* channelArea;
+ QHBoxLayout* chLayout;
+ QWidget* m_channelAreaWidget;
+ QStackedLayout* m_racksLayout;
+ QWidget* m_racksWidget;
void updateMaxChannelSelector();
diff --git a/include/SampleTrackView.h b/include/SampleTrackView.h
index 3ccb97aeaa9..2f94bfb5630 100644
--- a/include/SampleTrackView.h
+++ b/include/SampleTrackView.h
@@ -26,7 +26,7 @@
#define LMMS_GUI_SAMPLE_TRACK_VIEW_H
-#include "MixerLineLcdSpinBox.h"
+#include "MixerChannelLcdSpinBox.h"
#include "TrackView.h"
namespace lmms
@@ -91,7 +91,7 @@ private slots:
private:
SampleTrackWindow * m_window;
- MixerLineLcdSpinBox* m_mixerChannelNumber;
+ MixerChannelLcdSpinBox* m_mixerChannelNumber;
Knob * m_volumeKnob;
Knob * m_panningKnob;
FadeButton * m_activityIndicator;
diff --git a/include/SampleTrackWindow.h b/include/SampleTrackWindow.h
index c2a722d53ab..4d535bfe529 100644
--- a/include/SampleTrackWindow.h
+++ b/include/SampleTrackWindow.h
@@ -38,7 +38,7 @@ namespace lmms::gui
class EffectRackView;
class Knob;
-class MixerLineLcdSpinBox;
+class MixerChannelLcdSpinBox;
class SampleTrackView;
@@ -90,7 +90,7 @@ public slots:
QLineEdit * m_nameLineEdit;
Knob * m_volumeKnob;
Knob * m_panningKnob;
- MixerLineLcdSpinBox * m_mixerChannelNumber;
+ MixerChannelLcdSpinBox * m_mixerChannelNumber;
EffectRackView * m_effectRack;
} ;
diff --git a/include/SendButtonIndicator.h b/include/SendButtonIndicator.h
index 86f38318feb..9e941792648 100644
--- a/include/SendButtonIndicator.h
+++ b/include/SendButtonIndicator.h
@@ -37,27 +37,25 @@ class FloatModel;
namespace gui
{
-class MixerLine;
+class MixerChannelView;
class MixerView;
-
-class SendButtonIndicator : public QLabel
+class SendButtonIndicator : public QLabel
{
public:
- SendButtonIndicator( QWidget * _parent, MixerLine * _owner,
- MixerView * _mv);
+ SendButtonIndicator(QWidget* parent, MixerChannelView* owner, MixerView* mv);
- void mousePressEvent( QMouseEvent * e ) override;
+ void mousePressEvent(QMouseEvent* e) override;
void updateLightStatus();
private:
- MixerLine * m_parent;
- MixerView * m_mv;
+ MixerChannelView* m_parent;
+ MixerView* m_mv;
QPixmap m_qpmOff = embed::getIconPixmap("mixer_send_off", 29, 20);
QPixmap m_qpmOn = embed::getIconPixmap("mixer_send_on", 29, 20);
- FloatModel * getSendModel();
+ FloatModel* getSendModel();
};
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index ac010f4f4fa..001c92c79a6 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -27,7 +27,7 @@ SET(LMMS_SRCS
gui/MicrotunerConfig.cpp
gui/MidiCCRackView.cpp
gui/MidiSetupWidget.cpp
- gui/MixerLine.cpp
+ gui/MixerChannelView.cpp
gui/MixerView.cpp
gui/ModelView.cpp
gui/PeakControllerDialog.cpp
@@ -113,7 +113,7 @@ SET(LMMS_SRCS
gui/widgets/LedCheckBox.cpp
gui/widgets/LeftRightNav.cpp
gui/widgets/MeterDialog.cpp
- gui/widgets/MixerLineLcdSpinBox.cpp
+ gui/widgets/MixerChannelLcdSpinBox.cpp
gui/widgets/NStateButton.cpp
gui/widgets/Oscilloscope.cpp
gui/widgets/PixmapButton.cpp
diff --git a/src/gui/MixerChannelView.cpp b/src/gui/MixerChannelView.cpp
new file mode 100644
index 00000000000..0f8ccedeac8
--- /dev/null
+++ b/src/gui/MixerChannelView.cpp
@@ -0,0 +1,447 @@
+/*
+ * MixerChannelView.h - the mixer channel view
+ *
+ * Copyright (c) 2022 saker
+ *
+ * This file is part of LMMS - https://lmms.io
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program (see COPYING); if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ */
+
+#include "CaptionMenu.h"
+#include "ColorChooser.h"
+#include "GuiApplication.h"
+#include "Mixer.h"
+#include "MixerChannelView.h"
+#include "MixerView.h"
+#include "Song.h"
+
+#include "gui_templates.h"
+#include "lmms_math.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+namespace lmms::gui
+{
+ MixerChannelView::MixerChannelView(QWidget* parent, MixerView* mixerView, int channelIndex) :
+ QWidget(parent),
+ m_mixerView(mixerView),
+ m_channelIndex(channelIndex)
+ {
+ setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
+
+ auto retainSizeWhenHidden = [](QWidget* widget)
+ {
+ auto sizePolicy = widget->sizePolicy();
+ sizePolicy.setRetainSizeWhenHidden(true);
+ widget->setSizePolicy(sizePolicy);
+ };
+
+ m_sendButton = new SendButtonIndicator{this, this, mixerView};
+ retainSizeWhenHidden(m_sendButton);
+
+ m_sendKnob = new Knob{KnobType::Bright26, this, tr("Channel send amount")};
+ retainSizeWhenHidden(m_sendKnob);
+
+ m_channelNumberLcd = new LcdWidget{2, this};
+ m_channelNumberLcd->setValue(channelIndex);
+ retainSizeWhenHidden(m_channelNumberLcd);
+
+ const auto mixerChannel = Engine::mixer()->mixerChannel(channelIndex);
+ const auto mixerName = mixerChannel->m_name;
+ setToolTip(mixerName);
+
+ m_renameLineEdit = new QLineEdit{mixerName, nullptr};
+ m_renameLineEdit->setFixedWidth(65);
+ m_renameLineEdit->setFont(pointSizeF(font(), 7.5f));
+ m_renameLineEdit->setReadOnly(true);
+ m_renameLineEdit->installEventFilter(this);
+
+ auto renameLineEditScene = new QGraphicsScene{};
+ m_renameLineEditView = new QGraphicsView{};
+ m_renameLineEditView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ m_renameLineEditView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ m_renameLineEditView->setAttribute(Qt::WA_TransparentForMouseEvents, true);
+ m_renameLineEditView->setScene(renameLineEditScene);
+
+ auto renameLineEditProxy = renameLineEditScene->addWidget(m_renameLineEdit);
+ renameLineEditProxy->setRotation(-90);
+ m_renameLineEditView->setFixedSize(m_renameLineEdit->height() + 5, m_renameLineEdit->width() + 5);
+
+ m_sendArrow = new QLabel{};
+ m_sendArrow->setPixmap(embed::getIconPixmap("send_bg_arrow"));
+ retainSizeWhenHidden(m_sendArrow);
+ m_sendArrow->setVisible(m_sendReceiveState == SendReceiveState::SendToThis);
+
+ m_receiveArrow = new QLabel{};
+ m_receiveArrow->setPixmap(embed::getIconPixmap("receive_bg_arrow"));
+ retainSizeWhenHidden(m_receiveArrow);
+ m_receiveArrow->setVisible(m_sendReceiveState == SendReceiveState::ReceiveFromThis);
+
+ m_muteButton = new PixmapButton(this, tr("Mute"));
+ m_muteButton->setModel(&mixerChannel->m_muteModel);
+ m_muteButton->setActiveGraphic(embed::getIconPixmap("led_off"));
+ m_muteButton->setInactiveGraphic(embed::getIconPixmap("led_green"));
+ m_muteButton->setCheckable(true);
+ m_muteButton->setToolTip(tr("Mute this channel"));
+
+ m_soloButton = new PixmapButton(this, tr("Solo"));
+ m_soloButton->setModel(&mixerChannel->m_soloModel);
+ m_soloButton->setActiveGraphic(embed::getIconPixmap("led_red"));
+ m_soloButton->setInactiveGraphic(embed::getIconPixmap("led_off"));
+ m_soloButton->setCheckable(true);
+ m_soloButton->setToolTip(tr("Solo this channel"));
+ connect(&mixerChannel->m_soloModel, &BoolModel::dataChanged, mixerView, &MixerView::toggledSolo, Qt::DirectConnection);
+
+ QVBoxLayout* soloMuteLayout = new QVBoxLayout();
+ soloMuteLayout->setContentsMargins(0, 0, 0, 0);
+ soloMuteLayout->setSpacing(0);
+ soloMuteLayout->addWidget(m_soloButton, 0, Qt::AlignHCenter);
+ soloMuteLayout->addWidget(m_muteButton, 0, Qt::AlignHCenter);
+
+ m_fader = new Fader{&mixerChannel->m_volumeModel, tr("Fader %1").arg(channelIndex), this};
+ m_fader->setLevelsDisplayedInDBFS();
+ m_fader->setMinPeak(dbfsToAmp(-42));
+ m_fader->setMaxPeak(dbfsToAmp(9));
+
+ m_effectRackView = new EffectRackView{&mixerChannel->m_fxChain, mixerView->m_racksWidget};
+ m_effectRackView->setFixedWidth(EffectRackView::DEFAULT_WIDTH);
+
+ auto mainLayout = new QVBoxLayout{this};
+ mainLayout->setContentsMargins(4, 4, 4, 4);
+ mainLayout->addWidget(m_receiveArrow, 0, Qt::AlignHCenter);
+ mainLayout->addWidget(m_sendButton, 0, Qt::AlignHCenter);
+ mainLayout->addWidget(m_sendKnob, 0, Qt::AlignHCenter);
+ mainLayout->addWidget(m_sendArrow, 0, Qt::AlignHCenter);
+ mainLayout->addWidget(m_channelNumberLcd, 0, Qt::AlignHCenter);
+ mainLayout->addStretch();
+ mainLayout->addWidget(m_renameLineEditView, 0, Qt::AlignHCenter);
+ mainLayout->addLayout(soloMuteLayout, 0);
+ mainLayout->addWidget(m_fader, 0, Qt::AlignHCenter);
+
+ connect(m_renameLineEdit, &QLineEdit::editingFinished, this, &MixerChannelView::renameFinished);
+ }
+
+ void MixerChannelView::contextMenuEvent(QContextMenuEvent*)
+ {
+ auto contextMenu = new CaptionMenu(Engine::mixer()->mixerChannel(m_channelIndex)->m_name, this);
+
+ if (m_channelIndex != 0) // no move-options in master
+ {
+ contextMenu->addAction(tr("Move &left"), this, &MixerChannelView::moveChannelLeft);
+ contextMenu->addAction(tr("Move &right"), this, &MixerChannelView::moveChannelRight);
+ }
+
+ contextMenu->addAction(tr("Rename &channel"), this, &MixerChannelView::renameChannel);
+ contextMenu->addSeparator();
+
+ if (m_channelIndex != 0) // no remove-option in master
+ {
+ contextMenu->addAction(embed::getIconPixmap("cancel"), tr("R&emove channel"), this, &MixerChannelView::removeChannel);
+ contextMenu->addSeparator();
+ }
+
+ contextMenu->addAction(embed::getIconPixmap("cancel"), tr("Remove &unused channels"), this, &MixerChannelView::removeUnusedChannels);
+ contextMenu->addSeparator();
+
+ auto colorMenu = QMenu{tr("Color"), this};
+ colorMenu.setIcon(embed::getIconPixmap("colorize"));
+ colorMenu.addAction(tr("Change"), this, &MixerChannelView::selectColor);
+ colorMenu.addAction(tr("Reset"), this, &MixerChannelView::resetColor);
+ colorMenu.addAction(tr("Pick random"), this, &MixerChannelView::randomizeColor);
+ contextMenu->addMenu(&colorMenu);
+
+ contextMenu->exec(QCursor::pos());
+ delete contextMenu;
+ }
+
+ void MixerChannelView::paintEvent(QPaintEvent* event)
+ {
+ auto * mixer = Engine::mixer();
+ const auto channel = mixer->mixerChannel(m_channelIndex);
+ const bool muted = channel->m_muteModel.value();
+ const auto name = channel->m_name;
+ const auto elidedName = elideName(name);
+ const auto * mixerChannelView = m_mixerView->currentMixerChannel();
+ const auto isActive = mixerChannelView == this;
+
+ if (!m_inRename && m_renameLineEdit->text() != elidedName)
+ {
+ m_renameLineEdit->setText(elidedName);
+ }
+
+ const auto width = rect().width();
+ const auto height = rect().height();
+ auto painter = QPainter{this};
+
+ if (channel->color().has_value() && !muted)
+ {
+ painter.fillRect(rect(), channel->color()->darker(isActive ? 120 : 150));
+ }
+ else
+ {
+ painter.fillRect(rect(), isActive ? backgroundActive().color() : painter.background().color());
+ }
+
+ // inner border
+ painter.setPen(isActive ? strokeInnerActive() : strokeInnerInactive());
+ painter.drawRect(1, 1, width - MIXER_CHANNEL_INNER_BORDER_SIZE, height - MIXER_CHANNEL_INNER_BORDER_SIZE);
+
+ // outer border
+ painter.setPen(isActive ? strokeOuterActive() : strokeOuterInactive());
+ painter.drawRect(0, 0, width - MIXER_CHANNEL_OUTER_BORDER_SIZE, height - MIXER_CHANNEL_OUTER_BORDER_SIZE);
+
+ const auto & currentMixerChannelIndex = mixerChannelView->m_channelIndex;
+ const auto sendToThis = mixer->channelSendModel(currentMixerChannelIndex, m_channelIndex) != nullptr;
+ const auto receiveFromThis = mixer->channelSendModel(m_channelIndex, currentMixerChannelIndex) != nullptr;
+ const auto sendReceiveStateNone = !sendToThis && !receiveFromThis;
+
+ // Only one or none of them can be on
+ assert(sendToThis ^ receiveFromThis || sendReceiveStateNone);
+
+ m_sendArrow->setVisible(sendToThis);
+ m_receiveArrow->setVisible(receiveFromThis);
+
+ if (sendReceiveStateNone)
+ {
+ setSendReceiveState(SendReceiveState::None);
+ }
+ else
+ {
+ setSendReceiveState(sendToThis ? SendReceiveState::SendToThis : SendReceiveState::ReceiveFromThis);
+ }
+
+ QWidget::paintEvent(event);
+ }
+
+ void MixerChannelView::mousePressEvent(QMouseEvent*)
+ {
+ if (m_mixerView->currentMixerChannel() != this)
+ {
+ m_mixerView->setCurrentMixerChannel(this);
+ }
+ }
+
+ void MixerChannelView::mouseDoubleClickEvent(QMouseEvent*)
+ {
+ renameChannel();
+ }
+
+ bool MixerChannelView::eventFilter(QObject* dist, QEvent* event)
+ {
+ // If we are in a rename, capture the enter/return events and handle them
+ if (event->type() == QEvent::KeyPress)
+ {
+ auto keyEvent = static_cast(event);
+ if (keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return)
+ {
+ if (m_inRename)
+ {
+ renameFinished();
+ event->accept(); // Stop the event from propagating
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ int MixerChannelView::channelIndex() const
+ {
+ return m_channelIndex;
+ }
+
+ void MixerChannelView::setChannelIndex(int index)
+ {
+ MixerChannel* mixerChannel = Engine::mixer()->mixerChannel(index);
+ m_fader->setModel(&mixerChannel->m_volumeModel);
+ m_muteButton->setModel(&mixerChannel->m_muteModel);
+ m_soloButton->setModel(&mixerChannel->m_soloModel);
+ m_effectRackView->setModel(&mixerChannel->m_fxChain);
+ m_channelIndex = index;
+ }
+
+ MixerChannelView::SendReceiveState MixerChannelView::sendReceiveState() const
+ {
+ return m_sendReceiveState;
+ }
+
+ void MixerChannelView::setSendReceiveState(const SendReceiveState& state)
+ {
+ m_sendReceiveState = state;
+ m_sendArrow->setVisible(state == SendReceiveState::SendToThis);
+ m_receiveArrow->setVisible(state == SendReceiveState::ReceiveFromThis);
+ }
+
+ QBrush MixerChannelView::backgroundActive() const
+ {
+ return m_backgroundActive;
+ }
+
+ void MixerChannelView::setBackgroundActive(const QBrush& c)
+ {
+ m_backgroundActive = c;
+ }
+
+ QColor MixerChannelView::strokeOuterActive() const
+ {
+ return m_strokeOuterActive;
+ }
+
+ void MixerChannelView::setStrokeOuterActive(const QColor& c)
+ {
+ m_strokeOuterActive = c;
+ }
+
+ QColor MixerChannelView::strokeOuterInactive() const
+ {
+ return m_strokeOuterInactive;
+ }
+
+ void MixerChannelView::setStrokeOuterInactive(const QColor& c)
+ {
+ m_strokeOuterInactive = c;
+ }
+
+ QColor MixerChannelView::strokeInnerActive() const
+ {
+ return m_strokeInnerActive;
+ }
+
+ void MixerChannelView::setStrokeInnerActive(const QColor& c)
+ {
+ m_strokeInnerActive = c;
+ }
+
+ QColor MixerChannelView::strokeInnerInactive() const
+ {
+ return m_strokeInnerInactive;
+ }
+
+ void MixerChannelView::setStrokeInnerInactive(const QColor& c)
+ {
+ m_strokeInnerInactive = c;
+ }
+
+ void MixerChannelView::renameChannel()
+ {
+ m_inRename = true;
+ setToolTip("");
+ m_renameLineEdit->setReadOnly(false);
+
+ m_channelNumberLcd->hide();
+ m_renameLineEdit->setFixedWidth(m_renameLineEdit->width());
+ m_renameLineEdit->setText(Engine::mixer()->mixerChannel(m_channelIndex)->m_name);
+
+ m_renameLineEditView->setFocus();
+ m_renameLineEdit->selectAll();
+ m_renameLineEdit->setFocus();
+ }
+
+ void MixerChannelView::renameFinished()
+ {
+ m_inRename = false;
+
+ m_renameLineEdit->deselect();
+ m_renameLineEdit->setReadOnly(true);
+ m_renameLineEdit->setFixedWidth(m_renameLineEdit->width());
+ m_channelNumberLcd->show();
+
+ auto newName = m_renameLineEdit->text();
+ setFocus();
+
+ const auto mixerChannel = Engine::mixer()->mixerChannel(m_channelIndex);
+ if (!newName.isEmpty() && mixerChannel->m_name != newName)
+ {
+ mixerChannel->m_name = newName;
+ m_renameLineEdit->setText(elideName(newName));
+ Engine::getSong()->setModified();
+ }
+
+ setToolTip(mixerChannel->m_name);
+ }
+
+ void MixerChannelView::resetColor()
+ {
+ Engine::mixer()->mixerChannel(m_channelIndex)->setColor(std::nullopt);
+ Engine::getSong()->setModified();
+ update();
+ }
+
+ void MixerChannelView::selectColor()
+ {
+ const auto channel = Engine::mixer()->mixerChannel(m_channelIndex);
+
+ const auto initialColor = channel->color().value_or(backgroundActive().color());
+ const auto * colorChooser = ColorChooser{this}.withPalette(ColorChooser::Palette::Mixer);
+ const auto newColor = colorChooser->getColor(initialColor);
+
+ if (!newColor.isValid()) { return; }
+
+ channel->setColor(newColor);
+
+ Engine::getSong()->setModified();
+ update();
+ }
+
+ void MixerChannelView::randomizeColor()
+ {
+ auto channel = Engine::mixer()->mixerChannel(m_channelIndex);
+ channel->setColor(ColorChooser::getPalette(ColorChooser::Palette::Mixer)[rand() % 48]);
+ Engine::getSong()->setModified();
+ update();
+ }
+
+ void MixerChannelView::removeChannel()
+ {
+ auto mix = getGUI()->mixerView();
+ mix->deleteChannel(m_channelIndex);
+ }
+
+ void MixerChannelView::removeUnusedChannels()
+ {
+ auto mix = getGUI()->mixerView();
+ mix->deleteUnusedChannels();
+ }
+
+ void MixerChannelView::moveChannelLeft()
+ {
+ auto mix = getGUI()->mixerView();
+ mix->moveChannelLeft(m_channelIndex);
+ }
+
+ void MixerChannelView::moveChannelRight()
+ {
+ auto mix = getGUI()->mixerView();
+ mix->moveChannelRight(m_channelIndex);
+ }
+
+ QString MixerChannelView::elideName(const QString& name)
+ {
+ const auto maxTextHeight = m_renameLineEdit->width();
+ const auto metrics = QFontMetrics{m_renameLineEdit->font()};
+ const auto elidedName = metrics.elidedText(name, Qt::ElideRight, maxTextHeight);
+ return elidedName;
+ }
+
+} // namespace lmms::gui
\ No newline at end of file
diff --git a/src/gui/MixerLine.cpp b/src/gui/MixerLine.cpp
deleted file mode 100644
index 182e131d3b8..00000000000
--- a/src/gui/MixerLine.cpp
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * MixerLine.cpp - Mixer line widget
- *
- * Copyright (c) 2009 Andrew Kelley
- * Copyright (c) 2014 Tobias Doerffel
- *
- * This file is part of LMMS - https://lmms.io
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program (see COPYING); if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- */
-
-#include "MixerLine.h"
-
-#include
-
-#include
-#include
-#include
-#include
-
-#include "CaptionMenu.h"
-#include "ColorChooser.h"
-#include "embed.h"
-#include "Knob.h"
-#include "LcdWidget.h"
-#include "Mixer.h"
-#include "MixerView.h"
-#include "gui_templates.h"
-#include "GuiApplication.h"
-#include "SendButtonIndicator.h"
-#include "Song.h"
-
-namespace lmms::gui
-{
-
-
-bool MixerLine::eventFilter( QObject *dist, QEvent *event )
-{
- // If we are in a rename, capture the enter/return events and handle them
- if ( event->type() == QEvent::KeyPress )
- {
- auto keyEvent = static_cast(event);
- if( keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return )
- {
- if( m_inRename )
- {
- renameFinished();
- event->accept(); // Stop the event from propagating
- return true;
- }
- }
- }
- return false;
-}
-
-const int MixerLine::MixerLineHeight = 287;
-
-MixerLine::MixerLine( QWidget * _parent, MixerView * _mv, int _channelIndex ) :
- QWidget( _parent ),
- m_mv( _mv ),
- m_channelIndex( _channelIndex ),
- m_backgroundActive( Qt::SolidPattern ),
- m_strokeOuterActive( 0, 0, 0 ),
- m_strokeOuterInactive( 0, 0, 0 ),
- m_strokeInnerActive( 0, 0, 0 ),
- m_strokeInnerInactive( 0, 0, 0 ),
- m_inRename( false )
-{
- setFixedSize( 33, MixerLineHeight );
- setAttribute( Qt::WA_OpaquePaintEvent, true );
- setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) );
-
- // mixer sends knob
- m_sendKnob = new Knob( KnobType::Bright26, this, tr( "Channel send amount" ) );
- m_sendKnob->move( 3, 22 );
- m_sendKnob->setVisible( false );
-
- // send button indicator
- m_sendBtn = new SendButtonIndicator( this, this, m_mv );
- m_sendBtn->move( 2, 2 );
-
- // channel number
- m_lcd = new LcdWidget( 2, this );
- m_lcd->setValue( m_channelIndex );
- m_lcd->move( 4, 58 );
- m_lcd->setMarginWidth( 1 );
-
- QString name = Engine::mixer()->mixerChannel( m_channelIndex )->m_name;
- setToolTip( name );
-
- m_renameLineEdit = new QLineEdit();
- m_renameLineEdit->setText( name );
- m_renameLineEdit->setFixedWidth( 65 );
- m_renameLineEdit->setFont( pointSizeF( font(), 7.5f ) );
- m_renameLineEdit->setReadOnly( true );
- m_renameLineEdit->installEventFilter( this );
-
- auto scene = new QGraphicsScene();
- scene->setSceneRect( 0, 0, 33, MixerLineHeight );
-
- m_view = new QGraphicsView( this );
- m_view->setStyleSheet( "border-style: none; background: transparent;" );
- m_view->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
- m_view->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
- m_view->setAttribute( Qt::WA_TransparentForMouseEvents, true );
- m_view->setScene( scene );
-
- QGraphicsProxyWidget * proxyWidget = scene->addWidget( m_renameLineEdit );
- proxyWidget->setRotation( -90 );
- proxyWidget->setPos( 8, 145 );
-
- connect( m_renameLineEdit, SIGNAL(editingFinished()), this, SLOT(renameFinished()));
- connect( &Engine::mixer()->mixerChannel( m_channelIndex )->m_muteModel, SIGNAL(dataChanged()), this, SLOT(update()));
-}
-
-
-
-
-MixerLine::~MixerLine()
-{
- delete m_sendKnob;
- delete m_sendBtn;
- delete m_lcd;
-}
-
-
-
-
-void MixerLine::setChannelIndex( int index )
-{
- m_channelIndex = index;
- m_lcd->setValue( m_channelIndex );
- m_lcd->update();
-}
-
-
-
-void MixerLine::drawMixerLine( QPainter* p, const MixerLine *mixerLine, bool isActive, bool sendToThis, bool receiveFromThis )
-{
- auto channel = Engine::mixer()->mixerChannel( m_channelIndex );
- bool muted = channel->m_muteModel.value();
- QString name = channel->m_name;
- QString elidedName = elideName( name );
- if( !m_inRename && m_renameLineEdit->text() != elidedName )
- {
- m_renameLineEdit->setText( elidedName );
- }
-
- int width = mixerLine->rect().width();
- int height = mixerLine->rect().height();
-
- if (channel->color().has_value() && !muted)
- {
- p->fillRect(mixerLine->rect(), channel->color()->darker(isActive ? 120 : 150));
- }
- else
- {
- p->fillRect( mixerLine->rect(),
- isActive ? mixerLine->backgroundActive().color() : p->background().color() );
- }
-
- // inner border
- p->setPen( isActive ? mixerLine->strokeInnerActive() : mixerLine->strokeInnerInactive() );
- p->drawRect( 1, 1, width-3, height-3 );
-
- // outer border
- p->setPen( isActive ? mixerLine->strokeOuterActive() : mixerLine->strokeOuterInactive() );
- p->drawRect( 0, 0, width-1, height-1 );
-
- // draw the mixer send background
-
- static auto s_sendBgArrow = embed::getIconPixmap("send_bg_arrow", 29, 56);
- static auto s_receiveBgArrow = embed::getIconPixmap("receive_bg_arrow", 29, 56);
- p->drawPixmap(2, 0, 29, 56, sendToThis ? s_sendBgArrow : s_receiveBgArrow);
-}
-
-
-
-
-QString MixerLine::elideName( const QString & name )
-{
- const int maxTextHeight = 60;
- QFontMetrics metrics( m_renameLineEdit->font() );
- QString elidedName = metrics.elidedText( name, Qt::ElideRight, maxTextHeight );
- return elidedName;
-}
-
-
-
-
-void MixerLine::paintEvent( QPaintEvent * )
-{
- bool sendToThis = Engine::mixer()->channelSendModel( m_mv->currentMixerLine()->m_channelIndex, m_channelIndex ) != nullptr;
- bool receiveFromThis = Engine::mixer()->channelSendModel( m_channelIndex, m_mv->currentMixerLine()->m_channelIndex ) != nullptr;
- QPainter painter;
- painter.begin( this );
- drawMixerLine( &painter, this, m_mv->currentMixerLine() == this, sendToThis, receiveFromThis );
- painter.end();
-}
-
-
-
-
-void MixerLine::mousePressEvent( QMouseEvent * )
-{
- m_mv->setCurrentMixerLine( this );
-}
-
-
-
-
-void MixerLine::mouseDoubleClickEvent( QMouseEvent * )
-{
- renameChannel();
-}
-
-
-
-
-void MixerLine::contextMenuEvent( QContextMenuEvent * )
-{
- QPointer contextMenu = new CaptionMenu( Engine::mixer()->mixerChannel( m_channelIndex )->m_name, this );
- if( m_channelIndex != 0 ) // no move-options in master
- {
- contextMenu->addAction( tr( "Move &left" ), this, SLOT(moveChannelLeft()));
- contextMenu->addAction( tr( "Move &right" ), this, SLOT(moveChannelRight()));
- }
- contextMenu->addAction( tr( "Rename &channel" ), this, SLOT(renameChannel()));
- contextMenu->addSeparator();
-
- if( m_channelIndex != 0 ) // no remove-option in master
- {
- contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "R&emove channel" ), this, SLOT(removeChannel()));
- contextMenu->addSeparator();
- }
- contextMenu->addAction( embed::getIconPixmap( "cancel" ), tr( "Remove &unused channels" ), this, SLOT(removeUnusedChannels()));
- contextMenu->addSeparator();
-
- QMenu colorMenu(tr("Color"), this);
- colorMenu.setIcon(embed::getIconPixmap("colorize"));
- colorMenu.addAction(tr("Change"), this, SLOT(selectColor()));
- colorMenu.addAction(tr("Reset"), this, SLOT(resetColor()));
- colorMenu.addAction(tr("Pick random"), this, SLOT(randomizeColor()));
- contextMenu->addMenu(&colorMenu);
-
- contextMenu->exec( QCursor::pos() );
- delete contextMenu;
-}
-
-
-
-
-void MixerLine::renameChannel()
-{
- m_inRename = true;
- setToolTip( "" );
- m_renameLineEdit->setReadOnly( false );
- m_lcd->hide();
- m_renameLineEdit->setFixedWidth( 135 );
- m_renameLineEdit->setText( Engine::mixer()->mixerChannel( m_channelIndex )->m_name );
- m_view->setFocus();
- m_renameLineEdit->selectAll();
- m_renameLineEdit->setFocus();
-}
-
-
-
-
-void MixerLine::renameFinished()
-{
- m_inRename = false;
- m_renameLineEdit->deselect();
- m_renameLineEdit->setReadOnly( true );
- m_renameLineEdit->setFixedWidth( 65 );
- m_lcd->show();
- QString newName = m_renameLineEdit->text();
- setFocus();
- if( !newName.isEmpty() && Engine::mixer()->mixerChannel( m_channelIndex )->m_name != newName )
- {
- Engine::mixer()->mixerChannel( m_channelIndex )->m_name = newName;
- m_renameLineEdit->setText( elideName( newName ) );
- Engine::getSong()->setModified();
- }
- QString name = Engine::mixer()->mixerChannel( m_channelIndex )->m_name;
- setToolTip( name );
-}
-
-
-
-
-void MixerLine::removeChannel()
-{
- MixerView * mix = getGUI()->mixerView();
- mix->deleteChannel( m_channelIndex );
-}
-
-
-
-
-void MixerLine::removeUnusedChannels()
-{
- MixerView * mix = getGUI()->mixerView();
- mix->deleteUnusedChannels();
-}
-
-
-
-
-void MixerLine::moveChannelLeft()
-{
- MixerView * mix = getGUI()->mixerView();
- mix->moveChannelLeft( m_channelIndex );
-}
-
-
-
-
-void MixerLine::moveChannelRight()
-{
- MixerView * mix = getGUI()->mixerView();
- mix->moveChannelRight( m_channelIndex );
-}
-
-
-
-
-QBrush MixerLine::backgroundActive() const
-{
- return m_backgroundActive;
-}
-
-
-
-
-void MixerLine::setBackgroundActive( const QBrush & c )
-{
- m_backgroundActive = c;
-}
-
-
-
-
-QColor MixerLine::strokeOuterActive() const
-{
- return m_strokeOuterActive;
-}
-
-
-
-
-void MixerLine::setStrokeOuterActive( const QColor & c )
-{
- m_strokeOuterActive = c;
-}
-
-
-
-
-QColor MixerLine::strokeOuterInactive() const
-{
- return m_strokeOuterInactive;
-}
-
-
-
-
-void MixerLine::setStrokeOuterInactive( const QColor & c )
-{
- m_strokeOuterInactive = c;
-}
-
-
-
-
-QColor MixerLine::strokeInnerActive() const
-{
- return m_strokeInnerActive;
-}
-
-
-
-
-void MixerLine::setStrokeInnerActive( const QColor & c )
-{
- m_strokeInnerActive = c;
-}
-
-
-
-
-QColor MixerLine::strokeInnerInactive() const
-{
- return m_strokeInnerInactive;
-}
-
-
-
-
-void MixerLine::setStrokeInnerInactive( const QColor & c )
-{
- m_strokeInnerInactive = c;
-}
-
-// Ask user for a color, and set it as the mixer line color
-void MixerLine::selectColor()
-{
- const auto channel = Engine::mixer()->mixerChannel(m_channelIndex);
- const auto newColor = ColorChooser{this}
- .withPalette(ColorChooser::Palette::Mixer)
- ->getColor(channel->color().value_or(backgroundActive().color()));
- if (!newColor.isValid()) { return; }
- channel->setColor(newColor);
- Engine::getSong()->setModified();
- update();
-}
-
-// Disable the usage of color on this mixer line
-void MixerLine::resetColor()
-{
- Engine::mixer()->mixerChannel(m_channelIndex)->setColor(std::nullopt);
- Engine::getSong()->setModified();
- update();
-}
-
-// Pick a random color from the mixer palette and set it as our color
-void MixerLine::randomizeColor()
-{
- const auto channel = Engine::mixer()->mixerChannel(m_channelIndex);
- channel->setColor(ColorChooser::getPalette(ColorChooser::Palette::Mixer)[std::rand() % 48]);
- Engine::getSong()->setModified();
- update();
-}
-
-} // namespace lmms::gui
diff --git a/src/gui/MixerView.cpp b/src/gui/MixerView.cpp
index 018e72c2b20..f20b60a3842 100644
--- a/src/gui/MixerView.cpp
+++ b/src/gui/MixerView.cpp
@@ -33,9 +33,9 @@
#include "lmms_math.h"
+#include "MixerChannelView.h"
#include "MixerView.h"
#include "Knob.h"
-#include "MixerLine.h"
#include "Mixer.h"
#include "GuiApplication.h"
#include "MainWindow.h"
@@ -54,7 +54,7 @@ namespace lmms::gui
MixerView::MixerView() :
QWidget(),
- ModelView( nullptr, this ),
+ ModelView(nullptr, this),
SerializingObjectHook()
{
#if QT_VERSION < 0x50C00
@@ -68,54 +68,54 @@ MixerView::MixerView() :
#endif
Mixer * m = Engine::mixer();
- m->setHook( this );
+ m->setHook(this);
//QPalette pal = palette();
- //pal.setColor( QPalette::Window, QColor( 72, 76, 88 ) );
- //setPalette( pal );
+ //pal.setColor(QPalette::Window, QColor(72, 76, 88));
+ //setPalette(pal);
- setAutoFillBackground( true );
- setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed );
+ setAutoFillBackground(true);
+ setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- setWindowTitle( tr( "Mixer" ) );
- setWindowIcon( embed::getIconPixmap( "mixer" ) );
+ setWindowTitle(tr("Mixer"));
+ setWindowIcon(embed::getIconPixmap("mixer"));
// main-layout
- auto ml = new QHBoxLayout;
+ auto ml = new QHBoxLayout{this};
// Set margins
- ml->setContentsMargins( 0, 4, 0, 0 );
+ ml->setContentsMargins(0, 4, 0, 0);
// Channel area
m_channelAreaWidget = new QWidget;
- chLayout = new QHBoxLayout( m_channelAreaWidget );
- chLayout->setSizeConstraint( QLayout::SetMinimumSize );
- chLayout->setSpacing( 0 );
+ chLayout = new QHBoxLayout(m_channelAreaWidget);
+ chLayout->setSizeConstraint(QLayout::SetMinimumSize);
+ chLayout->setSpacing(0);
chLayout->setContentsMargins(0, 0, 0, 0);
m_channelAreaWidget->setLayout(chLayout);
// create rack layout before creating the first channel
m_racksWidget = new QWidget;
- m_racksLayout = new QStackedLayout( m_racksWidget );
- m_racksLayout->setContentsMargins( 0, 0, 0, 0 );
- m_racksWidget->setLayout( m_racksLayout );
+ m_racksLayout = new QStackedLayout(m_racksWidget);
+ m_racksLayout->setContentsMargins(0, 0, 0, 0);
+ m_racksWidget->setLayout(m_racksLayout);
// add master channel
- m_mixerChannelViews.resize( m->numChannels() );
- m_mixerChannelViews[0] = new MixerChannelView( this, this, 0 );
+ m_mixerChannelViews.resize(m->numChannels());
+ m_mixerChannelViews[0] = new MixerChannelView(this, this, 0);
- m_racksLayout->addWidget( m_mixerChannelViews[0]->m_rackView );
+ m_racksLayout->addWidget(m_mixerChannelViews[0]->m_effectRackView);
MixerChannelView * masterView = m_mixerChannelViews[0];
- ml->addWidget( masterView->m_mixerLine, 0, Qt::AlignTop );
+ ml->addWidget(masterView, 0, Qt::AlignTop);
- QSize mixerLineSize = masterView->m_mixerLine->size();
+ auto mixerChannelSize = masterView->sizeHint();
// add mixer channels
- for( int i = 1; i < m_mixerChannelViews.size(); ++i )
+ for (int i = 1; i < m_mixerChannelViews.size(); ++i)
{
m_mixerChannelViews[i] = new MixerChannelView(m_channelAreaWidget, this, i);
- chLayout->addWidget( m_mixerChannelViews[i]->m_mixerLine );
+ chLayout->addWidget(m_mixerChannelViews[i]);
}
// add the scrolling section to the main layout
@@ -123,68 +123,63 @@ MixerView::MixerView() :
class ChannelArea : public QScrollArea
{
public:
- ChannelArea( QWidget * parent, MixerView * mv ) :
- QScrollArea( parent ), m_mv( mv ) {}
+ ChannelArea(QWidget* parent, MixerView* mv) :
+ QScrollArea(parent), m_mv(mv) {}
~ChannelArea() override = default;
- void keyPressEvent( QKeyEvent * e ) override
+ void keyPressEvent(QKeyEvent* e) override
{
- m_mv->keyPressEvent( e );
+ m_mv->keyPressEvent(e);
}
private:
- MixerView * m_mv;
+ MixerView* m_mv;
};
- channelArea = new ChannelArea( this, this );
- channelArea->setWidget( m_channelAreaWidget );
- channelArea->setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
- channelArea->setFrameStyle( QFrame::NoFrame );
- channelArea->setMinimumWidth( mixerLineSize.width() * 6 );
- channelArea->setFixedHeight( mixerLineSize.height() +
- style()->pixelMetric( QStyle::PM_ScrollBarExtent ) );
- ml->addWidget( channelArea, 1, Qt::AlignTop );
+ channelArea = new ChannelArea(this, this);
+ channelArea->setWidget(m_channelAreaWidget);
+ channelArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ channelArea->setFrameStyle(QFrame::NoFrame);
+ channelArea->setMinimumWidth(mixerChannelSize.width() * 6);
+
+ int const scrollBarExtent = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+ channelArea->setFixedHeight(mixerChannelSize.height() + scrollBarExtent);
+
+ ml->addWidget(channelArea, 1, Qt::AlignTop);
// show the add new mixer channel button
auto newChannelBtn = new QPushButton(embed::getIconPixmap("new_channel"), QString(), this);
- newChannelBtn->setObjectName( "newChannelBtn" );
- newChannelBtn->setFixedSize( mixerLineSize );
- connect( newChannelBtn, SIGNAL(clicked()), this, SLOT(addNewChannel()));
- ml->addWidget( newChannelBtn, 0, Qt::AlignTop );
+ newChannelBtn->setObjectName("newChannelBtn");
+ newChannelBtn->setFixedSize(mixerChannelSize);
+ connect(newChannelBtn, SIGNAL(clicked()), this, SLOT(addNewChannel()));
+ ml->addWidget(newChannelBtn, 0, Qt::AlignTop);
// add the stacked layout for the effect racks of mixer channels
- ml->addWidget( m_racksWidget, 0, Qt::AlignTop | Qt::AlignRight );
+ m_racksWidget->setFixedHeight(mixerChannelSize.height());
+ ml->addWidget(m_racksWidget);
- setCurrentMixerLine( m_mixerChannelViews[0]->m_mixerLine );
+ setCurrentMixerChannel(m_mixerChannelViews[0]);
- setLayout( ml );
updateGeometry();
- // timer for updating faders
- connect( getGUI()->mainWindow(), SIGNAL(periodicUpdate()),
- this, SLOT(updateFaders()));
+ auto* mainWindow = getGUI()->mainWindow();
+ // timer for updating faders
+ connect(mainWindow, &MainWindow::periodicUpdate, this, &MixerView::updateFaders);
// add ourself to workspace
- QMdiSubWindow * subWin = getGUI()->mainWindow()->addWindowedWidget( this );
+ QMdiSubWindow* subWin = mainWindow->addWindowedWidget(this);
Qt::WindowFlags flags = subWin->windowFlags();
flags &= ~Qt::WindowMaximizeButtonHint;
- subWin->setWindowFlags( flags );
- layout()->setSizeConstraint( QLayout::SetMinimumSize );
- subWin->layout()->setSizeConstraint( QLayout::SetMinAndMaxSize );
+ subWin->setWindowFlags(flags);
+ layout()->setSizeConstraint(QLayout::SetMinimumSize);
+ subWin->layout()->setSizeConstraint(QLayout::SetMinAndMaxSize);
- parentWidget()->setAttribute( Qt::WA_DeleteOnClose, false );
- parentWidget()->move( 5, 310 );
+ parentWidget()->setAttribute(Qt::WA_DeleteOnClose, false);
+ parentWidget()->move(5, 310);
// we want to receive dataChanged-signals in order to update
- setModel( m );
+ setModel(m);
}
-MixerView::~MixerView()
-{
- for (auto mixerChannelView : m_mixerChannelViews)
- {
- delete mixerChannelView;
- }
-}
@@ -194,12 +189,11 @@ int MixerView::addNewChannel()
Mixer * mix = Engine::mixer();
int newChannelIndex = mix->createChannel();
- m_mixerChannelViews.push_back(new MixerChannelView(m_channelAreaWidget, this,
- newChannelIndex));
- chLayout->addWidget( m_mixerChannelViews[newChannelIndex]->m_mixerLine );
- m_racksLayout->addWidget( m_mixerChannelViews[newChannelIndex]->m_rackView );
+ m_mixerChannelViews.push_back(new MixerChannelView(m_channelAreaWidget, this, newChannelIndex));
+ chLayout->addWidget(m_mixerChannelViews[newChannelIndex]);
+ m_racksLayout->addWidget(m_mixerChannelViews[newChannelIndex]->m_effectRackView);
- updateMixerLine(newChannelIndex);
+ updateMixerChannel(newChannelIndex);
updateMaxChannelSelector();
@@ -210,35 +204,29 @@ int MixerView::addNewChannel()
void MixerView::refreshDisplay()
{
// delete all views and re-add them
- for( int i = 1; iremoveWidget(m_mixerChannelViews[i]->m_mixerLine);
- m_racksLayout->removeWidget( m_mixerChannelViews[i]->m_rackView );
- delete m_mixerChannelViews[i]->m_fader;
- delete m_mixerChannelViews[i]->m_muteBtn;
- delete m_mixerChannelViews[i]->m_soloBtn;
- delete m_mixerChannelViews[i]->m_mixerLine;
- delete m_mixerChannelViews[i]->m_rackView;
- delete m_mixerChannelViews[i];
+ chLayout->removeWidget(m_mixerChannelViews[i]);
+ m_racksLayout->removeWidget(m_mixerChannelViews[i]->m_effectRackView);
}
m_channelAreaWidget->adjustSize();
// re-add the views
m_mixerChannelViews.resize(Engine::mixer()->numChannels());
- for( int i = 1; i < m_mixerChannelViews.size(); ++i )
+ for (int i = 1; i < m_mixerChannelViews.size(); ++i)
{
m_mixerChannelViews[i] = new MixerChannelView(m_channelAreaWidget, this, i);
- chLayout->addWidget(m_mixerChannelViews[i]->m_mixerLine);
- m_racksLayout->addWidget( m_mixerChannelViews[i]->m_rackView );
+ chLayout->addWidget(m_mixerChannelViews[i]);
+ m_racksLayout->addWidget(m_mixerChannelViews[i]->m_effectRackView);
}
- // set selected mixer line to 0
- setCurrentMixerLine( 0 );
+ // set selected mixer channel to 0
+ setCurrentMixerChannel(0);
// update all mixer lines
- for( int i = 0; i < m_mixerChannelViews.size(); ++i )
+ for (int i = 0; i < m_mixerChannelViews.size(); ++i)
{
- updateMixerLine( i );
+ updateMixerChannel(i);
}
updateMaxChannelSelector();
@@ -272,74 +260,21 @@ void MixerView::updateMaxChannelSelector()
}
-void MixerView::saveSettings( QDomDocument & _doc, QDomElement & _this )
+void MixerView::saveSettings(QDomDocument& doc, QDomElement& domElement)
{
- MainWindow::saveWidgetState( this, _this );
+ MainWindow::saveWidgetState(this, domElement);
}
-void MixerView::loadSettings( const QDomElement & _this )
+void MixerView::loadSettings(const QDomElement& domElement)
{
- MainWindow::restoreWidgetState( this, _this );
+ MainWindow::restoreWidgetState(this, domElement);
}
-MixerView::MixerChannelView::MixerChannelView(QWidget * _parent, MixerView * _mv,
- int channelIndex )
-{
- m_mixerLine = new MixerLine(_parent, _mv, channelIndex);
-
- MixerChannel *mixerChannel = Engine::mixer()->mixerChannel(channelIndex);
-
- m_fader = new Fader( &mixerChannel->m_volumeModel,
- tr( "Fader %1" ).arg( channelIndex ), m_mixerLine );
- m_fader->setLevelsDisplayedInDBFS();
- m_fader->setMinPeak(dbfsToAmp(-42));
- m_fader->setMaxPeak(dbfsToAmp(9));
-
- m_fader->move( 16-m_fader->width()/2,
- m_mixerLine->height()-
- m_fader->height()-5 );
-
- m_muteBtn = new PixmapButton( m_mixerLine, tr( "Mute" ) );
- m_muteBtn->setModel( &mixerChannel->m_muteModel );
- m_muteBtn->setActiveGraphic(
- embed::getIconPixmap( "led_off" ) );
- m_muteBtn->setInactiveGraphic(
- embed::getIconPixmap( "led_green" ) );
- m_muteBtn->setCheckable( true );
- m_muteBtn->move( 9, m_fader->y()-11);
- m_muteBtn->setToolTip(tr("Mute this channel"));
-
- m_soloBtn = new PixmapButton( m_mixerLine, tr( "Solo" ) );
- m_soloBtn->setModel( &mixerChannel->m_soloModel );
- m_soloBtn->setActiveGraphic(
- embed::getIconPixmap( "led_red" ) );
- m_soloBtn->setInactiveGraphic(
- embed::getIconPixmap( "led_off" ) );
- m_soloBtn->setCheckable( true );
- m_soloBtn->move( 9, m_fader->y()-21);
- connect(&mixerChannel->m_soloModel, SIGNAL(dataChanged()),
- _mv, SLOT ( toggledSolo() ), Qt::DirectConnection );
- m_soloBtn->setToolTip(tr("Solo this channel"));
-
- // Create EffectRack for the channel
- m_rackView = new EffectRackView( &mixerChannel->m_fxChain, _mv->m_racksWidget );
- m_rackView->setFixedSize( EffectRackView::DEFAULT_WIDTH, MixerLine::MixerLineHeight );
-}
-
-void MixerView::MixerChannelView::setChannelIndex( int index )
-{
- MixerChannel* mixerChannel = Engine::mixer()->mixerChannel( index );
-
- m_fader->setModel( &mixerChannel->m_volumeModel );
- m_muteBtn->setModel( &mixerChannel->m_muteModel );
- m_soloBtn->setModel( &mixerChannel->m_soloModel );
- m_rackView->setModel( &mixerChannel->m_fxChain );
-}
void MixerView::toggledSolo()
@@ -349,31 +284,31 @@ void MixerView::toggledSolo()
-void MixerView::setCurrentMixerLine( MixerLine * _line )
+void MixerView::setCurrentMixerChannel(MixerChannelView* channel)
{
// select
- m_currentMixerLine = _line;
- m_racksLayout->setCurrentWidget( m_mixerChannelViews[ _line->channelIndex() ]->m_rackView );
+ m_currentMixerChannel = channel;
+ m_racksLayout->setCurrentWidget(m_mixerChannelViews[channel->channelIndex()]->m_effectRackView);
// set up send knob
- for(int i = 0; i < m_mixerChannelViews.size(); ++i)
+ for (int i = 0; i < m_mixerChannelViews.size(); ++i)
{
- updateMixerLine(i);
+ updateMixerChannel(i);
}
}
-void MixerView::updateMixerLine(int index)
+void MixerView::updateMixerChannel(int index)
{
Mixer * mix = Engine::mixer();
// does current channel send to this channel?
- int selIndex = m_currentMixerLine->channelIndex();
- MixerLine * thisLine = m_mixerChannelViews[index]->m_mixerLine;
- thisLine->setToolTip( Engine::mixer()->mixerChannel( index )->m_name );
+ int selIndex = m_currentMixerChannel->channelIndex();
+ auto thisLine = m_mixerChannelViews[index];
+ thisLine->setToolTip(Engine::mixer()->mixerChannel(index)->m_name);
FloatModel * sendModel = mix->channelSendModel(selIndex, index);
- if( sendModel == nullptr )
+ if (sendModel == nullptr)
{
// does not send, hide send knob
thisLine->m_sendKnob->setVisible(false);
@@ -386,8 +321,8 @@ void MixerView::updateMixerLine(int index)
}
// disable the send button if it would cause an infinite loop
- thisLine->m_sendBtn->setVisible(! mix->isInfiniteLoop(selIndex, index));
- thisLine->m_sendBtn->updateLightStatus();
+ thisLine->m_sendButton->setVisible(!mix->isInfiniteLoop(selIndex, index));
+ thisLine->m_sendButton->updateLightStatus();
thisLine->update();
}
@@ -395,7 +330,7 @@ void MixerView::updateMixerLine(int index)
void MixerView::deleteChannel(int index)
{
// can't delete master
- if( index == 0 ) return;
+ if (index == 0) return;
// if there is no user confirmation, do nothing
if (!confirmRemoval(index))
@@ -404,7 +339,7 @@ void MixerView::deleteChannel(int index)
}
// remember selected line
- int selLine = m_currentMixerLine->channelIndex();
+ int selLine = m_currentMixerChannel->channelIndex();
// in case the deleted channel is soloed or the remaining
// channels will be left in a muted state
@@ -413,23 +348,17 @@ void MixerView::deleteChannel(int index)
// delete the real channel
Engine::mixer()->deleteChannel(index);
- // delete the view
- chLayout->removeWidget(m_mixerChannelViews[index]->m_mixerLine);
- m_racksLayout->removeWidget(m_mixerChannelViews[index]->m_rackView);
- delete m_mixerChannelViews[index]->m_fader;
- delete m_mixerChannelViews[index]->m_muteBtn;
- delete m_mixerChannelViews[index]->m_soloBtn;
- // delete mixerLine later to prevent a crash when deleting from context menu
- m_mixerChannelViews[index]->m_mixerLine->hide();
- m_mixerChannelViews[index]->m_mixerLine->deleteLater();
- delete m_mixerChannelViews[index]->m_rackView;
- delete m_mixerChannelViews[index];
+ chLayout->removeWidget(m_mixerChannelViews[index]);
+ m_racksLayout->removeWidget(m_mixerChannelViews[index]);
+ // delete MixerChannelView later to prevent a crash when deleting from context menu
+ m_mixerChannelViews[index]->hide();
+ m_mixerChannelViews[index]->deleteLater();
m_channelAreaWidget->adjustSize();
// make sure every channel knows what index it is
for (int i = index + 1; i < m_mixerChannelViews.size(); ++i)
{
- m_mixerChannelViews[i]->m_mixerLine->setChannelIndex(i - 1);
+ m_mixerChannelViews[i]->setChannelIndex(i - 1);
}
m_mixerChannelViews.remove(index);
@@ -438,7 +367,7 @@ void MixerView::deleteChannel(int index)
{
selLine = m_mixerChannelViews.size() - 1;
}
- setCurrentMixerLine(selLine);
+ setCurrentMixerChannel(selLine);
updateMaxChannelSelector();
}
@@ -503,39 +432,39 @@ void MixerView::deleteUnusedChannels()
void MixerView::moveChannelLeft(int index, int focusIndex)
{
// can't move master or first channel left or last channel right
- if( index <= 1 || index >= m_mixerChannelViews.size() ) return;
+ if (index <= 1 || index >= m_mixerChannelViews.size()) return;
Mixer *m = Engine::mixer();
// Move instruments channels
- m->moveChannelLeft( index );
+ m->moveChannelLeft(index);
// Update widgets models
- m_mixerChannelViews[index]->setChannelIndex( index );
- m_mixerChannelViews[index - 1]->setChannelIndex( index - 1 );
+ m_mixerChannelViews[index]->setChannelIndex(index);
+ m_mixerChannelViews[index - 1]->setChannelIndex(index - 1);
// Focus on new position
- setCurrentMixerLine( focusIndex );
+ setCurrentMixerChannel(focusIndex);
}
void MixerView::moveChannelLeft(int index)
{
- moveChannelLeft( index, index - 1 );
+ moveChannelLeft(index, index - 1);
}
void MixerView::moveChannelRight(int index)
{
- moveChannelLeft( index + 1, index + 1 );
+ moveChannelLeft(index + 1, index + 1);
}
void MixerView::renameChannel(int index)
{
- m_mixerChannelViews[index]->m_mixerLine->renameChannel();
+ m_mixerChannelViews[index]->renameChannel();
}
@@ -545,32 +474,32 @@ void MixerView::keyPressEvent(QKeyEvent * e)
switch(e->key())
{
case Qt::Key_Delete:
- deleteChannel(m_currentMixerLine->channelIndex());
+ deleteChannel(m_currentMixerChannel->channelIndex());
break;
case Qt::Key_Left:
- if( e->modifiers() & Qt::AltModifier )
+ if (e->modifiers() & Qt::AltModifier)
{
- moveChannelLeft( m_currentMixerLine->channelIndex() );
+ moveChannelLeft(m_currentMixerChannel->channelIndex());
}
else
{
// select channel to the left
- setCurrentMixerLine( m_currentMixerLine->channelIndex()-1 );
+ setCurrentMixerChannel(m_currentMixerChannel->channelIndex() - 1);
}
break;
case Qt::Key_Right:
- if( e->modifiers() & Qt::AltModifier )
+ if (e->modifiers() & Qt::AltModifier)
{
- moveChannelRight( m_currentMixerLine->channelIndex() );
+ moveChannelRight(m_currentMixerChannel->channelIndex());
}
else
{
// select channel to the right
- setCurrentMixerLine( m_currentMixerLine->channelIndex()+1 );
+ setCurrentMixerChannel(m_currentMixerChannel->channelIndex() + 1);
}
break;
case Qt::Key_Insert:
- if ( e->modifiers() & Qt::ShiftModifier )
+ if (e->modifiers() & Qt::ShiftModifier)
{
addNewChannel();
}
@@ -578,16 +507,16 @@ void MixerView::keyPressEvent(QKeyEvent * e)
case Qt::Key_Enter:
case Qt::Key_Return:
case Qt::Key_F2:
- renameChannel( m_currentMixerLine->channelIndex() );
+ renameChannel(m_currentMixerChannel->channelIndex());
break;
}
}
-void MixerView::closeEvent( QCloseEvent * _ce )
+void MixerView::closeEvent(QCloseEvent * ce)
{
- if( parentWidget() )
+ if (parentWidget())
{
parentWidget()->hide();
}
@@ -595,16 +524,16 @@ void MixerView::closeEvent( QCloseEvent * _ce )
{
hide();
}
- _ce->ignore();
+ ce->ignore();
}
-void MixerView::setCurrentMixerLine( int _line )
+void MixerView::setCurrentMixerChannel(int channel)
{
- if( _line >= 0 && _line < m_mixerChannelViews.size() )
+ if (channel >= 0 && channel < m_mixerChannelViews.size())
{
- setCurrentMixerLine( m_mixerChannelViews[_line]->m_mixerLine );
+ setCurrentMixerChannel(m_mixerChannelViews[channel]);
}
}
@@ -628,31 +557,31 @@ void MixerView::updateFaders()
m->mixerChannel(0)->m_peakLeft *= Engine::audioEngine()->masterGain();
m->mixerChannel(0)->m_peakRight *= Engine::audioEngine()->masterGain();
- for( int i = 0; i < m_mixerChannelViews.size(); ++i )
+ for (int i = 0; i < m_mixerChannelViews.size(); ++i)
{
const float opl = m_mixerChannelViews[i]->m_fader->getPeak_L();
const float opr = m_mixerChannelViews[i]->m_fader->getPeak_R();
const float fallOff = 1.25;
- if( m->mixerChannel(i)->m_peakLeft >= opl/fallOff )
+ if (m->mixerChannel(i)->m_peakLeft >= opl/fallOff)
{
- m_mixerChannelViews[i]->m_fader->setPeak_L( m->mixerChannel(i)->m_peakLeft );
+ m_mixerChannelViews[i]->m_fader->setPeak_L(m->mixerChannel(i)->m_peakLeft);
// Set to -1 so later we'll know if this value has been refreshed yet.
m->mixerChannel(i)->m_peakLeft = -1;
}
- else if( m->mixerChannel(i)->m_peakLeft != -1 )
+ else if (m->mixerChannel(i)->m_peakLeft != -1)
{
- m_mixerChannelViews[i]->m_fader->setPeak_L( opl/fallOff );
+ m_mixerChannelViews[i]->m_fader->setPeak_L(opl/fallOff);
}
- if( m->mixerChannel(i)->m_peakRight >= opr/fallOff )
+ if (m->mixerChannel(i)->m_peakRight >= opr/fallOff)
{
- m_mixerChannelViews[i]->m_fader->setPeak_R( m->mixerChannel(i)->m_peakRight );
+ m_mixerChannelViews[i]->m_fader->setPeak_R(m->mixerChannel(i)->m_peakRight);
// Set to -1 so later we'll know if this value has been refreshed yet.
m->mixerChannel(i)->m_peakRight = -1;
}
- else if( m->mixerChannel(i)->m_peakRight != -1 )
+ else if (m->mixerChannel(i)->m_peakRight != -1)
{
- m_mixerChannelViews[i]->m_fader->setPeak_R( opr/fallOff );
+ m_mixerChannelViews[i]->m_fader->setPeak_R(opr/fallOff);
}
}
}
diff --git a/src/gui/SampleTrackWindow.cpp b/src/gui/SampleTrackWindow.cpp
index f6d7f9ea1d9..c0dd8e04e6a 100644
--- a/src/gui/SampleTrackWindow.cpp
+++ b/src/gui/SampleTrackWindow.cpp
@@ -21,7 +21,7 @@
* Boston, MA 02110-1301 USA.
*
*/
-
+
#include "SampleTrackWindow.h"
#include
@@ -37,7 +37,7 @@
#include "GuiApplication.h"
#include "Knob.h"
#include "MainWindow.h"
-#include "MixerLineLcdSpinBox.h"
+#include "MixerChannelLcdSpinBox.h"
#include "SampleTrackView.h"
#include "Song.h"
#include "SubWindow.h"
@@ -133,7 +133,7 @@ SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
// setup spinbox for selecting Mixer-channel
- m_mixerChannelNumber = new MixerLineLcdSpinBox(2, nullptr, tr("Mixer channel"), m_stv);
+ m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, nullptr, tr("Mixer channel"), m_stv);
basicControlsLayout->addWidget(m_mixerChannelNumber, 0, 3);
basicControlsLayout->setAlignment(m_mixerChannelNumber, widgetAlignment);
diff --git a/src/gui/SendButtonIndicator.cpp b/src/gui/SendButtonIndicator.cpp
index d6f8a832778..4fb20cc315e 100644
--- a/src/gui/SendButtonIndicator.cpp
+++ b/src/gui/SendButtonIndicator.cpp
@@ -2,51 +2,48 @@
#include "embed.h"
#include "Mixer.h"
-#include "MixerLine.h"
+#include "MixerChannelView.h"
#include "MixerView.h"
namespace lmms::gui
{
-SendButtonIndicator:: SendButtonIndicator( QWidget * _parent, MixerLine * _owner,
- MixerView * _mv) :
- QLabel( _parent ),
- m_parent( _owner ),
- m_mv( _mv )
+SendButtonIndicator:: SendButtonIndicator(QWidget* parent, MixerChannelView* owner, MixerView* mv) :
+ QLabel(parent),
+ m_parent(owner),
+ m_mv(mv)
{
-
- // don't do any initializing yet, because the MixerView and MixerLine
+ // don't do any initializing yet, because the MixerView and MixerChannelView
// that were passed to this constructor are not done with their constructors
// yet.
setPixmap(m_qpmOff);
}
-void SendButtonIndicator::mousePressEvent( QMouseEvent * e )
+void SendButtonIndicator::mousePressEvent(QMouseEvent* e)
{
- Mixer * mix = Engine::mixer();
- int from = m_mv->currentMixerLine()->channelIndex();
+ Mixer* mix = Engine::mixer();
+ int from = m_mv->currentMixerChannel()->channelIndex();
int to = m_parent->channelIndex();
- FloatModel * sendModel = mix->channelSendModel(from, to);
- if( sendModel == nullptr )
+ FloatModel* sendModel = mix->channelSendModel(from, to);
+ if (sendModel == nullptr)
{
// not sending. create a mixer send.
- mix->createChannelSend( from, to );
+ mix->createChannelSend(from, to);
}
else
{
// sending. delete the mixer send.
- mix->deleteChannelSend( from, to );
+ mix->deleteChannelSend(from, to);
}
- m_mv->updateMixerLine(m_parent->channelIndex());
+ m_mv->updateMixerChannel(m_parent->channelIndex());
updateLightStatus();
}
-FloatModel * SendButtonIndicator::getSendModel()
+FloatModel* SendButtonIndicator::getSendModel()
{
- Mixer * mix = Engine::mixer();
- return mix->channelSendModel(
- m_mv->currentMixerLine()->channelIndex(), m_parent->channelIndex());
+ Mixer* mix = Engine::mixer();
+ return mix->channelSendModel(m_mv->currentMixerChannel()->channelIndex(), m_parent->channelIndex());
}
void SendButtonIndicator::updateLightStatus()
diff --git a/src/gui/instrument/InstrumentTrackWindow.cpp b/src/gui/instrument/InstrumentTrackWindow.cpp
index 28cd8c6c8aa..fa9be2a5055 100644
--- a/src/gui/instrument/InstrumentTrackWindow.cpp
+++ b/src/gui/instrument/InstrumentTrackWindow.cpp
@@ -42,7 +42,7 @@
#include "FileBrowser.h"
#include "FileDialog.h"
#include "GroupBox.h"
-#include "MixerLineLcdSpinBox.h"
+#include "MixerChannelLcdSpinBox.h"
#include "GuiApplication.h"
#include "gui_templates.h"
#include "Instrument.h"
@@ -206,7 +206,7 @@ InstrumentTrackWindow::InstrumentTrackWindow( InstrumentTrackView * _itv ) :
// setup spinbox for selecting Mixer-channel
- m_mixerChannelNumber = new MixerLineLcdSpinBox( 2, nullptr, tr( "Mixer channel" ), m_itv );
+ m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, nullptr, tr("Mixer channel"), m_itv);
basicControlsLayout->addWidget( m_mixerChannelNumber, 0, 6 );
basicControlsLayout->setAlignment( m_mixerChannelNumber, widgetAlignment );
diff --git a/src/gui/tracks/InstrumentTrackView.cpp b/src/gui/tracks/InstrumentTrackView.cpp
index 8087af42335..12b6227ca78 100644
--- a/src/gui/tracks/InstrumentTrackView.cpp
+++ b/src/gui/tracks/InstrumentTrackView.cpp
@@ -74,7 +74,7 @@ InstrumentTrackView::InstrumentTrackView( InstrumentTrack * _it, TrackContainerV
connect(ConfigManager::inst(), SIGNAL(valueChanged(QString,QString,QString)),
this, SLOT(handleConfigChange(QString,QString,QString)));
- m_mixerChannelNumber = new MixerLineLcdSpinBox(2, getTrackSettingsWidget(), tr("Mixer channel"), this);
+ m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, getTrackSettingsWidget(), tr("Mixer channel"), this);
m_mixerChannelNumber->show();
m_volumeKnob = new Knob( KnobType::Small17, getTrackSettingsWidget(),
@@ -240,7 +240,7 @@ void InstrumentTrackView::assignMixerLine(int channelIndex)
{
model()->mixerChannelModel()->setValue( channelIndex );
- getGUI()->mixerView()->setCurrentMixerLine( channelIndex );
+ getGUI()->mixerView()->setCurrentMixerChannel(channelIndex);
}
diff --git a/src/gui/tracks/SampleTrackView.cpp b/src/gui/tracks/SampleTrackView.cpp
index ddb68ee998e..45a695d11da 100644
--- a/src/gui/tracks/SampleTrackView.cpp
+++ b/src/gui/tracks/SampleTrackView.cpp
@@ -21,7 +21,7 @@
* Boston, MA 02110-1301 USA.
*
*/
-
+
#include "SampleTrackView.h"
#include
@@ -58,7 +58,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
m_tlb->setIcon(embed::getIconPixmap("sample_track"));
m_tlb->show();
- m_mixerChannelNumber = new MixerLineLcdSpinBox(2, getTrackSettingsWidget(), tr("Mixer channel"), this);
+ m_mixerChannelNumber = new MixerChannelLcdSpinBox(2, getTrackSettingsWidget(), tr("Mixer channel"), this);
m_mixerChannelNumber->show();
m_volumeKnob = new Knob( KnobType::Small17, getTrackSettingsWidget(),
@@ -241,7 +241,7 @@ void SampleTrackView::assignMixerLine(int channelIndex)
{
model()->mixerChannelModel()->setValue(channelIndex);
- getGUI()->mixerView()->setCurrentMixerLine(channelIndex);
+ getGUI()->mixerView()->setCurrentMixerChannel(channelIndex);
}
diff --git a/src/gui/widgets/MixerLineLcdSpinBox.cpp b/src/gui/widgets/MixerChannelLcdSpinBox.cpp
similarity index 82%
rename from src/gui/widgets/MixerLineLcdSpinBox.cpp
rename to src/gui/widgets/MixerChannelLcdSpinBox.cpp
index 06eb823c01c..8a67394de91 100644
--- a/src/gui/widgets/MixerLineLcdSpinBox.cpp
+++ b/src/gui/widgets/MixerChannelLcdSpinBox.cpp
@@ -1,5 +1,5 @@
/*
- * MixerLineLcdSpinBox.cpp - a specialization of LcdSpnBox for setting mixer channels
+ * MixerChannelLcdSpinBox.cpp - a specialization of LcdSpnBox for setting mixer channels
*
* Copyright (c) 2004-2014 Tobias Doerffel
*
@@ -22,7 +22,7 @@
*
*/
-#include "MixerLineLcdSpinBox.h"
+#include "MixerChannelLcdSpinBox.h"
#include "CaptionMenu.h"
#include "MixerView.h"
@@ -33,14 +33,14 @@ namespace lmms::gui
{
-void MixerLineLcdSpinBox::setTrackView(TrackView * tv)
+void MixerChannelLcdSpinBox::setTrackView(TrackView * tv)
{
m_tv = tv;
}
-void MixerLineLcdSpinBox::mouseDoubleClickEvent(QMouseEvent* event)
+void MixerChannelLcdSpinBox::mouseDoubleClickEvent(QMouseEvent* event)
{
- getGUI()->mixerView()->setCurrentMixerLine(model()->value());
+ getGUI()->mixerView()->setCurrentMixerChannel(model()->value());
getGUI()->mixerView()->parentWidget()->show();
getGUI()->mixerView()->show();// show Mixer window
@@ -48,7 +48,7 @@ void MixerLineLcdSpinBox::mouseDoubleClickEvent(QMouseEvent* event)
//engine::getMixerView()->raise();
}
-void MixerLineLcdSpinBox::contextMenuEvent(QContextMenuEvent* event)
+void MixerChannelLcdSpinBox::contextMenuEvent(QContextMenuEvent* event)
{
// for the case, the user clicked right while pressing left mouse-
// button, the context-menu appears while mouse-cursor is still hidden