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
b4a452f1
Commit
b4a452f1
authored
Jan 14, 2010
by
Clement CHAVANCE
Browse files
Clip List works with the import / library refactor
parent
549bd642
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/Gui/import/ImportController.cpp
View file @
b4a452f1
...
...
@@ -153,12 +153,15 @@ ImportController::clipSelection( const QUuid& uuid )
p
.
setColor
(
QPalette
::
Window
,
QColor
(
Qt
::
darkBlue
)
);
m_clipListController
->
cell
(
uuid
)
->
setPalette
(
p
);
Clip
*
clip
;
foreach
(
QUuid
id
,
Library
::
getInstance
()
->
m
edias
()
->
keys
()
)
foreach
(
QUuid
id
,
Library
::
getInstance
()
->
temporaryM
edias
()
->
keys
()
)
{
Media
*
media
=
Library
::
getInstance
()
->
m
edias
()
->
value
(
id
);
Media
*
media
=
Library
::
getInstance
()
->
temporaryM
edias
()
->
value
(
id
);
if
(
(
clip
=
media
->
clip
(
uuid
)
)
!=
0
)
break
;
}
if
(
clip
==
0
)
return
;
qDebug
()
<<
"ImportController::clipSelection clip"
<<
clip
;
setUIMetaData
(
clip
);
if
(
uuid
!=
m_currentUuid
)
m_preview
->
stop
();
...
...
src/Gui/library/ClipListViewController.cpp
View file @
b4a452f1
...
...
@@ -33,6 +33,8 @@ ClipListViewController::ClipListViewController( StackViewController* nav, const
m_currentUuid
(),
m_deletion
(
0
)
{
connect
(
this
,
SIGNAL
(
clipDeleted
(
const
QUuid
&
,
const
QUuid
&
)
),
Library
::
getInstance
(),
SLOT
(
removeClip
(
const
QUuid
&
,
const
QUuid
&
)
)
);
}
ClipListViewController
::~
ClipListViewController
()
...
...
@@ -101,7 +103,7 @@ void ClipListViewController::clipDeletion( const QUuid& uuid )
removeCell
(
cell
);
m_cells
.
remove
(
uuid
);
m_currentUuid
=
QUuid
();
Library
::
getInstance
()
->
media
(
m_mediaId
)
->
removeClip
(
uuid
);
m_cells
.
remove
(
uuid
);
emit
clipDeleted
(
m_mediaId
,
uuid
);
}
}
src/Gui/library/ClipListViewController.h
View file @
b4a452f1
...
...
@@ -52,7 +52,7 @@ class ClipListViewController : public ListViewController
signals:
void
clipSelected
(
const
QUuid
&
uuid
);
void
clipDeleted
(
const
QUuid
&
uui
d
);
void
clipDeleted
(
const
QUuid
&
mediaId
,
const
QUuid
&
clipI
d
);
};
#endif
src/Gui/library/MediaLibraryWidget.cpp
View file @
b4a452f1
...
...
@@ -39,7 +39,6 @@ MediaLibraryWidget::MediaLibraryWidget( QWidget* parent ) : QWidget( parent )
connect
(
m_nav
,
SIGNAL
(
importRequired
()
),
this
,
SIGNAL
(
importRequired
()
)
);
//Clip
//connect( list, SIGNAL( clipSelected( Clip* clip ) ), this, SIGNAL( clipSelected( Clip* ) ) );
//connect( list, SIGNAL( clipRemoved( const QUuid&, const QUuid& ) ), library, SLOT( removeClip( const QUuid&, const QUuid& ) ) );
connect
(
this
,
SIGNAL
(
addClipToViewController
(
Clip
*
)
),
list
,
SLOT
(
newClipAdded
(
Clip
*
)
)
);
m_nav
->
pushViewController
(
list
);
}
...
...
src/Gui/library/MediaListViewController.cpp
View file @
b4a452f1
...
...
@@ -49,6 +49,8 @@ void MediaListViewController::newMediaLoaded( const QUuid& uuid )
this
,
SLOT
(
cellSelection
(
QUuid
)
)
);
connect
(
cell
,
SIGNAL
(
cellDeleted
(
QUuid
)
),
this
,
SLOT
(
mediaDeletion
(
QUuid
)
)
);
connect
(
cell
,
SIGNAL
(
arrowClicked
(
const
QUuid
&
)
),
this
,
SLOT
(
showClipList
(
const
QUuid
&
)
)
);
if
(
media
->
getMetadata
()
!=
Media
::
ParsedWithSnapshot
)
connect
(
media
,
SIGNAL
(
snapshotComputed
(
Media
*
)
),
...
...
@@ -102,12 +104,14 @@ void MediaListViewController::updateCell( Media* media )
void
MediaListViewController
::
showClipList
(
const
QUuid
&
uuid
)
{
qDebug
()
<<
"nb clips :"
<<
Library
::
getInstance
()
->
media
(
uuid
)
->
clips
()
->
size
();
if
(
Library
::
getInstance
()
->
media
(
uuid
)
==
NULL
||
Library
::
getInstance
()
->
media
(
uuid
)
->
clips
()
->
size
()
==
0
)
return
;
qDebug
()
<<
"uuid"
<<
uuid
<<
"lastUuid"
<<
m_lastUuidClipListAsked
;
if
(
m_lastUuidClipListAsked
!=
uuid
)
{
m_lastUuidClipListAsked
=
m_currentU
uid
;
m_lastUuidClipListAsked
=
u
uid
;
if
(
m_clipsListView
!=
0
)
delete
m_clipsListView
;
m_clipsListView
=
new
ClipListViewController
(
m_nav
,
uuid
);
...
...
Write
Preview
Supports
Markdown
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