Skip to content

Commit a171f1a

Browse files
authored
Merge pull request mixxxdj#16489 from xARSENICx/LateNightQML/Legacy-Library-Integration
[GSoC] LateNightQML: Legacy Library Integration
2 parents c1071b6 + d424d6b commit a171f1a

29 files changed

Lines changed: 3077 additions & 59 deletions

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,6 +3809,8 @@ if(QT_KNOWN_POLICY_QTP0002 AND ANDROID)
38093809
endif()
38103810

38113811
if(QML)
3812+
target_sources(mixxx-lib PRIVATE src/skin/qml/qmlskin.cpp)
3813+
38123814
if(QT_KNOWN_POLICY_QTP0004)
38133815
# See: https://doc.qt.io/qt-6/qt-cmake-policy-qtp0004.html
38143816
# OLD (Qt < 6.8) requires to import qml modules with a folder e.g.:
@@ -3912,6 +3914,7 @@ if(QML)
39123914
src/qml/qmleffectmanifestparametersmodel.cpp
39133915
src/qml/qmleffectslotproxy.cpp
39143916
src/qml/qmleffectsmanagerproxy.cpp
3917+
src/qml/qmllegacylibraryitem.cpp
39153918
src/qml/qmllibraryproxy.cpp
39163919
src/qml/qmllibrarysource.cpp
39173920
src/qml/qmllibrarysourcetree.cpp

res/qml/Settings/Interface.qml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ Category {
6464
keyPaletteInput.selected = Mixxx.Config.configKeyColorsEnabled ? "on" : "off";
6565
keyPaletteComboBox.currentIndex = keyPaletteComboBox.model.indexOf(Mixxx.Config.configKeyColorPalette);
6666
colorPane.hotcuePaletteColorIndex = Mixxx.Config.controlHotcueDefaultColorIndex;
67-
console.log(colorPane.hotcuePaletteColorIndex, Mixxx.Config.controlHotcueDefaultColorIndex);
6867
if (colorPane.hotcuePaletteColorIndex < 0)
6968
colorPane.hotcuePaletteColorIndex = colorPane.defaultPalette.length - 1;
7069
hotcuePaletteInput.currentIndex = colorPane.hotcuePaletteColorIndex;
@@ -87,10 +86,10 @@ Category {
8786
}
8887
function saveDeck() {
8988
Mixxx.Config.controlCueDefault = cueModeInput.currentIndex;
90-
Mixxx.Config.controlSetIntroStartAtMainCue = setIntroStartToMainCueInput.enabled;
89+
Mixxx.Config.controlSetIntroStartAtMainCue = setIntroStartToMainCueInput.selected === "on";
9190
Mixxx.Config.controlPositionDisplay = trackTimeDisplayInput.options.indexOf(trackTimeDisplayInput.selected);
9291
Mixxx.Config.controlTimeFormat = timeMode.currentIndex;
93-
Mixxx.Config.controlCloneDeckOnLoadDoubleTap = doublePressLoadToCloneInput.enabled;
92+
Mixxx.Config.controlCloneDeckOnLoadDoubleTap = doublePressLoadToCloneInput.selected === "on";
9493
Mixxx.Config.controlCueRecall = trackLoadPointInput.currentIndex;
9594
Mixxx.Config.controlLoadWhenDeckPlaying = loadingTrackWhenPlayingInput.options.indexOf(loadingTrackWhenPlayingInput.selected);
9695
Mixxx.Config.controlSpeedAutoReset = resetOnTrackLoadInput.options.indexOf(resetOnTrackLoadInput.selected);
@@ -120,15 +119,15 @@ Category {
120119
// layoutInput.value =
121120
Mixxx.Config.libraryTooltips = tooltipsInput.options.indexOf(tooltipsInput.selected);
122121
Mixxx.Config.libraryInhibitScreensaver = disableScreensaverInput.options.indexOf(disableScreensaverInput.selected);
123-
Mixxx.Config.configStartInFullscreenKey = startFullscreenInput.enabled;
124-
Mixxx.Config.libraryHideMenuBar = autoHideMenuBarInput.enabled;
125-
Mixxx.Config.libraryEnableSearchCompletions = searchCompletionInput.enabled;
126-
Mixxx.Config.libraryEnableSearchHistoryShortcuts = searchHistoryKeyboardInput.enabled;
122+
Mixxx.Config.configStartInFullscreenKey = startFullscreenInput.selected === "on";
123+
Mixxx.Config.libraryHideMenuBar = autoHideMenuBarInput.selected === "on";
124+
Mixxx.Config.libraryEnableSearchCompletions = searchCompletionInput.selected === "on";
125+
Mixxx.Config.libraryEnableSearchHistoryShortcuts = searchHistoryKeyboardInput.selected === "on";
127126
Mixxx.Config.libraryBpmColumnPrecision = bpmPrecisionInput.value;
128127
Mixxx.Config.libraryRowHeight = libraryRowHeightInput.value;
129128
Mixxx.Config.configTrackColorPalette = trackPaletteComboBox.model[trackPaletteComboBox.currentIndex];
130129
Mixxx.Config.configHotcueColorPalette = hotcuePaletteComboBox.model[hotcuePaletteComboBox.currentIndex];
131-
Mixxx.Config.configKeyColorsEnabled = keyPaletteInput.enabled;
130+
Mixxx.Config.configKeyColorsEnabled = keyPaletteInput.selected === "on";
132131
Mixxx.Config.configKeyColorPalette = keyPaletteComboBox.model[keyPaletteComboBox.currentIndex];
133132
// keyPaletteInput.value
134133
Mixxx.Config.controlHotcueDefaultColorIndex = hotcuePaletteInput.currentIndex;

res/qml/main.qml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Mixxx 1.0 as Mixxx
33
import QtQuick 2.12
44
import QtQuick.Controls
55
import QtQuick.Layouts
6+
import QtQuick.Window
67
import QtQuick.Shapes
78
import Qt5Compat.GraphicalEffects
89
import "Theme"
@@ -14,7 +15,9 @@ ApplicationWindow {
1415
property var focusedDeck: null
1516
property alias maximizeLibrary: maximizeLibraryButton.checked
1617
readonly property int numDecks: 4
18+
readonly property int numPreviewDecks: 1
1719
readonly property int numSamplers: 16
20+
readonly property int waveformOverviewTypeRgb: 2
1821
readonly property bool show4decks: show4DecksButton.checked && show4DecksButton.visible
1922
property alias showEffects: showEffectsButton.checked
2023
property alias showSamplers: showSamplersButton.checked
@@ -24,6 +27,7 @@ ApplicationWindow {
2427
minimumHeight: 300
2528
minimumWidth: 680
2629
visible: true
30+
visibility: Mixxx.Config.configStartInFullscreenKey ? Window.FullScreen : Window.Windowed
2731
width: 1792
2832

2933
Mixxx.ControlProxy {
@@ -42,6 +46,22 @@ ApplicationWindow {
4246
value = root.numSamplers;
4347
}
4448
}
49+
Mixxx.ControlProxy {
50+
group: "[App]"
51+
key: "num_preview_decks"
52+
53+
onInitializedChanged: {
54+
value = root.numPreviewDecks;
55+
}
56+
}
57+
Mixxx.ControlProxy {
58+
group: "[Waveform]"
59+
key: "WaveformOverviewType"
60+
61+
onInitializedChanged: {
62+
value = root.waveformOverviewTypeRgb;
63+
}
64+
}
4565
Column {
4666
id: content
4767

res/skins/LateNightQML/Library.qml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import Mixxx 1.0 as Mixxx
2+
import QtQuick
3+
4+
Item {
5+
id: root
6+
7+
Mixxx.LegacyLibraryItem {
8+
anchors.fill: parent
9+
}
10+
}

0 commit comments

Comments
 (0)