Commit 5b68ea12 authored by Aleksei Kanash's avatar Aleksei Kanash

Fixed wrong connects in media item.

parent f6585ab8
......@@ -85,9 +85,6 @@ public:
return Type;
}
void hasMediaChanged(bool hasMedia);
void showOnDisplayChanged(bool shown);
virtual QUrl mediaFileUrl() const
{
return mMediaFileUrl;
......@@ -138,6 +135,8 @@ public slots:
void toggleMute();
void activeSceneChanged();
void hasMediaChanged(bool hasMedia);
void showOnDisplayChanged(bool shown);
protected:
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment