|
|
|
@ -74,17 +74,13 @@ void UBGraphicsMediaItemDelegate::buildButtons() |
|
|
|
|
{ |
|
|
|
|
mPlayPauseButton = new DelegateButton(":/images/play.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); |
|
|
|
|
connect(mPlayPauseButton, SIGNAL(clicked(bool)), this, SLOT(togglePlayPause())); |
|
|
|
|
connect(mPlayPauseButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mStopButton = new DelegateButton(":/images/stop.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); |
|
|
|
|
connect(mStopButton, SIGNAL(clicked(bool)), mMedia, SLOT(stop())); |
|
|
|
|
connect(mStopButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
|
|
|
|
|
mMediaControl = new DelegateMediaControl(delegated(), mToolBarItem); |
|
|
|
|
mMediaControl->setFlag(QGraphicsItem::ItemIsSelectable, true); |
|
|
|
|
UBGraphicsItem::assignZValue(mMediaControl, delegated()->zValue()); |
|
|
|
|
connect(mMediaControl, SIGNAL(used()), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
|
|
|
|
|
if (delegated()->isMuted()) |
|
|
|
|
mMuteButton = new DelegateButton(":/images/soundOff.svg", mDelegated, mToolBarItem, Qt::TitleBarArea); |
|
|
|
@ -93,7 +89,6 @@ void UBGraphicsMediaItemDelegate::buildButtons() |
|
|
|
|
|
|
|
|
|
connect(mMuteButton, SIGNAL(clicked(bool)), delegated(), SLOT(toggleMute()));
|
|
|
|
|
connect(mMuteButton, SIGNAL(clicked(bool)), this, SLOT(toggleMute())); // for changing button image
|
|
|
|
|
connect(mMuteButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
|
|
|
|
|
mButtons << mPlayPauseButton << mStopButton << mMuteButton; |
|
|
|
|
|
|
|
|
@ -101,6 +96,14 @@ void UBGraphicsMediaItemDelegate::buildButtons() |
|
|
|
|
mToolBarItem->setVisibleOnBoard(true); |
|
|
|
|
mToolBarItem->setShifting(false); |
|
|
|
|
|
|
|
|
|
if (mToolBarShowTimer) |
|
|
|
|
{ |
|
|
|
|
connect(mPlayPauseButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
connect(mStopButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
connect(mMediaControl, SIGNAL(used()), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
connect(mMuteButton, SIGNAL(clicked(bool)), mToolBarShowTimer, SLOT(start())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
UBGraphicsMediaItem *audioItem = dynamic_cast<UBGraphicsMediaItem*>(mDelegated); |
|
|
|
|
if (audioItem) |
|
|
|
|
{ |
|
|
|
|