Commit 56674f4c authored by Thomas Boquet's avatar Thomas Boquet
Browse files

added new media library and stackview classes

parent 8484c3db
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "AudioProjectPreferences.h" #include "AudioProjectPreferences.h"
#include "VideoProjectPreferences.h" #include "VideoProjectPreferences.h"
#include "VLMCPreferences.h" #include "VLMCPreferences.h"
#include "MediaLibraryWidget.h"
MainWindow::MainWindow( QWidget *parent ) : MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL ) QMainWindow( parent ), m_renderer( NULL )
...@@ -116,8 +117,15 @@ void MainWindow::setupLibrary() ...@@ -116,8 +117,15 @@ void MainWindow::setupLibrary()
//GUI part : //GUI part :
LibraryWidget* libraryWidget = new LibraryWidget( this ); LibraryWidget* libraryWidget = new LibraryWidget( this );
MediaLibraryWidget* mediaLibraryWidget = new MediaLibraryWidget( this );
DockWidgetManager::instance()->addDockedWidget( libraryWidget, DockWidgetManager::instance()->addDockedWidget( libraryWidget,
tr( "Old Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
DockWidgetManager::instance()->addDockedWidget( mediaLibraryWidget,
tr( "Media Library" ), tr( "Media Library" ),
Qt::AllDockWidgetAreas, Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures, QDockWidget::AllDockWidgetFeatures,
......
...@@ -60,6 +60,7 @@ void Library::removingMediaAsked( const QUuid& uuid ) ...@@ -60,6 +60,7 @@ void Library::removingMediaAsked( const QUuid& uuid )
void Library::metaDataComputed( Media* media ) void Library::metaDataComputed( Media* media )
{ {
emit newMediaLoaded( media );
Clip* clip = new Clip( media ); Clip* clip = new Clip( media );
m_clips[media->getUuid()] = clip; m_clips[media->getUuid()] = clip;
emit newClipLoaded( clip ); emit newClipLoaded( clip );
...@@ -81,7 +82,7 @@ void Library::newMediaLoadingAsked( const QString& filePath, const QStrin ...@@ -81,7 +82,7 @@ void Library::newMediaLoadingAsked( const QString& filePath, const QStrin
media = new Media( filePath, uuid ); media = new Media( filePath, uuid );
m_medias[media->getUuid()] = media; m_medias[media->getUuid()] = media;
connect( media, SIGNAL( metaDataComputed( Media* ) ), this, SLOT( metaDataComputed( Media* ) ), Qt::DirectConnection ); connect( media, SIGNAL( metaDataComputed( Media* ) ), this, SLOT( metaDataComputed( Media* ) ), Qt::DirectConnection );
emit newMediaLoaded( media ); emit metadataRequired( media );
} }
bool Library::mediaAlreadyLoaded( const QString& filePath ) bool Library::mediaAlreadyLoaded( const QString& filePath )
......
...@@ -77,6 +77,7 @@ private slots: ...@@ -77,6 +77,7 @@ private slots:
signals: signals:
void newClipLoaded( Clip* ); void newClipLoaded( Clip* );
void metadataRequired( Media* );
void newMediaLoaded( Media* ); void newMediaLoaded( Media* );
void mediaRemoved( const QUuid& ); void mediaRemoved( const QUuid& );
void projectLoaded(); void projectLoaded();
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
MetaDataManager::MetaDataManager() MetaDataManager::MetaDataManager()
{ {
connect( Library::getInstance(), SIGNAL( newMediaLoaded( Media* ) ), this, SLOT( newMediaLoaded( Media* ) ) ); connect( Library::getInstance(), SIGNAL( metadataRequired( Media* ) ), this, SLOT( metadataRequired( Media* ) ) );
} }
MetaDataManager::~MetaDataManager() MetaDataManager::~MetaDataManager()
{ {
} }
void MetaDataManager::newMediaLoaded( Media* media ) void MetaDataManager::metadataRequired( Media* media )
{ {
MetaDataWorker* w = new MetaDataWorker( media ); MetaDataWorker* w = new MetaDataWorker( media );
w->start(); w->start();
......
...@@ -36,7 +36,7 @@ class MetaDataManager : public QObject, public Singleton<MetaDataManager> ...@@ -36,7 +36,7 @@ class MetaDataManager : public QObject, public Singleton<MetaDataManager>
friend class Singleton<MetaDataManager>; friend class Singleton<MetaDataManager>;
public slots: public slots:
void newMediaLoaded( Media* ); void metadataRequired( Media* );
private: private:
MetaDataManager(); MetaDataManager();
......
...@@ -32,8 +32,7 @@ SOURCES += src/main.cpp \ ...@@ -32,8 +32,7 @@ SOURCES += src/main.cpp \
src/GUI/ListViewMediaItem.cpp \ src/GUI/ListViewMediaItem.cpp \
src/GUI/MediaListWidget.cpp \ src/GUI/MediaListWidget.cpp \
src/Media/Clip.cpp \ src/Media/Clip.cpp \
src/GUI/About.cpp \ src/GUI/About.cpp \ # src/GUI/Transcode.cpp \
# src/GUI/Transcode.cpp \
src/GUI/Slider.cpp \ src/GUI/Slider.cpp \
src/Metadata/MetaDataWorker.cpp \ src/Metadata/MetaDataWorker.cpp \
src/Library/Library.cpp \ src/Library/Library.cpp \
...@@ -64,7 +63,13 @@ SOURCES += src/main.cpp \ ...@@ -64,7 +63,13 @@ SOURCES += src/main.cpp \
src/GUI/VLMCPreferences.cpp \ src/GUI/VLMCPreferences.cpp \
src/GUI/VideoProjectPreferences.cpp \ src/GUI/VideoProjectPreferences.cpp \
src/Project/ProjectManager.cpp \ src/Project/ProjectManager.cpp \
src/Configuration/SettingsManager.cpp src/Configuration/SettingsManager.cpp \
src/GUI/Library/StackViewController.cpp \
src/GUI/Library/StackViewNavController.cpp \
src/GUI/Library/ListViewController.cpp \
src/GUI/Library/MediaCellView.cpp \
src/GUI/Library/MediaLibraryWidget.cpp \
src/GUI/Library/MediaListViewController.cpp
HEADERS += src/GUI/MainWindow.h \ HEADERS += src/GUI/MainWindow.h \
src/GUI/DockWidgetManager.h \ src/GUI/DockWidgetManager.h \
src/GUI/LibraryWidget.h \ src/GUI/LibraryWidget.h \
...@@ -82,8 +87,7 @@ HEADERS += src/GUI/MainWindow.h \ ...@@ -82,8 +87,7 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/ListViewMediaItem.h \ src/GUI/ListViewMediaItem.h \
src/Media/Clip.h \ src/Media/Clip.h \
src/GUI/MediaListWidget.h \ src/GUI/MediaListWidget.h \
src/GUI/About.h \ src/GUI/About.h \ # src/GUI/Transcode.h \
# src/GUI/Transcode.h \
src/GUI/Slider.h \ src/GUI/Slider.h \
src/Metadata/MetaDataWorker.h \ src/Metadata/MetaDataWorker.h \
src/Tools/Singleton.hpp \ src/Tools/Singleton.hpp \
...@@ -121,27 +125,35 @@ HEADERS += src/GUI/MainWindow.h \ ...@@ -121,27 +125,35 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/AudioProjectPreferences.h \ src/GUI/AudioProjectPreferences.h \
src/GUI/VideoProjectPreferences.h \ src/GUI/VideoProjectPreferences.h \
src/Project/ProjectManager.h \ src/Project/ProjectManager.h \
src/Configuration/SettingsManager.h src/Configuration/SettingsManager.h \
src/GUI/Library/StackViewController.h \
src/GUI/Library/StackViewNavController.h \
src/GUI/Library/ListViewController.h \
src/GUI/Library/MediaCellView.h \
src/GUI/Library/MediaLibraryWidget.h \
src/GUI/Library/MediaListViewController.h
FORMS += src/GUI/ui/MainWindow.ui \ FORMS += src/GUI/ui/MainWindow.ui \
src/GUI/ui/PreviewWidget.ui \ src/GUI/ui/PreviewWidget.ui \
src/GUI/ui/LanguagePreferences.ui \ src/GUI/ui/LanguagePreferences.ui \
src/GUI/ui/Timeline.ui \ src/GUI/ui/Timeline.ui \
src/GUI/ui/LibraryWidget.ui \ src/GUI/ui/LibraryWidget.ui \
src/GUI/ui/About.ui \ src/GUI/ui/About.ui \ # src/GUI/ui/Transcode.ui \
# src/GUI/ui/Transcode.ui \
src/GUI/ui/FileBrowser.ui \ src/GUI/ui/FileBrowser.ui \
src/GUI/ui/WorkflowFileRendererDialog.ui \ src/GUI/ui/WorkflowFileRendererDialog.ui \
src/GUI/ui/ClipProperty.ui \ src/GUI/ui/ClipProperty.ui \
src/GUI/ui/ProjectPreferences.ui \ src/GUI/ui/ProjectPreferences.ui \
src/GUI/ui/VLMCPreferences.ui \ src/GUI/ui/VLMCPreferences.ui \
src/GUI/ui/VideoProjectPreferences.ui \ src/GUI/ui/VideoProjectPreferences.ui \
src/GUI/ui/AudioProjectPreferences.ui src/GUI/ui/AudioProjectPreferences.ui \
src/GUI/Library/ui/StackViewNavController.ui \
src/GUI/Library/ui/MediaCellView.ui
TRANSLATIONS = ts/vlmc_es.ts \ TRANSLATIONS = ts/vlmc_es.ts \
ts/vlmc_fr.ts \ ts/vlmc_fr.ts \
ts/vlmc_sv.ts ts/vlmc_sv.ts
RESOURCES += ressources.qrc RESOURCES += ressources.qrc
INCLUDEPATH += src/LibVLCpp \ INCLUDEPATH += src/LibVLCpp \
src/GUI \ src/GUI \
src/GUI/Library \
src/Tools \ src/Tools \
src/Renderer \ src/Renderer \
src/Metadata \ src/Metadata \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment