Commit c16233b3 authored by Clement CHAVANCE's avatar Clement CHAVANCE

Hide history window and set a minimum width to the medialibrary widget

parent 83d70f5a
......@@ -42,14 +42,14 @@ void DockWidgetManager::setMainWindow( MainWindow *mainWin )
m_mainWin = mainWin;
}
void DockWidgetManager::addDockedWidget( QWidget *widget,
QDockWidget* DockWidgetManager::addDockedWidget( QWidget *widget,
const QString &qs_name,
Qt::DockWidgetAreas areas,
QDockWidget::DockWidgetFeature features,
Qt::DockWidgetArea startArea)
{
if ( m_dockWidgets.contains( qs_name ) )
return ;
return 0;
QDockWidget* dock = new QDockWidget( tr( qs_name.toStdString().c_str() ), m_mainWin );
......@@ -61,6 +61,7 @@ void DockWidgetManager::addDockedWidget( QWidget *widget,
m_mainWin->addDockWidget( startArea, dock );
m_mainWin->registerWidgetInWindowMenu( dock );
widget->show();
return dock;
}
......
......@@ -38,7 +38,7 @@ class DockWidgetManager : public QObject
public:
static DockWidgetManager *instance( QObject *parent = 0 );
void setMainWindow( MainWindow *mainWin );
void addDockedWidget( QWidget *widget,
QDockWidget* addDockedWidget( QWidget *widget,
const QString &qs_name,
Qt::DockWidgetAreas areas,
QDockWidget::DockWidgetFeature features,
......
......@@ -172,7 +172,6 @@ void MainWindow::setupLibrary()
tr( "Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
connect( mediaLibraryWidget, SIGNAL( mediaSelected( Media* ) ),
m_clipPreview->getGenericRenderer(), SLOT( setMedia( Media* ) ) );
......@@ -298,11 +297,13 @@ void MainWindow::initializeDockWidgets( void )
KeyboardShortcutHelper* renderShortcut = new KeyboardShortcutHelper( "Start render preview", this );
connect( renderShortcut, SIGNAL( activated() ), m_projectPreview, SLOT( on_pushButtonPlay_clicked() ) );
dockManager->addDockedWidget( UndoStack::getInstance( this ),
QDockWidget* dock = dockManager->addDockedWidget( UndoStack::getInstance( this ),
tr( "History" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
if ( dock != 0 )
dock->hide();
setupLibrary();
}
......
......@@ -41,6 +41,7 @@ MediaLibraryWidget::MediaLibraryWidget( QWidget* parent ) : QWidget( parent )
connect( list, SIGNAL( clipSelected( Clip* ) ), this, SIGNAL( previewClipSetted( Clip* ) ) );
connect( this, SIGNAL( addClipToViewController( Clip* ) ), list, SLOT( newClipAdded( Clip* ) ) );
m_nav->pushViewController( list );
setMinimumWidth( 280 );
}
MediaLibraryWidget::~MediaLibraryWidget()
......
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