[vlmc-devel] commit: MainWindow: Remove a silly order constraint. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Sat Oct 9 16:20:36 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sat Oct 9 15:53:39 2010 +0200| [d76da23855faf0ad9029c81aefef4bfa671d1ed1] | committer: Hugo Beauzée-Luyssen
MainWindow: Remove a silly order constraint.
There is no need to create the clip renderer before creating the library
widget.
Media Library widget default position is now "top"
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=d76da23855faf0ad9029c81aefef4bfa671d1ed1
---
src/Gui/MainWindow.cpp | 25 ++++++++++++-------------
src/Gui/MainWindow.h | 2 +-
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 1c2ff20..96e057d 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -118,6 +118,15 @@ MainWindow::MainWindow( QWidget *parent ) :
canRedoChanged( UndoStack::getInstance( this )->canRedo() );
canUndoChanged( UndoStack::getInstance( this )->canUndo() );
+ //Connecting Library stuff:
+ const ClipRenderer* clipRenderer = qobject_cast<const ClipRenderer*>( m_clipPreview->getGenericRenderer() );
+ Q_ASSERT( clipRenderer != NULL );
+ connect( m_mediaLibrary, SIGNAL( clipSelected( Clip* ) ),
+ clipRenderer, SLOT( setClip( Clip* ) ) );
+ connect( m_mediaLibrary, SIGNAL( importRequired() ),
+ this, SLOT( on_actionImport_triggered() ) );
+ connect( Library::getInstance(), SIGNAL( clipRemoved( const QUuid& ) ),
+ clipRenderer, SLOT( clipUnloaded( const QUuid& ) ) );
// Wizard
m_pWizard = new ProjectWizard( this );
@@ -409,7 +418,7 @@ MainWindow::createStatusBar()
}
void
-MainWindow::initializeDockWidgets( void )
+MainWindow::initializeDockWidgets()
{
m_renderer = new WorkflowRenderer();
m_renderer->initializeRenderer();
@@ -420,11 +429,10 @@ MainWindow::initializeDockWidgets( void )
m_importController = new ImportController();
+ setupLibrary();
setupEffectsList();
setupClipPreview();
setupProjectPreview();
- //Clip renderer must exist before this method is called, as it connects the library with the renderer.
- setupLibrary();
setupUndoRedoWidget();
}
@@ -455,21 +463,12 @@ MainWindow::setupEffectsList()
void
MainWindow::setupLibrary()
{
- const ClipRenderer* clipRenderer = qobject_cast<const ClipRenderer*>( m_clipPreview->getGenericRenderer() );
- Q_ASSERT( clipRenderer != NULL );
-
QDockWidget *dockedLibrary = DockWidgetManager::getInstance()->createDockedWidget(
QT_TRANSLATE_NOOP( "DockWidgetManager", "Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures );
m_mediaLibrary = new MediaLibrary( dockedLibrary );
- connect( m_mediaLibrary, SIGNAL( clipSelected( Clip* ) ),
- clipRenderer, SLOT( setClip( Clip* ) ) );
- connect( m_mediaLibrary, SIGNAL( importRequired() ),
- this, SLOT( on_actionImport_triggered() ) );
- connect( Library::getInstance(), SIGNAL( clipRemoved( const QUuid& ) ),
- clipRenderer, SLOT( clipUnloaded( const QUuid& ) ) );
- DockWidgetManager::getInstance()->addDockedWidget( dockedLibrary, m_mediaLibrary, Qt::LeftDockWidgetArea );
+ DockWidgetManager::getInstance()->addDockedWidget( dockedLibrary, m_mediaLibrary, Qt::TopDockWidgetArea );
}
void
diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h
index 69ad856..ce1785b 100644
--- a/src/Gui/MainWindow.h
+++ b/src/Gui/MainWindow.h
@@ -62,7 +62,7 @@ protected:
virtual void closeEvent( QCloseEvent* e );
private:
- void initializeDockWidgets( void );
+ void initializeDockWidgets();
void checkFolders();
void createStatusBar();
void createNotificationZone();
More information about the Vlmc-devel
mailing list