[vlmc-devel] commit: Unbreak clip counting in the import window (Hugo Beauzee-Luyssen )
git at videolan.org
git at videolan.org
Wed Mar 10 14:52:56 CET 2010
vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Tue Mar 9 01:05:17 2010 +0100| [298cbb4e292802eb104b6fef232f11858bfc657d] | committer: Hugo Beauzee-Luyssen
Unbreak clip counting in the import window
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=298cbb4e292802eb104b6fef232f11858bfc657d
---
src/Gui/import/ImportController.cpp | 2 --
src/Gui/library/MediaCellView.cpp | 18 ------------------
src/Gui/library/MediaCellView.h | 2 --
src/Gui/library/MediaListViewController.cpp | 24 ------------------------
src/Gui/library/MediaListViewController.h | 2 --
src/Renderer/GenericRenderer.h | 1 +
6 files changed, 1 insertions(+), 48 deletions(-)
diff --git a/src/Gui/import/ImportController.cpp b/src/Gui/import/ImportController.cpp
index ac879d3..213eb7d 100644
--- a/src/Gui/import/ImportController.cpp
+++ b/src/Gui/import/ImportController.cpp
@@ -320,8 +320,6 @@ ImportController::showClipList( const QUuid& uuid )
this, SLOT( clipSelection( const QUuid& ) ) );
connect( m_clipListController, SIGNAL( clipDeleted( const QUuid& ) ),
this, SLOT( clipDeletion( const QUuid& ) ) );
- foreach ( Clip* clip, media->clips().values() )
- m_clipListController->addClip( clip );
if ( !m_currentUuid.isNull() )
m_savedUuid = m_currentUuid;
m_stackNav->pushViewController( m_clipListController );
diff --git a/src/Gui/library/MediaCellView.cpp b/src/Gui/library/MediaCellView.cpp
index ebdfdc1..af19a74 100644
--- a/src/Gui/library/MediaCellView.cpp
+++ b/src/Gui/library/MediaCellView.cpp
@@ -190,24 +190,6 @@ void MediaCellView::setLength( qint64 length, bool mSecs )
m_ui->length->setText( duration.toString( "hh:mm:ss" ) );
}
-void MediaCellView::incrementClipCount()
-{
- int clips = m_ui->clipCount->text().toInt();
-
- clips += 1;
- m_ui->clipCount->setText( QString::number( clips ) );
-}
-
-void MediaCellView::decrementClipCount( const int nb )
-{
- int clips = m_ui->clipCount->text().toInt();
-
- clips -= nb;
- if ( clips < 0 )
- clips = 0;
- m_ui->clipCount->setText( QString::number( clips ) );
-}
-
void
MediaCellView::containsClip()
{
diff --git a/src/Gui/library/MediaCellView.h b/src/Gui/library/MediaCellView.h
index 9cdbd67..9d4dc16 100644
--- a/src/Gui/library/MediaCellView.h
+++ b/src/Gui/library/MediaCellView.h
@@ -52,8 +52,6 @@ public:
* \param length The media length, in ms.
*/
void setLength( qint64 length, bool mSecs = true );
- void incrementClipCount();
- void decrementClipCount( const int nb );
QString title() const;
void containsClip();
const QUuid& uuid() const;
diff --git a/src/Gui/library/MediaListViewController.cpp b/src/Gui/library/MediaListViewController.cpp
index 3793e1f..524f7e0 100644
--- a/src/Gui/library/MediaListViewController.cpp
+++ b/src/Gui/library/MediaListViewController.cpp
@@ -52,8 +52,6 @@ void MediaListViewController::newMediaLoaded( Media* media )
this, SIGNAL( clipDeleted( QUuid ) ) );
connect( cell, SIGNAL( arrowClicked( const QUuid& ) ),
this, SLOT( showClipList( const QUuid& ) ) );
- connect( media, SIGNAL( clipAdded( Clip* ) ),
- this, SLOT( newClipAdded(Clip*) ) );
addCell(cell);
m_cells->insert( media->baseClip()->uuid(), cell );
}
@@ -110,28 +108,6 @@ void MediaListViewController::showClipList( const QUuid& uuid )
m_nav->pushViewController( m_clipsListView );
}
-void MediaListViewController::newClipAdded( Clip* clip )
-{
- if ( clip->getParent() == 0 )
- return ;
- const QUuid& uuid = clip->getParent()->baseClip()->uuid();
-
- if ( m_cells->contains( uuid ) )
- {
- MediaCellView* cell = qobject_cast<MediaCellView*>( m_cells->value( uuid, 0 ) );
- if ( cell != 0 )
- {
- cell->incrementClipCount();
- }
- }
-}
-
-void
-MediaListViewController::addClip( Clip *clip )
-{
- newClipAdded( clip );
-}
-
void MediaListViewController::restoreContext()
{
MediaCellView* cell = qobject_cast<MediaCellView*>( m_cells->value( m_lastUuidClipListAsked, 0 ) );
diff --git a/src/Gui/library/MediaListViewController.h b/src/Gui/library/MediaListViewController.h
index b1ba55b..a57cc6b 100644
--- a/src/Gui/library/MediaListViewController.h
+++ b/src/Gui/library/MediaListViewController.h
@@ -38,7 +38,6 @@ class MediaListViewController : public ListViewController
public:
MediaListViewController( StackViewController* nav, MediaContainer* mc );
virtual ~MediaListViewController();
- void addClip( Clip* clip );
private:
StackViewController* m_nav;
@@ -55,7 +54,6 @@ public slots:
private slots:
void restoreContext();
- void newClipAdded( Clip* clip );
void mediaRemoved( const QUuid& uuid );
void newMediaLoaded( Media* media );
diff --git a/src/Renderer/GenericRenderer.h b/src/Renderer/GenericRenderer.h
index c0a68f3..e8d10c9 100644
--- a/src/Renderer/GenericRenderer.h
+++ b/src/Renderer/GenericRenderer.h
@@ -117,6 +117,7 @@ public:
* \todo This method should not be here, as it is not generic at all.
*/
virtual Media* getMedia() = 0;
+
/**
* \brief Return the length in frames
* \warning The returned value may not be accurate as it depends on FPS, that
More information about the Vlmc-devel
mailing list