Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion res/qml/AuxiliaryUnit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "Theme"
Row {
id: root

property int unitNumber // required
required property int unitNumber
property string group: "[Auxiliary" + unitNumber + "]"

spacing: 5
Expand Down
2 changes: 1 addition & 1 deletion res/qml/Button.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ AbstractButton {
id: root

property color normalColor: Theme.buttonNormalColor
property color activeColor // required
required property color activeColor
property color pressedColor: activeColor
property bool highlight: false

Expand Down
6 changes: 4 additions & 2 deletions res/qml/ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ ComboBox {
delegate: ItemDelegate {
id: itemDlgt

required property int index

width: parent.width
highlighted: root.highlightedIndex === index
text: root.textAt(index)
highlighted: root.highlightedIndex === this.index
Comment thread
uklotzde marked this conversation as resolved.
text: root.textAt(this.index)

contentItem: Text {
text: itemDlgt.text
Expand Down
4 changes: 2 additions & 2 deletions res/qml/ControlButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import Mixxx 0.1 as Mixxx
Skin.Button {
id: root

property string group // required
property string key // required
required property string group
required property string key
property bool toggleable: false

function toggle() {
Expand Down
2 changes: 1 addition & 1 deletion res/qml/CrossfaderRow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "Theme"
Item {
id: root

property real crossfaderWidth // required
required property real crossfaderWidth

implicitHeight: crossfader.height

Expand Down
14 changes: 4 additions & 10 deletions res/qml/Deck.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "Theme"
Item {
id: root

property string group // required
required property string group
property bool minimized: false
property var deckPlayer: Mixxx.PlayerManager.getPlayer(group)

Expand Down Expand Up @@ -344,15 +344,9 @@ Item {
model: 8

Skin.HotcueButton {
// TODO: Once we require Qt >= 5.14, we're going to re-add
// the `required` keyword. If the component has any
// required properties, we'll stumble over a Qt bug and
// need the following workaround:
// required property int index
// See this for details:
// https://bugreports.qt.io/browse/QTBUG-86009, and need

hotcueNumber: index + 1
required property int index

hotcueNumber: this.index + 1
group: root.group
width: playButton.height
height: playButton.height
Expand Down
4 changes: 2 additions & 2 deletions res/qml/DeckInfoBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import "Theme"
Rectangle {
id: root

property string group // required
property int rightColumnWidth // required
required property string group
required property int rightColumnWidth
property var deckPlayer: Mixxx.PlayerManager.getPlayer(group)
property color lineColor: Theme.deckLineColor

Expand Down
4 changes: 2 additions & 2 deletions res/qml/DeckRow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import QtQuick 2.12
Item {
id: root

property string leftDeckGroup // required
property string rightDeckGroup // required
required property string leftDeckGroup
required property string rightDeckGroup
property alias mixer: mixer
property bool minimized: false

Expand Down
55 changes: 41 additions & 14 deletions res/qml/DeveloperToolsWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ Window {
syncView: tableView

delegate: Item {
id: headerDlgt

required property int column
required property string display

implicitHeight: columnName.contentHeight + 5
implicitWidth: columnName.contentWidth + 5
visible: column < tableView.columnWidths.length
visible: this.column < tableView.columnWidths.length

BorderImage {
anchors.fill: parent
Expand All @@ -56,7 +61,7 @@ Window {
Text {
id: columnName

text: display
text: headerDlgt.display
anchors.fill: parent
anchors.margins: 5
elide: Text.ElideRight
Expand All @@ -73,7 +78,7 @@ Window {
id: sortIndicator

text: controlModel.sortDescending ? "▲" : "▼"
visible: controlModel.sortColumn == column
visible: controlModel.sortColumn == headerDlgt.column
anchors.fill: parent
anchors.margins: 5
elide: Text.ElideRight
Expand All @@ -87,7 +92,7 @@ Window {
}

TapHandler {
onTapped: controlModel.toggleSortColumn(column)
onTapped: controlModel.toggleSortColumn(headerDlgt.column)
}

}
Expand Down Expand Up @@ -127,15 +132,20 @@ Window {
column: 0

delegate: Rectangle {
implicitWidth: (root.width - 10) * tableView.columnWidths[column]
id: groupDelegate

required property int column
required property string display

implicitWidth: (root.width - 10) * tableView.columnWidths[groupDelegate.column]
implicitHeight: groupName.contentHeight
color: root.color

Text {
id: groupName

anchors.fill: parent
text: display
text: groupDelegate.display
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
color: Theme.deckTextColor
Expand All @@ -149,15 +159,20 @@ Window {
column: 1

delegate: Rectangle {
implicitWidth: (root.width - 10) * tableView.columnWidths[column]
id: keyDelegate

required property int column
required property string display

implicitWidth: (root.width - 10) * tableView.columnWidths[keyDelegate.column]
implicitHeight: keyName.contentHeight
color: root.color

Text {
id: keyName

anchors.fill: parent
text: display
text: keyDelegate.display
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
color: Theme.deckTextColor
Expand All @@ -171,18 +186,24 @@ Window {
column: 2

delegate: Rectangle {
implicitWidth: (root.width - 10) * tableView.columnWidths[column]
id: valueDelegate

required property int row
required property int column
required property string display

implicitWidth: (root.width - 10) * tableView.columnWidths[valueDelegate.column]
implicitHeight: valueField.implicitHeight
color: root.color

Skin.TextField {
id: valueField

anchors.fill: parent
text: display
text: valueDelegate.display
inputMethodHints: Qt.ImhFormattedNumbersOnly
onEditingFinished: {
const idx = controlModel.index(row, column);
const idx = controlModel.index(valueDelegate.row, valueDelegate.column);
controlModel.setData(idx, parseFloat(text));
}
color: Theme.textColor
Expand All @@ -206,18 +227,24 @@ Window {
column: 3

delegate: Rectangle {
implicitWidth: (root.width - 10) * tableView.columnWidths[column]
id: parameterDelegate

required property int row
required property int column
required property string display

implicitWidth: (root.width - 10) * tableView.columnWidths[parameterDelegate.column]
implicitHeight: valueField.implicitHeight
color: root.color

Skin.TextField {
id: valueField

anchors.fill: parent
text: display
text: parameterDelegate.display
inputMethodHints: Qt.ImhFormattedNumbersOnly
onEditingFinished: {
const idx = controlModel.index(row, column);
const idx = controlModel.index(parameterDelegate.row, parameterDelegate.column);
controlModel.setData(idx, parseFloat(text));
}
color: Theme.textColor
Expand Down
20 changes: 12 additions & 8 deletions res/qml/EffectSlot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Item {
id: root

property Mixxx.EffectSlotProxy slot: Mixxx.EffectsManager.getEffectSlot(unitNumber, effectNumber)
property int unitNumber // required
property int effectNumber // required
required property int unitNumber
required property int effectNumber
property bool expanded: false
readonly property string group: slot.group
property real maxSelectorWidth: 300
Expand Down Expand Up @@ -107,10 +107,14 @@ Item {
delegate: Item {
id: parameter

required property int index
required property string shortName
required property string name
required property string controlKey
required property int type
property int number: index + 1
// TODO: Use null coalescing when we switch to Qt >= 5.15
property string label: shortName ? shortName : name
property string key: controlKey
property string label: shortName ?? name
property bool isKnob: type == 0
property bool isButton: type == 1

Expand All @@ -132,7 +136,7 @@ Item {
anchors.centerIn: parent
arcStart: 0
group: root.group
key: parameter.key
key: parameter.controlKey
color: Theme.effectColor
visible: parameter.isKnob

Expand All @@ -142,7 +146,7 @@ Item {
property bool loaded: value != 0

group: root.group
key: parameter.key + "_loaded"
key: parameter.controlKey + "_loaded"
}

}
Expand All @@ -154,7 +158,7 @@ Item {
width: parent.width
anchors.centerIn: parent
group: root.group
key: parameter.key
key: parameter.controlKey
activeColor: Theme.effectColor
visible: parameter.isButton
toggleable: true
Expand All @@ -166,7 +170,7 @@ Item {
property bool loaded: value != 0

group: root.group
key: parameter.key + "_loaded"
key: parameter.controlKey + "_loaded"
}

}
Expand Down
2 changes: 1 addition & 1 deletion res/qml/EffectUnit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "Theme"
Item {
id: root

property int unitNumber // required
required property int unitNumber

implicitHeight: effectContainer.height

Expand Down
2 changes: 1 addition & 1 deletion res/qml/EqColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "Theme"
Column {
id: root

property string group // required
required property string group

spacing: 4

Expand Down
4 changes: 2 additions & 2 deletions res/qml/EqKnob.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Rectangle {
id: root

property alias knob: knob
property string statusGroup: root.knob.group // required
property string statusKey // required
property string statusGroup: root.knob.group
required property string statusKey

color: Theme.knobBackgroundColor
width: 56
Expand Down
4 changes: 2 additions & 2 deletions res/qml/Hotcue.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import "Theme"
Item {
id: root

property int hotcueNumber // required
property string group // required
required property int hotcueNumber
required property string group
property alias activate: hotcueActivateControl.value
property alias clear: hotcueClearControl.value
readonly property bool isSet: hotcueStatusControl.value != 0
Expand Down
4 changes: 2 additions & 2 deletions res/qml/HotcueButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import QtQuick 2.12
Skin.Button {
id: root

property int hotcueNumber // required
property string group // required
required property int hotcueNumber
required property string group

text: hotcueNumber
activeColor: hotcue.color
Expand Down
4 changes: 3 additions & 1 deletion res/qml/HotcuePopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "Theme"
Popup {
id: root

property Hotcue hotcue // required
required property Hotcue hotcue

dim: false
modal: true
Expand All @@ -26,6 +26,8 @@ Popup {
model: Mixxx.Config.getHotcueColorPalette()

Rectangle {
required property color modelData

height: 24
width: 24
color: modelData
Expand Down
6 changes: 3 additions & 3 deletions res/qml/InfoBarButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import "Theme"
AbstractButton {
id: root

property string group // required
property string key // required
required property string group
required property string key
property alias foreground: foreground.data
property color normalColor: Theme.buttonNormalColor
property color activeColor // required
required property color activeColor
property color pressedColor: activeColor
property alias highlight: control.value

Expand Down
Loading