Replaced QMediaRecorderControl::play/stop/pause with setState

This allows to introduce new states without breaking BC.

Change-Id: I03c064cec92d6745b251a51cfb301e7f01f4b765
Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
Dmytro Poplavskiy
2012-05-02 11:15:44 +10:00
committed by Qt by Nokia
parent b7935a84d7
commit b36e2f5209
8 changed files with 62 additions and 51 deletions

View File

@@ -130,6 +130,22 @@ public slots:
emit statusChanged(m_status);
}
void setState(QMediaRecorder::State state)
{
switch (state) {
case QMediaRecorder::StoppedState:
stop();
break;
case QMediaRecorder::PausedState:
pause();
break;
case QMediaRecorder::RecordingState:
record();
break;
}
}
void setMuted(bool muted)
{
if (m_muted != muted)