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

added new media library and stackview classes

parent 8484c3db
......@@ -50,6 +50,7 @@
#include "AudioProjectPreferences.h"
#include "VideoProjectPreferences.h"
#include "VLMCPreferences.h"
#include "MediaLibraryWidget.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ), m_renderer( NULL )
......@@ -116,13 +117,20 @@ void MainWindow::setupLibrary()
//GUI part :
LibraryWidget* libraryWidget = new LibraryWidget( this );
MediaLibraryWidget* mediaLibraryWidget = new MediaLibraryWidget( this );
DockWidgetManager::instance()->addDockedWidget( libraryWidget,
tr( "Media Library" ),
tr( "Old Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
DockWidgetManager::instance()->addDockedWidget( mediaLibraryWidget,
tr( "Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
//Connecting GUI and Frontend :
connect( libraryWidget,
SIGNAL( newMediaLoadingAsked(const QString& ) ),
......
......@@ -60,6 +60,7 @@ void Library::removingMediaAsked( const QUuid& uuid )
void Library::metaDataComputed( Media* media )
{
emit newMediaLoaded( media );
Clip* clip = new Clip( media );
m_clips[media->getUuid()] = clip;
emit newClipLoaded( clip );
......@@ -81,7 +82,7 @@ void Library::newMediaLoadingAsked( const QString& filePath, const QStrin
media = new Media( filePath, uuid );
m_medias[media->getUuid()] = media;
connect( media, SIGNAL( metaDataComputed( Media* ) ), this, SLOT( metaDataComputed( Media* ) ), Qt::DirectConnection );
emit newMediaLoaded( media );
emit metadataRequired( media );
}
bool Library::mediaAlreadyLoaded( const QString& filePath )
......
......@@ -77,6 +77,7 @@ private slots:
signals:
void newClipLoaded( Clip* );
void metadataRequired( Media* );
void newMediaLoaded( Media* );
void mediaRemoved( const QUuid& );
void projectLoaded();
......
......@@ -27,14 +27,14 @@
MetaDataManager::MetaDataManager()
{
connect( Library::getInstance(), SIGNAL( newMediaLoaded( Media* ) ), this, SLOT( newMediaLoaded( Media* ) ) );
connect( Library::getInstance(), SIGNAL( metadataRequired( Media* ) ), this, SLOT( metadataRequired( Media* ) ) );
}
MetaDataManager::~MetaDataManager()
{
}
void MetaDataManager::newMediaLoaded( Media* media )
void MetaDataManager::metadataRequired( Media* media )
{
MetaDataWorker* w = new MetaDataWorker( media );
w->start();
......
......@@ -36,7 +36,7 @@ class MetaDataManager : public QObject, public Singleton<MetaDataManager>
friend class Singleton<MetaDataManager>;
public slots:
void newMediaLoaded( Media* );
void metadataRequired( Media* );
private:
MetaDataManager();
......
......@@ -32,8 +32,7 @@ SOURCES += src/main.cpp \
src/GUI/ListViewMediaItem.cpp \
src/GUI/MediaListWidget.cpp \
src/Media/Clip.cpp \
src/GUI/About.cpp \
# src/GUI/Transcode.cpp \
src/GUI/About.cpp \ # src/GUI/Transcode.cpp \
src/GUI/Slider.cpp \
src/Metadata/MetaDataWorker.cpp \
src/Library/Library.cpp \
......@@ -64,7 +63,13 @@ SOURCES += src/main.cpp \
src/GUI/VLMCPreferences.cpp \
src/GUI/VideoProjectPreferences.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 \
src/GUI/DockWidgetManager.h \
src/GUI/LibraryWidget.h \
......@@ -82,8 +87,7 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/ListViewMediaItem.h \
src/Media/Clip.h \
src/GUI/MediaListWidget.h \
src/GUI/About.h \
# src/GUI/Transcode.h \
src/GUI/About.h \ # src/GUI/Transcode.h \
src/GUI/Slider.h \
src/Metadata/MetaDataWorker.h \
src/Tools/Singleton.hpp \
......@@ -121,27 +125,35 @@ HEADERS += src/GUI/MainWindow.h \
src/GUI/AudioProjectPreferences.h \
src/GUI/VideoProjectPreferences.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 \
src/GUI/ui/PreviewWidget.ui \
src/GUI/ui/LanguagePreferences.ui \
src/GUI/ui/Timeline.ui \
src/GUI/ui/LibraryWidget.ui \
src/GUI/ui/About.ui \
# src/GUI/ui/Transcode.ui \
src/GUI/ui/About.ui \ # src/GUI/ui/Transcode.ui \
src/GUI/ui/FileBrowser.ui \
src/GUI/ui/WorkflowFileRendererDialog.ui \
src/GUI/ui/ClipProperty.ui \
src/GUI/ui/ProjectPreferences.ui \
src/GUI/ui/VLMCPreferences.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 \
ts/vlmc_fr.ts \
ts/vlmc_sv.ts
RESOURCES += ressources.qrc
INCLUDEPATH += src/LibVLCpp \
src/GUI \
src/GUI/Library \
src/Tools \
src/Renderer \
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