Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
5b68ea12
Commit
5b68ea12
authored
Aug 03, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong connects in media item.
parent
f6585ab8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
UBGraphicsMediaItem.h
src/domain/UBGraphicsMediaItem.h
+2
-3
UBGraphicsMediaItemDelegate.cpp
src/domain/UBGraphicsMediaItemDelegate.cpp
+8
-5
No files found.
src/domain/UBGraphicsMediaItem.h
View file @
5b68ea12
...
@@ -85,9 +85,6 @@ public:
...
@@ -85,9 +85,6 @@ public:
return
Type
;
return
Type
;
}
}
void
hasMediaChanged
(
bool
hasMedia
);
void
showOnDisplayChanged
(
bool
shown
);
virtual
QUrl
mediaFileUrl
()
const
virtual
QUrl
mediaFileUrl
()
const
{
{
return
mMediaFileUrl
;
return
mMediaFileUrl
;
...
@@ -138,6 +135,8 @@ public slots:
...
@@ -138,6 +135,8 @@ public slots:
void
toggleMute
();
void
toggleMute
();
void
activeSceneChanged
();
void
activeSceneChanged
();
void
hasMediaChanged
(
bool
hasMedia
);
void
showOnDisplayChanged
(
bool
shown
);
protected
:
protected
:
...
...
src/domain/UBGraphicsMediaItemDelegate.cpp
View file @
5b68ea12
...
@@ -74,17 +74,13 @@ void UBGraphicsMediaItemDelegate::buildButtons()
...
@@ -74,17 +74,13 @@ void UBGraphicsMediaItemDelegate::buildButtons()
{
{
mPlayPauseButton
=
new
DelegateButton
(
":/images/play.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
mPlayPauseButton
=
new
DelegateButton
(
":/images/play.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
connect
(
mPlayPauseButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
togglePlayPause
()));
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
);
mStopButton
=
new
DelegateButton
(
":/images/stop.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
connect
(
mStopButton
,
SIGNAL
(
clicked
(
bool
)),
mMedia
,
SLOT
(
stop
()));
connect
(
mStopButton
,
SIGNAL
(
clicked
(
bool
)),
mMedia
,
SLOT
(
stop
()));
connect
(
mStopButton
,
SIGNAL
(
clicked
(
bool
)),
mToolBarShowTimer
,
SLOT
(
start
()));
mMediaControl
=
new
DelegateMediaControl
(
delegated
(),
mToolBarItem
);
mMediaControl
=
new
DelegateMediaControl
(
delegated
(),
mToolBarItem
);
mMediaControl
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
mMediaControl
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
UBGraphicsItem
::
assignZValue
(
mMediaControl
,
delegated
()
->
zValue
());
UBGraphicsItem
::
assignZValue
(
mMediaControl
,
delegated
()
->
zValue
());
connect
(
mMediaControl
,
SIGNAL
(
used
()),
mToolBarShowTimer
,
SLOT
(
start
()));
if
(
delegated
()
->
isMuted
())
if
(
delegated
()
->
isMuted
())
mMuteButton
=
new
DelegateButton
(
":/images/soundOff.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
mMuteButton
=
new
DelegateButton
(
":/images/soundOff.svg"
,
mDelegated
,
mToolBarItem
,
Qt
::
TitleBarArea
);
...
@@ -93,7 +89,6 @@ void UBGraphicsMediaItemDelegate::buildButtons()
...
@@ -93,7 +89,6 @@ void UBGraphicsMediaItemDelegate::buildButtons()
connect
(
mMuteButton
,
SIGNAL
(
clicked
(
bool
)),
delegated
(),
SLOT
(
toggleMute
()));
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
)),
this
,
SLOT
(
toggleMute
()));
// for changing button image
connect
(
mMuteButton
,
SIGNAL
(
clicked
(
bool
)),
mToolBarShowTimer
,
SLOT
(
start
()));
mButtons
<<
mPlayPauseButton
<<
mStopButton
<<
mMuteButton
;
mButtons
<<
mPlayPauseButton
<<
mStopButton
<<
mMuteButton
;
...
@@ -101,6 +96,14 @@ void UBGraphicsMediaItemDelegate::buildButtons()
...
@@ -101,6 +96,14 @@ void UBGraphicsMediaItemDelegate::buildButtons()
mToolBarItem
->
setVisibleOnBoard
(
true
);
mToolBarItem
->
setVisibleOnBoard
(
true
);
mToolBarItem
->
setShifting
(
false
);
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
);
UBGraphicsMediaItem
*
audioItem
=
dynamic_cast
<
UBGraphicsMediaItem
*>
(
mDelegated
);
if
(
audioItem
)
if
(
audioItem
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment