Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
054f9c58
Commit
054f9c58
authored
Oct 22, 2009
by
Geoffroy Lacarriere
Browse files
[Import]: Refactor:
Importing medias is available again
parent
cafe9d50
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/GUI/Import/ImportController.cpp
View file @
054f9c58
#include
"ImportController.h"
#include
"ui_ImportController.h"
#include
"ClipRenderer.h"
#include
"Library.h"
ImportController
::
ImportController
(
QWidget
*
parent
)
:
QDialog
(
parent
),
...
...
@@ -73,8 +74,8 @@ void ImportController::changeEvent( QEvent *e )
void
ImportController
::
newMediaLoaded
(
Media
*
media
)
{
Q_UNUSED
(
media
);
qDebug
()
<<
media
->
getFileName
();
m_mediaListController
->
addMedia
(
media
);
}
void
ImportController
::
updateMediaRequested
(
Media
*
media
)
...
...
@@ -103,3 +104,14 @@ void ImportController::treeViewDoubleClicked( const QModelIndex& index )
if
(
!
m_filesModel
->
isDir
(
index
)
)
forwardButtonClicked
();
}
void
ImportController
::
accept
()
{
QUuid
id
;
foreach
(
id
,
m_model
->
getMedias
()
->
keys
()
)
{
Media
*
media
=
m_model
->
getMedias
()
->
value
(
id
);
Library
::
getInstance
()
->
addMedia
(
media
);
}
done
(
Accepted
);
}
src/GUI/Import/ImportController.h
View file @
054f9c58
...
...
@@ -41,6 +41,7 @@ private:
public
slots
:
void
newMediaLoaded
(
Media
*
media
);
void
updateMediaRequested
(
Media
*
media
);
void
accept
();
private
slots
:
void
forwardButtonClicked
();
...
...
src/GUI/Import/ImportModel.cpp
View file @
054f9c58
...
...
@@ -21,6 +21,11 @@ const Media* ImportModel::getMedia( const QUuid& mediaId ) const
return
m_medias
->
value
(
mediaId
);
}
const
QHash
<
QUuid
,
Media
*>*
ImportModel
::
getMedias
()
const
{
return
m_medias
;
}
const
Clip
*
ImportModel
::
getClip
(
const
QUuid
&
mediaId
,
const
QUuid
&
clipId
)
const
{
Media
*
media
=
m_medias
->
value
(
mediaId
);
...
...
src/GUI/Import/ImportModel.h
View file @
054f9c58
...
...
@@ -17,6 +17,7 @@ public:
~
ImportModel
();
const
Media
*
getMedia
(
const
QUuid
&
mediaId
)
const
;
const
QHash
<
QUuid
,
Media
*>*
getMedias
()
const
;
const
Clip
*
getClip
(
const
QUuid
&
mediaId
,
const
QUuid
&
clipId
)
const
;
void
cutMedia
(
const
QUuid
&
mediaId
,
int
frame
);
void
cutClip
(
const
QUuid
&
mediaId
,
const
QUuid
&
clipId
,
int
frame
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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