active indicator working
This commit is contained in:
parent
0795157d5f
commit
6056778856
2 changed files with 5 additions and 12 deletions
|
@ -248,6 +248,7 @@ void CueTrackListWidget::redrawCueTrackList()
|
||||||
tableWidget->resizeRowsToContents();
|
tableWidget->resizeRowsToContents();
|
||||||
tableWidget->scrollToItem(tableWidget->item(selectedIndex, 0));
|
tableWidget->scrollToItem(tableWidget->item(selectedIndex, 0));
|
||||||
tableWidget->blockSignals(false);
|
tableWidget->blockSignals(false);
|
||||||
|
emit changeSelectedIndex(selectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
@ -451,7 +452,6 @@ void saveCueTrackToXml(const CueTrack& cueTrack, const QString& filename) {
|
||||||
xmlWriter.writeTextElement("entryPoint", QString::number(cueTrack.entryPoint));
|
xmlWriter.writeTextElement("entryPoint", QString::number(cueTrack.entryPoint));
|
||||||
xmlWriter.writeTextElement("exitPoint", QString::number(cueTrack.exitPoint));
|
xmlWriter.writeTextElement("exitPoint", QString::number(cueTrack.exitPoint));
|
||||||
xmlWriter.writeTextElement("audioLayer", QString::number(cueTrack.audioLayer));
|
xmlWriter.writeTextElement("audioLayer", QString::number(cueTrack.audioLayer));
|
||||||
xmlWriter.writeTextElement("active", cueTrack.active ? "true" : "false");
|
|
||||||
|
|
||||||
xmlWriter.writeEndElement();
|
xmlWriter.writeEndElement();
|
||||||
xmlWriter.writeEndDocument();
|
xmlWriter.writeEndDocument();
|
||||||
|
@ -514,9 +514,7 @@ CueTrack loadCueTrackFromXml(const QString& filename) {
|
||||||
cueTrack.exitPoint = xmlReader.readElementText().toInt();
|
cueTrack.exitPoint = xmlReader.readElementText().toInt();
|
||||||
} else if (elementName == "audioLayer") {
|
} else if (elementName == "audioLayer") {
|
||||||
cueTrack.audioLayer = xmlReader.readElementText().toInt();
|
cueTrack.audioLayer = xmlReader.readElementText().toInt();
|
||||||
} else if (elementName == "active") {
|
}
|
||||||
cueTrack.active = xmlReader.readElementText() == "true";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xmlReader.hasError()) {
|
if (xmlReader.hasError()) {
|
||||||
|
@ -545,7 +543,6 @@ void CueTrackListWidget::cueTrackAtEnd(int layer)
|
||||||
{
|
{
|
||||||
cur->active = false;
|
cur->active = false;
|
||||||
}
|
}
|
||||||
layer--;
|
}
|
||||||
}
|
|
||||||
redrawCueTrackList();
|
redrawCueTrackList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,16 +34,11 @@ void ShowPlayer::go()
|
||||||
if (current->audioLayer < 0)
|
if (current->audioLayer < 0)
|
||||||
return;
|
return;
|
||||||
ui->activeCueLabel->setText(current->name.data());
|
ui->activeCueLabel->setText(current->name.data());
|
||||||
for (int i = 0; i < MAX_LAYERS; i++) {
|
|
||||||
if (layersUsed[i] == -1) {
|
|
||||||
layersUsed[i] = current->userNumber;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!current->filePath.empty())
|
if (!current->filePath.empty())
|
||||||
emit uiLoadMedia(current->audioLayer, current->filePath.data());
|
emit uiLoadMedia(current->audioLayer, current->filePath.data());
|
||||||
updateTrackStateInEngine(current);
|
updateTrackStateInEngine(current);
|
||||||
emit uiPlaybackChanged(current->audioLayer, current->status);
|
emit uiPlaybackChanged(current->audioLayer, current->status);
|
||||||
|
ui->cueListWidget->cueTrackAtEnd(current->audioLayer);
|
||||||
switch (current->status) {
|
switch (current->status) {
|
||||||
case Status::PlayingOnce:
|
case Status::PlayingOnce:
|
||||||
case Status::PlayingLoop:
|
case Status::PlayingLoop:
|
||||||
|
@ -51,6 +46,7 @@ void ShowPlayer::go()
|
||||||
case Status::PlayingFolderLoop:
|
case Status::PlayingFolderLoop:
|
||||||
case Status::PlayingFolderRandom:
|
case Status::PlayingFolderRandom:
|
||||||
current->active = true;
|
current->active = true;
|
||||||
|
layersUsed[current->audioLayer] = current->userNumber;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
current->active = false;
|
current->active = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue