Commit e3c7b3b1 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Removed MediaLibraryWidget.

Also removed old library widget ui file.
parent af1620ad
......@@ -37,7 +37,6 @@ SET(VLMC_SRCS
Gui/import/ImportController.cpp
Gui/library/ListViewController.cpp
Gui/library/MediaCellView.cpp
Gui/library/MediaLibraryWidget.cpp
Gui/library/MediaListView.cpp
Gui/library/StackViewController.cpp
Gui/library/StackViewNavController.cpp
......@@ -119,7 +118,6 @@ SET (VLMC_HDRS
Gui/LCDTimecode.h
Gui/library/ListViewController.h
Gui/library/MediaCellView.h
Gui/library/MediaLibraryWidget.h
Gui/library/MediaListView.h
Gui/library/StackViewController.h
Gui/library/StackViewNavController.h
......@@ -189,7 +187,6 @@ SET(VLMC_UIS
Gui/ui/About.ui
Gui/ui/ClipProperty.ui
Gui/ui/FileBrowser.ui
Gui/ui/LibraryWidget.ui
Gui/ui/MainWindow.ui
Gui/ui/PreviewWidget.ui
Gui/ui/TagWidget.ui
......
......@@ -45,12 +45,12 @@
/* Widgets */
#include "DockWidgetManager.h"
#include "UndoStack.h"
#include "ImportController.h"
#include "MediaListView.h"
#include "PreviewWidget.h"
#include "MediaLibraryWidget.h"
#include "timeline/Timeline.h"
#include "timeline/TracksView.h"
#include "ImportController.h"
#include "UndoStack.h"
/* Settings / Preferences */
#include "ProjectManager.h"
......@@ -223,28 +223,30 @@ MainWindow::loadVlmcPreferences( const QString &subPart )
#undef CREATE_MENU_SHORTCUT
void MainWindow::setupLibrary()
void
MainWindow::setupLibrary()
{
//GUI part :
QWidget* libraryWidget = new QWidget( this );
libraryWidget->setMinimumWidth( 280 );
StackViewController *nav = new StackViewController( libraryWidget, true );
MediaListView *mediaView = new MediaListView( nav, Library::getInstance() );
nav->pushViewController( mediaView );
connect( nav, SIGNAL( importRequired() ), this, SLOT( on_actionImport_triggered() ) );
MediaLibraryWidget* mediaLibraryWidget = new MediaLibraryWidget( this );
m_importController = new ImportController();
const ClipRenderer* clipRenderer = qobject_cast<const ClipRenderer*>( m_clipPreview->getGenericRenderer() );
Q_ASSERT( clipRenderer != NULL );
DockWidgetManager::instance()->addDockedWidget( mediaLibraryWidget,
tr( "Media Library" ),
DockWidgetManager::instance()->addDockedWidget( libraryWidget, tr( "Media Library" ),
Qt::AllDockWidgetAreas,
QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
connect( mediaLibraryWidget, SIGNAL( clipSelected( Clip* ) ),
connect( mediaView, SIGNAL( clipSelected( Clip* ) ),
clipRenderer, SLOT( setClip( Clip* ) ) );
connect( Library::getInstance(), SIGNAL( clipRemoved( const Clip* ) ),
clipRenderer, SLOT( clipUnloaded( const Clip* ) ) );
connect( mediaLibraryWidget, SIGNAL( importRequired() ),
this, SLOT( on_actionImport_triggered() ) );
}
void MainWindow::on_actionSave_triggered()
......
/*****************************************************************************
* MediaLibraryWidget.cpp
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Thomas Boquet <thomas.boquet@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "MediaLibraryWidget.h"
#include "StackViewController.h"
#include "MediaListView.h"
#include "Media.h"
#include "Clip.h"
MediaLibraryWidget::MediaLibraryWidget( QWidget* parent ) : QWidget( parent )
{
Library* library = Library::getInstance();
m_nav = new StackViewController( this );
MediaListView* list = new MediaListView( m_nav, library );
//Media
connect( list, SIGNAL( clipSelected( Clip* ) ),
this, SIGNAL( clipSelected( Clip* ) ) );
connect( m_nav, SIGNAL( importRequired() ),
this, SIGNAL( importRequired() ) );
m_nav->pushViewController( list );
setMinimumWidth( 280 );
}
MediaLibraryWidget::~MediaLibraryWidget()
{
delete m_nav;
}
/*****************************************************************************
* MediaLibraryWidget.h
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Thomas Boquet <thomas.boquet@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef MEDIALIBRARYWIDGET_H
#define MEDIALIBRARYWIDGET_H
#include <QWidget>
class StackViewController;
class ViewController;
class Media;
class Clip;
class QUuid;
class MediaLibraryWidget : public QWidget
{
Q_OBJECT
public:
MediaLibraryWidget( QWidget* parent = 0 );
virtual ~MediaLibraryWidget();
private:
StackViewController* m_nav;
signals:
void clipSelected( Clip* );
void importRequired();
};
#endif // MEDIALIBRARYWIDGET_H
......@@ -27,7 +27,7 @@ StackViewController::StackViewController( QWidget* parent, bool enableImport ) :
QWidget( parent ), m_importButton( NULL ), m_current( 0 )
{
m_nav = new StackViewNavController( this );
m_layout = new QVBoxLayout;
m_layout = new QVBoxLayout( this );
m_controllerStack = new QStack<ViewController*>();
connect( m_nav->previousButton(), SIGNAL( clicked() ),
......@@ -48,7 +48,6 @@ StackViewController::~StackViewController()
delete m_nav;
if ( m_importButton != NULL )
delete m_importButton;
delete m_layout;
delete m_controllerStack;
}
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LibraryWidget</class>
<widget class="QWidget" name="LibraryWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>296</width>
<height>267</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1" colspan="5">
<widget class="QTabWidget" name="LibraryTabs">
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="tabPosition">
<enum>QTabWidget::East</enum>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
</property>
<property name="movable">
<bool>false</bool>
</property>
<widget class="QWidget" name="tabAudio">
<attribute name="title">
<string>Audio</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="MediaListWidget" name="listWidgetAudio">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabVideo">
<attribute name="title">
<string>Videos</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="MediaListWidget" name="listWidgetVideo">
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabImage">
<attribute name="title">
<string>Images</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="MediaListWidget" name="listWidgetImage">
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropOverwriteMode">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButtonAddMedia">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Add Media</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QPushButton" name="pushButtonRemoveMedia">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="text">
<string>Remove Media</string>
</property>
</widget>
</item>
<item row="2" column="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="2" colspan="2">
<widget class="QLineEdit" name="filterInput"/>
</item>
<item row="0" column="1">
<widget class="QLabel" name="filterLabel">
<property name="text">
<string>Filter:</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QToolButton" name="clearFilterButton">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../../ressources.qrc">
<normaloff>:/images/images/clear.png</normaloff>:/images/images/clear.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>MediaListWidget</class>
<extends>QListWidget</extends>
<header>MediaListWidget.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../../ressources.qrc"/>
</resources>
<connections/>
</ui>
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