remove swing playback control

This commit is contained in:
lasconic 2012-06-21 12:14:08 +02:00
parent f78ea4ae8a
commit 3481180e06
5 changed files with 13 additions and 74 deletions

View file

@ -295,7 +295,6 @@ void Score::init()
_repeatList = new RepeatList(this);
foreach(StaffType* st, ::staffTypes)
_staffTypes.append(st->clone());
_swingRatio = 0.0;
_mscVersion = MSCVERSION;
_created = false;

View file

@ -294,8 +294,6 @@ class Score {
///< saves will not overwrite the backup file.
int _playPos; ///< sequencer seek position
qreal _swingRatio; ///< Swing ratio
bool _foundPlayPosAfterRepeats; ///< Temporary used during playback rendering
///< indicating if playPos after expanded repeats
///< has been calculated.
@ -673,9 +671,6 @@ class Score {
void setPause(int tick, qreal seconds);
qreal tempo(int tick) const;
qreal swingRatio() { return _swingRatio;}
void setSwingRatio(qreal d) { _swingRatio = d;}
bool creditsRead() const { return _creditsRead; }
void setCreditsRead(bool val) { _creditsRead = val; }
bool defaultsRead() const { return _defaultsRead; }

View file

@ -48,7 +48,6 @@ PlayPanel::PlayPanel(QWidget* parent)
connect(volumeSlider, SIGNAL(valueChanged(double,int)), SLOT(volumeChanged(double,int)));
connect(posSlider, SIGNAL(sliderMoved(int)), SLOT(setPos(int)));
connect(tempoSlider, SIGNAL(valueChanged(double,int)), SLOT(relTempoChanged(double,int)));
connect(swingStyle, SIGNAL(currentIndexChanged(int)), SLOT(swingStyleChanged(int)));
}
//---------------------------------------------------------
@ -88,7 +87,6 @@ void PlayPanel::setScore(Score* s)
volumeSlider->setEnabled(enable);
posSlider->setEnabled(enable);
tempoSlider->setEnabled(enable);
swingStyle->setEnabled(enable);
if (cs) {
setTempo(cs->tempomap()->tempo(0));
setRelTempo(cs->tempomap()->relTempo());
@ -170,36 +168,6 @@ void PlayPanel::setPos(int tick)
heartBeat(tick, tick);
}
//---------------------------------------------------------
// swingStyleChanged
//---------------------------------------------------------
void PlayPanel::swingStyleChanged(int index)
{
if (cs == 0)
return;
switch (index){
case 0:
cs->setSwingRatio(0);
break;
case 1:
cs->setSwingRatio(0.333);
break;
case 2:
cs->setSwingRatio(0.5);
break;
}
if (seq->isRunning()) {
if (seq->isStopped()) {
seq->collectEvents();
}
else {
seq->guiStop(); // stop
seq->start(); // start
}
}
}
//---------------------------------------------------------
// heartBeat
//---------------------------------------------------------

View file

@ -39,7 +39,6 @@ class PlayPanel : public QWidget, private Ui::PlayPanelBase {
private slots:
void volumeChanged(double,int);
void swingStyleChanged(int);
void relTempoChanged(double,int);
signals:

View file

@ -1209,41 +1209,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QComboBox" name="swingStyle">
<property name="toolTip">
<string/>
</property>
<item>
<property name="text">
<string>Straight</string>
</property>
</item>
<item>
<property name="text">
<string>Swing</string>
</property>
</item>
<item>
<property name="text">
<string>Shuffle</string>
</property>
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="rewindButton">
<property name="text">
@ -1280,6 +1245,19 @@
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>