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
6b0da608
Commit
6b0da608
authored
Nov 12, 2009
by
Ludovic Fauvet
Browse files
Support clear in the timeline controls.
Avoid duplicates item when loading a project.
parent
2f18ed60
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/GUI/Timeline.cpp
View file @
6b0da608
...
...
@@ -74,6 +74,7 @@ Timeline::Timeline( WorkflowRenderer* renderer, QWidget *parent ) :
connect
(
m_mainWorkflow
,
SIGNAL
(
clipMoved
(
QUuid
,
uint
,
qint64
,
MainWorkflow
::
TrackType
)
),
this
,
SLOT
(
actionMoveClip
(
QUuid
,
uint
,
qint64
,
MainWorkflow
::
TrackType
)
)
);
connect
(
m_mainWorkflow
,
SIGNAL
(
clipRemoved
(
Clip
*
,
uint
,
MainWorkflow
::
TrackType
)
),
this
,
SLOT
(
actionRemoveClip
(
Clip
*
,
uint
,
MainWorkflow
::
TrackType
))
);
connect
(
m_mainWorkflow
,
SIGNAL
(
cleared
()
),
tracksView
(),
SLOT
(
clear
()
)
);
connect
(
m_mainWorkflow
,
SIGNAL
(
cleared
()
),
m_tracksControls
,
SLOT
(
clear
()
)
);
connect
(
m_tracksView
,
SIGNAL
(
videoTrackAdded
(
GraphicsTrack
*
)
),
m_tracksControls
,
SLOT
(
addVideoTrack
(
GraphicsTrack
*
)
)
);
...
...
src/GUI/TracksControls.cpp
View file @
6b0da608
...
...
@@ -41,11 +41,11 @@ TracksControls::TracksControls( QWidget* parent )
m_layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_layout
->
setSpacing
(
0
);
QWidget
*
separator
=
new
QWidget
;
separator
->
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
separator
->
setMinimumHeight
(
20
);
separator
->
setMaximumHeight
(
20
);
m_layout
->
addWidget
(
separator
);
m_
separator
=
new
QWidget
;
m_
separator
->
setSizePolicy
(
QSizePolicy
::
Minimum
,
QSizePolicy
::
Fixed
);
m_
separator
->
setMinimumHeight
(
20
);
m_
separator
->
setMaximumHeight
(
20
);
m_layout
->
addWidget
(
m_
separator
);
m_centralWidget
->
setLayout
(
m_layout
);
setWidget
(
m_centralWidget
);
...
...
@@ -68,3 +68,16 @@ void TracksControls::addAudioTrack( GraphicsTrack* track )
item
->
setContentsMargins
(
0
,
0
,
0
,
0
);
m_layout
->
insertWidget
(
-
1
,
item
);
}
void
TracksControls
::
clear
()
{
m_layout
->
removeWidget
(
m_separator
);
QLayoutItem
*
child
;
while
(
(
child
=
m_layout
->
takeAt
(
0
)
)
!=
0
)
{
if
(
child
->
widget
()
)
delete
child
->
widget
();
delete
child
;
}
m_layout
->
addWidget
(
m_separator
);
}
src/GUI/TracksControls.h
View file @
6b0da608
...
...
@@ -37,9 +37,11 @@ public:
public
slots
:
void
addVideoTrack
(
GraphicsTrack
*
track
);
void
addAudioTrack
(
GraphicsTrack
*
track
);
void
clear
();
private:
QWidget
*
m_centralWidget
;
QWidget
*
m_separator
;
QVBoxLayout
*
m_layout
;
};
...
...
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