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

Import: Removing ImportMediaCellView class...

... as it does nothing more than MediaCellView
parent 37136853
......@@ -35,7 +35,6 @@ SET(VLMC_SRCS
Gui/WorkflowFileRendererDialog.cpp
Gui/export/RendererSettings.cpp
Gui/import/ImportController.cpp
Gui/import/ImportMediaCellView.cpp
Gui/import/ImportMediaListController.cpp
Gui/library/ClipListViewController.cpp
Gui/library/ListViewController.cpp
......@@ -117,7 +116,6 @@ SET (VLMC_HDRS
Gui/export/RendererSettings.h
Gui/FileInfoListModel.h
Gui/import/ImportController.h
Gui/import/ImportMediaCellView.h
Gui/import/ImportMediaListController.h
Gui/LanguageHelper.h
Gui/LCDTimecode.h
......
......@@ -29,6 +29,7 @@
#include "ImportController.h"
#include "Library.h"
#include "MetaDataManager.h"
#include "MediaCellView.h"
#include <QPalette>
#include <QSettings>
......@@ -176,7 +177,7 @@ ImportController::updateMediaRequested( const Media *media )
{
if ( m_temporaryMedias.contains( media->uuid() ) == false )
return ;
ImportMediaCellView* cell = m_mediaListController->cell( media->uuid() );
MediaCellView* cell = m_mediaListController->cell( media->uuid() );
if ( cell == NULL )
return;
cell->setThumbnail( media->snapshot() );
......@@ -404,7 +405,7 @@ ImportController::restoreContext()
{
if ( !m_savedUuid.isNull() && m_mediaListController->cell( m_savedUuid ) != NULL )
{
ImportMediaCellView* cell = m_mediaListController->cell( m_savedUuid );
MediaCellView* cell = m_mediaListController->cell( m_savedUuid );
cell->decrementClipCount( m_clipListController->nbDeletions() );
}
}
......
/*****************************************************************************
* ImportMediaCellView.cpp: Inherited class of the MediaCellView
*****************************************************************************
* Copyright (C) 2008-2010 VideoLAN
*
* Authors: Geoffroy Lacarriere <geoffroylaca@gmail.com>
* 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 "ImportMediaCellView.h"
ImportMediaCellView::ImportMediaCellView( const QUuid& uuid, QWidget *parent ) : MediaCellView( uuid, parent )
{
}
void ImportMediaCellView::mouseDoubleClickEvent( QMouseEvent* )
{
}
void ImportMediaCellView::mousePressEvent( QMouseEvent* )
{
emit cellSelected( uuid() );
this->focusWidget();
}
void ImportMediaCellView::mouseMoveEvent( QMouseEvent* )
{
}
#ifndef IMPORTMEDIACELLVIEW_H
#define IMPORTMEDIACELLVIEW_H
#include "MediaCellView.h"
class ImportMediaCellView : public MediaCellView
{
Q_OBJECT
public:
ImportMediaCellView( const QUuid& uuid, QWidget *parent = 0 );
protected:
void mouseDoubleClickEvent( QMouseEvent* );
void mousePressEvent( QMouseEvent* );
void mouseMoveEvent( QMouseEvent* );
};
#endif // IMPORTMEDIACELLVIEW_H
......@@ -23,12 +23,12 @@
*****************************************************************************/
#include "ImportMediaListController.h"
#include <QDebug>
#include "MediaCellView.h"
ImportMediaListController::ImportMediaListController( StackViewController* nav ) :
ListViewController( nav ), m_nav( nav ), m_clipDeleted( 0 )
{
m_mediaCellList = new QHash<QUuid, ImportMediaCellView*>();
m_mediaCellList = new QHash<QUuid, MediaCellView*>();
}
ImportMediaListController::~ImportMediaListController()
......@@ -39,7 +39,7 @@ ImportMediaListController::~ImportMediaListController()
void
ImportMediaListController::addMedia( Media* media )
{
ImportMediaCellView* cell = new ImportMediaCellView( media->uuid() );
MediaCellView* cell = new MediaCellView( media->uuid() );
connect( cell, SIGNAL( cellSelected( const QUuid& ) ),
this, SIGNAL( mediaSelected( const QUuid& ) ) );
connect( cell, SIGNAL( cellDeleted( const QUuid& ) ),
......@@ -65,7 +65,7 @@ ImportMediaListController::metaDataComputed( const Media* media )
m_mediaCellList->value( media->uuid() )->setThumbnail( media->snapshot() );
}
ImportMediaCellView*
MediaCellView*
ImportMediaListController::cell( QUuid uuid ) const
{
if (m_mediaCellList->contains( uuid ) )
......@@ -90,7 +90,7 @@ ImportMediaListController::removeMedia( const QUuid& uuid )
void
ImportMediaListController::addClip( Clip* clip )
{
ImportMediaCellView* cell = new ImportMediaCellView( clip->uuid() );
MediaCellView* cell = new MediaCellView( clip->uuid() );
cell->containsClip();
connect( cell, SIGNAL( cellSelected( const QUuid& ) ),
this, SIGNAL( clipSelected( const QUuid& ) ) );
......@@ -149,7 +149,7 @@ ImportMediaListController::clipAdded( Clip* clip )
m_mediaCellList->value( uuid )->incrementClipCount();
}
const QHash<QUuid, ImportMediaCellView*>*
const QHash<QUuid, MediaCellView*>*
ImportMediaListController::mediaCellList() const
{
return m_mediaCellList;
......
......@@ -29,7 +29,8 @@
#include "ListViewController.h"
#include "Media.h"
#include "Clip.h"
#include "ImportMediaCellView.h"
class MediaCellView;
class ImportMediaListController : public ListViewController
{
......@@ -45,14 +46,14 @@ class ImportMediaListController : public ListViewController
void cleanAll();
void addClipsFromMedia( Media* media );
const QHash<QUuid, ImportMediaCellView*>* mediaCellList() const;
ImportMediaCellView* cell( QUuid uuid ) const;
const QHash<QUuid, MediaCellView*>* mediaCellList() const;
MediaCellView* cell( QUuid uuid ) const;
bool contains( QUuid uuid );
int nbDeletions() const { return m_clipDeleted; }
private:
StackViewController* m_nav;
QHash<QUuid, ImportMediaCellView*>* m_mediaCellList;
QHash<QUuid, MediaCellView*>* m_mediaCellList;
int m_clipDeleted;
public slots:
......
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