quita de la lista las cues en stop o paused cuando acaben su ejeución.
This commit is contained in:
parent
14a51c88e9
commit
d35b166ce5
6 changed files with 48 additions and 97 deletions
|
@ -34,14 +34,13 @@ void CueTrackWidget::loadCueTrack(CueTrack* track)
|
||||||
ui->pitch->display(track->pitch);
|
ui->pitch->display(track->pitch);
|
||||||
ui->bus1->display(track->bus1);
|
ui->bus1->display(track->bus1);
|
||||||
ui->bus2->display(track->bus2);
|
ui->bus2->display(track->bus2);
|
||||||
ui->fade->setValue(track->fadeOut);
|
ui->fade->setValue(track->fadeIn);
|
||||||
ui->waitIn->setValue(track->waitIn);
|
ui->waitIn->setValue(track->waitIn);
|
||||||
ui->waitOut->setValue(track->waitOut);
|
ui->waitOut->setValue(track->waitOut);
|
||||||
ui->halt->setChecked(track->stopAtEnd);
|
ui->halt->setChecked(track->stopAtEnd);
|
||||||
QFileInfo fileInfo(track->filePath.data());
|
QFileInfo fileInfo(track->filePath.data());
|
||||||
fileInfo.fileName().truncate(64);
|
fileInfo.fileName().truncate(64);
|
||||||
ui->mediaFileName->setText(fileInfo.fileName());
|
ui->mediaFileName->setText(fileInfo.fileName());
|
||||||
ui->mediaEndTimeEdit->setTime(QTime::fromMSecsSinceStartOfDay(track->duration));
|
|
||||||
ui->status->setText(statusToString(track->status));
|
ui->status->setText(statusToString(track->status));
|
||||||
ui->audioLayer->display(track->audioLayer);
|
ui->audioLayer->display(track->audioLayer);
|
||||||
ui->multi->setChecked(track->multi);
|
ui->multi->setChecked(track->multi);
|
||||||
|
@ -88,20 +87,8 @@ void CueTrackWidget::waitOutSlot()
|
||||||
emit cueFinished(ui->audioLayer->intValue());
|
emit cueFinished(ui->audioLayer->intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CueTrackWidget::refreshCurrentTime(int time)
|
|
||||||
{
|
|
||||||
QTime t;
|
|
||||||
t.fromMSecsSinceStartOfDay(time);
|
|
||||||
ui->mediaCurrentTimeEdit->setTime(t);
|
|
||||||
ui->mediaProgressBar->setValue(time);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CueTrackWidget::setNextCue()
|
void CueTrackWidget::setNextCue()
|
||||||
{
|
{
|
||||||
ui->cueProgressBar->setDisabled(true);
|
ui->cueProgressBar->setDisabled(true);
|
||||||
ui->cueProgressBar->hide();
|
ui->cueProgressBar->hide();
|
||||||
ui->mediaProgressBar->setDisabled(true);
|
|
||||||
ui->mediaProgressBar->hide();
|
|
||||||
ui->mediaCurrentTimeEdit->setDisabled(true);
|
|
||||||
ui->mediaCurrentTimeEdit->hide();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ public slots:
|
||||||
void setNextCue();
|
void setNextCue();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void refreshCurrentTime(int time);
|
|
||||||
void fadeSlot();
|
void fadeSlot();
|
||||||
void waitInSlot();
|
void waitInSlot();
|
||||||
void waitOutSlot();
|
void waitOutSlot();
|
||||||
|
|
|
@ -217,75 +217,29 @@
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QProgressBar" name="mediaProgressBar">
|
<widget class="QLabel" name="mediaFileName">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>100</width>
|
<width>0</width>
|
||||||
<height>0</height>
|
<height>24</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="maximumSize">
|
||||||
<string>Cue Progress</string>
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="font">
|
||||||
<string>Media Progress</string>
|
<font>
|
||||||
</property>
|
<pointsize>10</pointsize>
|
||||||
<property name="value">
|
</font>
|
||||||
<number>24</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QTimeEdit" name="mediaCurrentTimeEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Media current time</string>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buttonSymbols">
|
|
||||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QTimeEdit" name="mediaEndTimeEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::NoFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="statusTip">
|
|
||||||
<string>Media Edn Time</string>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="buttonSymbols">
|
|
||||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel" name="mediaFileName">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>7</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Media FIle Name</string>
|
<string>Media FIle Name</string>
|
||||||
|
@ -365,7 +319,7 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="waitIn">
|
<widget class="QDoubleSpinBox" name="fade">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -403,7 +357,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QDoubleSpinBox" name="fade">
|
<widget class="QDoubleSpinBox" name="waitIn">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -422,6 +376,9 @@
|
||||||
<property name="accessibleDescription">
|
<property name="accessibleDescription">
|
||||||
<string>Fade In Time in seconds</string>
|
<string>Fade In Time in seconds</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="wrapping">
|
<property name="wrapping">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -810,13 +767,11 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>mediaCurrentTimeEdit</tabstop>
|
|
||||||
<tabstop>waitOut</tabstop>
|
<tabstop>waitOut</tabstop>
|
||||||
<tabstop>waitIn</tabstop>
|
<tabstop>fade</tabstop>
|
||||||
<tabstop>entryPoint</tabstop>
|
<tabstop>entryPoint</tabstop>
|
||||||
<tabstop>exitPoint</tabstop>
|
<tabstop>exitPoint</tabstop>
|
||||||
<tabstop>fade</tabstop>
|
<tabstop>waitIn</tabstop>
|
||||||
<tabstop>mediaEndTimeEdit</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../lms-resources.qrc"/>
|
<include location="../lms-resources.qrc"/>
|
||||||
|
|
|
@ -12,6 +12,7 @@ ShowPlayer::ShowPlayer(QWidget *parent) :
|
||||||
connect(ui->SaveCueList, SIGNAL(clicked()), this, SLOT(saveCueTrackList()));
|
connect(ui->SaveCueList, SIGNAL(clicked()), this, SLOT(saveCueTrackList()));
|
||||||
connect(ui->LoadCueList, SIGNAL(clicked()), this, SLOT(loadCueTrackList()));
|
connect(ui->LoadCueList, SIGNAL(clicked()), this, SLOT(loadCueTrackList()));
|
||||||
connect(ui->goButton, SIGNAL(clicked()), this, SLOT(go()));
|
connect(ui->goButton, SIGNAL(clicked()), this, SLOT(go()));
|
||||||
|
connect(ui->cueListWidget, SIGNAL(changeSelectedIndex(int)), this, SLOT(updateIndex(int)));
|
||||||
currentStatus = Status::Iddle;
|
currentStatus = Status::Iddle;
|
||||||
for(int i = 0; i < MAX_LAYERS; i++) {
|
for(int i = 0; i < MAX_LAYERS; i++) {
|
||||||
layersUsed[i] = -1;
|
layersUsed[i] = -1;
|
||||||
|
@ -92,8 +93,12 @@ void ShowPlayer::cueTrackAtEnd(int layer)
|
||||||
|
|
||||||
void ShowPlayer::cueFinished(int c)
|
void ShowPlayer::cueFinished(int c)
|
||||||
{
|
{
|
||||||
if (current[c] && !current[c]->stopAtEnd)
|
if (!current[c])
|
||||||
|
return;
|
||||||
|
if (!current[c]->stopAtEnd)
|
||||||
this->go();
|
this->go();
|
||||||
|
if (current[c]->status == Status::Stopped || current[c]->status == Status::Paused)
|
||||||
|
cueTrackAtEnd(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
CueTrackWidget *ShowPlayer::addCueTrackWidget(CueTrack* track) {
|
CueTrackWidget *ShowPlayer::addCueTrackWidget(CueTrack* track) {
|
||||||
|
@ -130,3 +135,12 @@ void ShowPlayer::removeCueTrackWidget(int audioLayer) {
|
||||||
cueTrackWidgetPlaying[audioLayer] = nullptr;
|
cueTrackWidgetPlaying[audioLayer] = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ShowPlayer::updateIndex(int index) {
|
||||||
|
if (index < 0)
|
||||||
|
return;
|
||||||
|
CueTrack *track = ui->cueListWidget->getSelectedTrack(false);
|
||||||
|
if (track) {
|
||||||
|
ui->nextCue->loadCueTrack(track);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ private slots:
|
||||||
void removeCueTrackWidget(int index);
|
void removeCueTrackWidget(int index);
|
||||||
void playCueTrack(CueTrack *track);
|
void playCueTrack(CueTrack *track);
|
||||||
void goAction(int channel);
|
void goAction(int channel);
|
||||||
|
void updateIndex(int index);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void uiPlaybackChanged(int layer, Status s);
|
void uiPlaybackChanged(int layer, Status s);
|
||||||
|
|
|
@ -34,10 +34,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="splitter_2">
|
<widget class="QSplitter" name="splitter_3">
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::Box</enum>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -241,19 +238,10 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QSplitter" name="masterSplitter">
|
<widget class="QSplitter" name="splitter_2">
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="handleWidth">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QPushButton" name="goButton">
|
<widget class="QPushButton" name="goButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
@ -287,6 +275,7 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="CueTrackWidget" name="nextCue" native="true"/>
|
||||||
<widget class="QToolButton" name="panicButton">
|
<widget class="QToolButton" name="panicButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
@ -356,6 +345,12 @@
|
||||||
<header>src/cuetracklistwidget.h</header>
|
<header>src/cuetracklistwidget.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>CueTrackWidget</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>src/cuetrackwidget.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>NewCue</tabstop>
|
<tabstop>NewCue</tabstop>
|
||||||
|
|
Loading…
Add table
Reference in a new issue