Skip to content

Commit fb4f207

Browse files
committed
Merge branch 'main' into LateNightQML/Deck-week6
2 parents 5855cca + 337154f commit fb4f207

44 files changed

Lines changed: 4121 additions & 546 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3741,6 +3741,20 @@ add_library(
37413741
target_include_directories(mixxx-lib SYSTEM PUBLIC lib/portaudio)
37423742
target_link_libraries(mixxx-lib PRIVATE PortAudioRingBuffer)
37433743

3744+
# PipeWire
3745+
default_option(PIPEWIRE "Enable the PipeWire backend" "UNIX AND NOT APPLE AND NOT ANDROID")
3746+
if(PIPEWIRE)
3747+
find_package(PipeWire REQUIRED)
3748+
target_link_libraries(mixxx-lib PUBLIC PipeWire::PipeWire)
3749+
target_compile_definitions(mixxx-lib PUBLIC __PIPEWIRE__)
3750+
target_sources(
3751+
mixxx-lib
3752+
PRIVATE
3753+
src/soundio/pipewireenumerator.cpp
3754+
src/soundio/sounddevicepipewire.cpp
3755+
)
3756+
endif()
3757+
37443758
# PortMidi
37453759
default_option(PORTMIDI "Enable the PortMidi backend for MIDI controllers" "NOT ANDROID")
37463760
if(PORTMIDI)

cmake/modules/FindPipeWire.cmake

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#[=======================================================================[.rst:
2+
FindPipeWire
3+
--------
4+
5+
Finds the PipeWire library.
6+
7+
Imported Targets
8+
^^^^^^^^^^^^^^^^
9+
10+
This module provides the following imported targets, if found:
11+
12+
``PipeWire::PipeWire``
13+
The PipeWire library
14+
15+
Result Variables
16+
^^^^^^^^^^^^^^^^
17+
18+
This will define the following variables:
19+
20+
``PipeWire_FOUND``
21+
True if the system has the PipeWire library.
22+
23+
#]=======================================================================]
24+
25+
find_package(PkgConfig REQUIRED)
26+
pkg_check_modules(PIPEWIRE REQUIRED IMPORTED_TARGET libpipewire-0.3)
27+
28+
include(FindPackageHandleStandardArgs)
29+
30+
find_package_handle_standard_args(
31+
PipeWire
32+
REQUIRED_VARS PIPEWIRE_FOUND
33+
VERSION_VAR PIPEWIRE_VERSION
34+
)
35+
36+
if(PipeWire_FOUND AND NOT TARGET PipeWire::PipeWire)
37+
add_library(PipeWire::PipeWire INTERFACE IMPORTED)
38+
set_target_properties(
39+
PipeWire::PipeWire
40+
PROPERTIES INTERFACE_LINK_LIBRARIES PkgConfig::PIPEWIRE
41+
)
42+
endif()

res/controllers/Traktor-Kontrol-S3-hid-scripts.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ TraktorS3.Deck = class {
910910
// There is no control object to mark / unmark a track as played.
911911
// this.defineButton(messageShort, "!SetPlayed", 0x01, 0x10, 0x04, 0x20,
912912
// deckFn.SetPlayedHandler);
913+
this.defineButton(messageShort, "!StarTrack", 0x01, 0x10, 0x04, 0x20, deckFn.StarTrackHandler);
913914
this.defineButton(messageShort, "!LibraryFocus", 0x01, 0x20, 0x04, 0x40, deckFn.LibraryFocusHandler);
914915
this.defineButton(messageShort, "!MaximizeLibrary", 0x01, 0x40, 0x04, 0x80, deckFn.MaximizeLibraryHandler);
915916

@@ -1143,6 +1144,15 @@ TraktorS3.Deck = class {
11431144
}
11441145
}
11451146

1147+
StarTrackHandler(field) {
1148+
this.colorOutput(field.value, "!StarTrack");
1149+
if (field.value === 0) {
1150+
return;
1151+
}
1152+
1153+
engine.setValue("[Library]", "sort_focused_column", 1);
1154+
}
1155+
11461156
LibraryFocusHandler(field) {
11471157
this.colorOutput(field.value, "!LibraryFocus");
11481158
if (field.value === 0) {
@@ -1430,6 +1440,7 @@ TraktorS3.Deck = class {
14301440
this.defineOutput(outputA, "slip_enabled", 0x02, 0x1B);
14311441
this.defineOutput(outputA, "reverse", 0x03, 0x1C);
14321442
this.defineOutput(outputA, "!PreviewTrack", 0x04, 0x1D);
1443+
this.defineOutput(outputA, "!StarTrack", 0x05, 0x1E);
14331444
this.defineOutput(outputA, "!LibraryFocus", 0x06, 0x1F);
14341445
this.defineOutput(outputA, "!MaximizeLibrary", 0x07, 0x20);
14351446
this.defineOutput(outputA, "quantize", 0x08, 0x21);

res/qml/ControlFader.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Skin.Fader {
1010

1111
value: control.parameter
1212

13-
onMoved: function(value) {
13+
onMoved: function (value) {
1414
control.parameter = value;
1515
}
1616

@@ -25,6 +25,7 @@ Skin.Fader {
2525
}
2626
TapHandler {
2727
acceptedButtons: Qt.RightButton
28+
2829
onTapped: control.reset()
2930
}
3031
}

res/qml/ControlKnob.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ Skin.Knob {
99
property alias key: control.key
1010

1111
value: control.parameter
12+
1213
onTurned: control.parameter = value
1314

1415
Mixxx.ControlProxy {
1516
id: control
1617
}
17-
1818
TapHandler {
1919
onDoubleTapped: control.reset()
2020
}
2121
TapHandler {
2222
acceptedButtons: Qt.RightButton
23+
2324
onTapped: control.reset()
2425
}
2526
}

res/qml/CrossfaderRow.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Item {
5353
anchors.right: parent.right
5454
anchors.rightMargin: 5
5555
anchors.verticalCenter: parent.verticalCenter
56-
barColor: Theme.crossfaderBarColor
57-
barStart: 0.5
56+
bar.color: Theme.crossfaderBarColor
57+
bar.start: 0.5
5858
bg: Theme.imgCrossfaderBackground
5959
fg: Theme.imgCrossfaderHandle
6060
group: "[Master]"

res/qml/Deck/HotcueAndStem.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Item {
423423
id: volumeSlider
424424

425425
anchors.fill: parent
426-
barColor: Theme.volumeSliderBarColor
426+
bar.color: Theme.volumeSliderBarColor
427427
bg: Theme.imgVolumeSliderBackground
428428
group: stem.group
429429
implicitWidth: 10

res/qml/Deck/TempoColumn.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ ColumnLayout {
177177

178178
Layout.fillHeight: true
179179
Layout.fillWidth: true
180-
barColor: Theme.bpmSliderBarColor
181-
barMargin: 0
182-
barStart: 0.5
180+
bar.color: Theme.bpmSliderBarColor
181+
bar.margin: 0
182+
bar.start: 0.5
183183
bg: Theme.imgBpmSliderBackground
184184
group: root.group
185185
key: "rate"

res/qml/Fader.qml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ MixxxControls.Fader {
1111
property alias handleImage: handleImage
1212
property bool showDefaultHandle: true
1313

14-
bar: true
15-
barMargin: 10
14+
bar.enabled: true
15+
bar.margin: 10
1616
implicitHeight: backgroundImage.implicitHeight
1717
implicitWidth: backgroundImage.implicitWidth
1818

1919
background: Image {
2020
id: backgroundImage
2121

2222
anchors.fill: parent
23-
anchors.margins: root.barMargin
23+
anchors.margins: root.bar.margin
2424
}
2525
handle: Item {
2626
id: handleItem

res/qml/Knob.qml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,56 @@ import "Theme"
55
MixxxControls.Knob {
66
id: root
77

8+
property url backgroundSource: Theme.imgKnob
89
required property color color
910
property url shadowSource: Theme.imgKnobShadow
10-
property url backgroundSource: Theme.imgKnob
11+
property bool showDefaultBackground: true
12+
property bool showDefaultForeground: true
1113

12-
implicitWidth: background.width
13-
implicitHeight: implicitWidth
14+
angle: 116
1415
arc: true
15-
arcRadius: width * 0.45
16-
arcOffsetY: width * 0.01
1716
arcColor: root.color
17+
arcOffsetY: width * 0.01
18+
arcRadius: width * 0.45
1819
arcWidth: 2
19-
angle: 116
20-
21-
Image {
22-
id: shadow
23-
24-
anchors.top: parent.top
25-
anchors.left: parent.left
26-
anchors.right: parent.right
27-
height: width * 7 / 6
28-
fillMode: Image.PreserveAspectFit
29-
source: root.shadowSource
30-
}
20+
implicitHeight: implicitWidth
21+
implicitWidth: background.width
3122

3223
background: Image {
3324
id: background
3425

35-
anchors.top: parent.top
3626
anchors.left: parent.left
3727
anchors.right: parent.right
28+
anchors.top: parent.top
3829
height: width
3930
source: root.backgroundSource
31+
visible: root.showDefaultBackground
4032
}
41-
4233
foreground: Item {
43-
anchors.top: parent.top
4434
anchors.left: parent.left
4535
anchors.right: parent.right
36+
anchors.top: parent.top
4637
height: width
38+
visible: root.showDefaultForeground
4739

4840
Rectangle {
4941
anchors.horizontalCenter: parent.horizontalCenter
50-
width: 2
42+
color: root.color
5143
height: root.width / 5
44+
width: 2
5245
y: height
53-
color: root.color
5446
}
5547
}
48+
49+
Image {
50+
id: shadow
51+
52+
anchors.left: parent.left
53+
anchors.right: parent.right
54+
anchors.top: parent.top
55+
fillMode: Image.PreserveAspectFit
56+
height: width * 7 / 6
57+
source: root.shadowSource
58+
visible: root.showDefaultBackground
59+
}
5660
}

0 commit comments

Comments
 (0)