Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
077b7674
Commit
077b7674
authored
Jun 21, 2009
by
Ludovic Fauvet
Browse files
Embedding the track number into the GraphicsTrack objects
parent
ce11a343
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gui/TracksView.cpp
View file @
077b7674
...
...
@@ -102,7 +102,7 @@ void TracksView::createLayout()
void
TracksView
::
addVideoTrack
()
{
GraphicsTrack
*
track
=
new
GraphicsTrack
(
GraphicsTrack
::
Video
);
GraphicsTrack
*
track
=
new
GraphicsTrack
(
GraphicsTrack
::
Video
,
m_videoTracksCounter
);
track
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Fixed
);
track
->
setPreferredHeight
(
m_tracksHeight
);
track
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -116,7 +116,7 @@ void TracksView::addVideoTrack()
void
TracksView
::
addAudioTrack
()
{
GraphicsTrack
*
track
=
new
GraphicsTrack
(
GraphicsTrack
::
Audio
);
GraphicsTrack
*
track
=
new
GraphicsTrack
(
GraphicsTrack
::
Audio
,
0
);
track
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Fixed
);
track
->
setPreferredHeight
(
m_tracksHeight
);
track
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
src/gui/TracksView.h
View file @
077b7674
...
...
@@ -48,9 +48,14 @@ public:
Video
,
Audio
};
GraphicsTrack
(
Type
type
,
QGraphicsItem
*
parent
=
0
)
:
QGraphicsWidget
(
parent
)
GraphicsTrack
(
Type
type
,
int
trackNumber
,
QGraphicsItem
*
parent
=
0
)
:
QGraphicsWidget
(
parent
)
{
m_type
=
type
;
m_trackNumber
=
trackNumber
;
}
int
trackNumber
()
{
return
m_trackNumber
;
}
protected:
...
...
@@ -66,6 +71,7 @@ protected:
private:
Type
m_type
;
int
m_trackNumber
;
};
class
TracksView
:
public
QGraphicsView
...
...
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