Fixed review issues
This commit is contained in:
parent
58f7188e26
commit
4726ae923b
9 changed files with 21 additions and 29 deletions
|
@ -41,12 +41,13 @@ Rectangle {
|
|||
QtObject {
|
||||
id: prv
|
||||
|
||||
property var currentNavigateControlIndex: []
|
||||
property var currentNavigateControlIndex: undefined
|
||||
property bool isPanelActivated: false
|
||||
|
||||
function setNavigateControlIndex(index) {
|
||||
if (index[0] !== prv.currentNavigateControlIndex[0] ||
|
||||
index[1] !== prv.currentNavigateControlIndex[1]) {
|
||||
if (!Boolean(prv.currentNavigateControlIndex) ||
|
||||
index.row !== prv.currentNavigateControlIndex.row ||
|
||||
index.column !== prv.currentNavigateControlIndex.column) {
|
||||
prv.isPanelActivated = false
|
||||
}
|
||||
|
||||
|
@ -95,10 +96,13 @@ Rectangle {
|
|||
function setupConnections() {
|
||||
for (var i = 0; i < mixerPanelModel.rowCount(); i++) {
|
||||
var item = mixerPanelModel.get(i)
|
||||
item.item.panel.navigationEvent.connect(function(event){
|
||||
item.item.panel.navigationEvent.connect(function(event) {
|
||||
if (event.type === NavigationEvent.AboutActive) {
|
||||
event.setData("controlIndex", prv.currentNavigateControlIndex)
|
||||
event.setData("controlOptional", true)
|
||||
if (Boolean(prv.currentNavigateControlIndex)) {
|
||||
event.setData("controlIndex", [prv.currentNavigateControlIndex.row, prv.currentNavigateControlIndex.column])
|
||||
event.setData("controlOptional", true)
|
||||
}
|
||||
|
||||
prv.isPanelActivated = true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -85,7 +85,7 @@ Item {
|
|||
navigation.accessible.name: root.accessibleName + " " + root.title + " " + qsTrc("playback", "Bypass")
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,7 +175,7 @@ Item {
|
|||
navigation.accessible.name: root.accessibleName + " " + root.title
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ Item {
|
|||
navigation.accessible.name: root.accessibleName + " " + qsTrc("playback", "Menu")
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName + " " + currentText
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName + " " + readableVolumeLevel
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ MixerPanelSection {
|
|||
active: modelData.isActive
|
||||
|
||||
navigationPanel: item.panel
|
||||
navigationRowStart: root.navigationRowStart + (model.index * 3)
|
||||
navigationRowStart: root.navigationRowStart + (model.index * 3) // NOTE: 3 - because AudioResourceControl have 3 controls
|
||||
navigationName: modelData.id
|
||||
accessibleName: content.accessibleName
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName + " " + qsTrc("playback", "Mute")
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName + " " + qsTrc("payback", "Solo")
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ MixerPanelSection {
|
|||
navigation.accessible.name: content.accessibleName + " " + currentText
|
||||
navigation.onActiveChanged: {
|
||||
if (navigation.active) {
|
||||
root.navigateControlIndexChanged([navigation.row, navigation.column])
|
||||
root.navigateControlIndexChanged({row: navigation.row, column: navigation.column})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -282,16 +282,6 @@ void MixerChannelItem::setSolo(bool solo)
|
|||
emit soloChanged();
|
||||
}
|
||||
|
||||
void MixerChannelItem::panel(mu::ui::NavigationPanel* panel)
|
||||
{
|
||||
if (m_panel == panel) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_panel = panel;
|
||||
emit panelChanged(m_panel);
|
||||
}
|
||||
|
||||
void MixerChannelItem::setAudioChannelVolumePressure(const audio::audioch_t chNum, const float newValue)
|
||||
{
|
||||
if (chNum == 0) {
|
||||
|
|
|
@ -54,7 +54,7 @@ class MixerChannelItem : public QObject, public async::Asyncable
|
|||
Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged)
|
||||
Q_PROPERTY(bool solo READ solo WRITE setSolo NOTIFY soloChanged)
|
||||
|
||||
Q_PROPERTY(mu::ui::NavigationPanel * panel READ panel WRITE panel NOTIFY panelChanged)
|
||||
Q_PROPERTY(mu::ui::NavigationPanel * panel READ panel NOTIFY panelChanged)
|
||||
|
||||
INJECT(playback, framework::IInteractive, interactive)
|
||||
|
||||
|
@ -106,8 +106,6 @@ public slots:
|
|||
void setMutedBySolo(bool isMuted);
|
||||
void setSolo(bool solo);
|
||||
|
||||
void panel(ui::NavigationPanel* panel);
|
||||
|
||||
signals:
|
||||
void titleChanged(QString title);
|
||||
|
||||
|
|
Loading…
Reference in a new issue