Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
bfd69f94
Commit
bfd69f94
authored
Jan 18, 2010
by
Christophe Courtaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable and update cell when metadata parsed
parent
19fa3631
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
1 deletion
+17
-1
src/Gui/import/ImportMediaListController.cpp
src/Gui/import/ImportMediaListController.cpp
+2
-0
src/Gui/library/MediaCellView.cpp
src/Gui/library/MediaCellView.cpp
+7
-0
src/Gui/library/MediaCellView.h
src/Gui/library/MediaCellView.h
+1
-0
src/Gui/library/MediaListViewController.cpp
src/Gui/library/MediaListViewController.cpp
+7
-1
No files found.
src/Gui/import/ImportMediaListController.cpp
View file @
bfd69f94
...
...
@@ -52,6 +52,8 @@ ImportMediaListController::addMedia( Media* media )
addCell
(
cell
);
m_mediaCellList
->
insert
(
media
->
getUuid
(),
cell
);
if
(
media
->
baseClip
()
==
NULL
)
connect
(
media
,
SIGNAL
(
metaDataComputed
(
Media
*
)
),
cell
,
SLOT
(
enableCell
()
)
);
}
void
...
...
src/Gui/library/MediaCellView.cpp
View file @
bfd69f94
...
...
@@ -40,6 +40,7 @@ MediaCellView::MediaCellView( const QUuid& uuid, QWidget *parent ) :
connect
(
m_ui
->
arrow
,
SIGNAL
(
clicked
(
QWidget
*
,
QMouseEvent
*
)
),
SLOT
(
arrowButtonClicked
(
QWidget
*
,
QMouseEvent
*
)
)
);
setEnabled
(
false
);
}
MediaCellView
::~
MediaCellView
()
...
...
@@ -200,3 +201,9 @@ MediaCellView::containsClip()
SIGNAL
(
clicked
(
QWidget
*
,
QMouseEvent
*
)
),
this
,
SLOT
(
arrowButtonClicked
(
QWidget
*
,
QMouseEvent
*
)
)
);
}
void
MediaCellView
::
enableCell
()
{
this
->
setEnabled
(
true
);
}
src/Gui/library/MediaCellView.h
View file @
bfd69f94
...
...
@@ -79,6 +79,7 @@ signals:
public
slots
:
void
deleteButtonClicked
(
QWidget
*
sender
,
QMouseEvent
*
event
);
void
arrowButtonClicked
(
QWidget
*
sender
,
QMouseEvent
*
event
);
void
enableCell
();
};
...
...
src/Gui/library/MediaListViewController.cpp
View file @
bfd69f94
...
...
@@ -52,13 +52,14 @@ void MediaListViewController::newMediaLoaded( const QUuid& uuid )
this
,
SLOT
(
mediaDeletion
(
QUuid
)
)
);
connect
(
cell
,
SIGNAL
(
arrowClicked
(
const
QUuid
&
)
),
this
,
SLOT
(
showClipList
(
const
QUuid
&
)
)
);
connect
(
media
,
SIGNAL
(
snapshotComputed
(
Media
*
)
),
this
,
SLOT
(
updateCell
(
Media
*
)
)
);
cell
->
setNbClips
(
media
->
clips
()
->
size
()
);
cell
->
setThumbnail
(
media
->
getSnapshot
()
);
cell
->
setTitle
(
media
->
getFileName
()
);
cell
->
setLength
(
media
->
getLengthMS
()
);
if
(
media
->
baseClip
()
!=
NULL
)
cell
->
setEnabled
(
true
);
addCell
(
cell
);
m_cells
->
insert
(
media
->
getUuid
(),
cell
);
}
...
...
@@ -100,7 +101,12 @@ void MediaListViewController::updateCell( Media* media )
{
MediaCellView
*
cell
=
qobject_cast
<
MediaCellView
*>
(
m_cells
->
value
(
media
->
getUuid
(),
NULL
)
);
if
(
cell
!=
NULL
)
{
cell
->
setNbClips
(
media
->
clips
()
->
size
()
);
cell
->
setLength
(
media
->
getLengthMS
()
);
cell
->
setThumbnail
(
media
->
getSnapshot
()
);
cell
->
setEnabled
(
true
);
}
}
void
MediaListViewController
::
showClipList
(
const
QUuid
&
uuid
)
...
...
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