[vlmc-devel] commit: MediaListView: Applying HACKING rules ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri May 14 18:51:23 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu May 13 17:48:20 2010 +0200| [16d29cd51d352a610041656d700f13d452912e83] | committer: Hugo Beauzée-Luyssen
MediaListView: Applying HACKING rules
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=16d29cd51d352a610041656d700f13d452912e83
---
src/Gui/library/MediaListView.cpp | 27 +++++++++++++++------------
src/Gui/library/MediaListView.h | 12 ++++++------
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/src/Gui/library/MediaListView.cpp b/src/Gui/library/MediaListView.cpp
index 9d9dc3b..4a499ed 100644
--- a/src/Gui/library/MediaListView.cpp
+++ b/src/Gui/library/MediaListView.cpp
@@ -27,19 +27,19 @@
#include "MediaContainer.h"
#include "StackViewController.h"
-MediaListView::MediaListView( StackViewController* nav, MediaContainer* mc ) :
+MediaListView::MediaListView( StackViewController *nav, MediaContainer *mc ) :
ListViewController( nav ),
m_nav( nav ),
m_mediaContainer( mc )
{
- connect( mc, SIGNAL( newClipLoaded(Clip*) ),
+ connect( mc, SIGNAL( newClipLoaded( Clip* ) ),
this, SLOT( newClipLoaded( Clip* ) ) );
connect( this, SIGNAL( clipRemoved( const QUuid& ) ),
mc, SLOT( deleteClip( const QUuid& ) ) );
connect( mc, SIGNAL( clipRemoved( const QUuid& ) ),
this, SLOT( __clipRemoved( const QUuid& ) ) );
connect( mc, SIGNAL( destroyed() ), this, SLOT( deleteLater() ) );
- foreach ( Clip* clip, mc->clips() )
+ foreach ( Clip *clip, mc->clips() )
newClipLoaded( clip );
}
@@ -50,9 +50,10 @@ MediaListView::~MediaListView()
m_cells.clear();
}
-void MediaListView::newClipLoaded( Clip *clip )
+void
+MediaListView::newClipLoaded( Clip *clip )
{
- MediaCellView* cell = new MediaCellView( clip, m_container );
+ MediaCellView *cell = new MediaCellView( clip, m_container );
connect( cell, SIGNAL ( cellSelected( QUuid ) ),
this, SLOT ( cellSelection( QUuid ) ) );
@@ -65,19 +66,19 @@ void MediaListView::newClipLoaded( Clip *clip )
cellSelection( clip->uuid() );
}
-void MediaListView::cellSelection( const QUuid& uuid )
+void
+MediaListView::cellSelection( const QUuid &uuid )
{
if ( m_currentUuid == uuid )
return;
-
if ( m_cells.contains( uuid ) )
{
if ( !m_currentUuid.isNull() && m_cells.contains( m_currentUuid ) )
{
- MediaCellView* cell = m_cells.value( m_currentUuid );
+ MediaCellView *cell = m_cells.value( m_currentUuid );
cell->setPalette( m_cells.value( uuid )->palette() );
}
- QPalette p = m_cells.value( uuid )->palette();
+ QPalette p = m_cells.value( uuid )->palette();
p.setColor( QPalette::Window, QColor( Qt::darkBlue ) );
m_cells.value( uuid )->setPalette( p );
m_currentUuid = uuid;
@@ -85,7 +86,8 @@ void MediaListView::cellSelection( const QUuid& uuid )
}
}
-void MediaListView::removeClip( const Clip* clip )
+void
+MediaListView::removeClip( const Clip *clip )
{
__clipRemoved( clip->uuid() );
emit clipRemoved( clip->uuid() );
@@ -107,8 +109,9 @@ MediaListView::clear()
m_cells.clear();
}
-void MediaListView::showSubClips( const QUuid& uuid )
+void
+MediaListView::showSubClips( const QUuid &uuid )
{
- Clip* clip = m_mediaContainer->clip( uuid );
+ Clip *clip = m_mediaContainer->clip( uuid );
m_nav->pushViewController( new MediaListView( m_nav, clip->getChilds() ) );
}
diff --git a/src/Gui/library/MediaListView.h b/src/Gui/library/MediaListView.h
index 68a9057..113be78 100644
--- a/src/Gui/library/MediaListView.h
+++ b/src/Gui/library/MediaListView.h
@@ -42,19 +42,19 @@ class MediaListView : public ListViewController
Q_OBJECT
public:
- MediaListView( StackViewController* nav, MediaContainer* mc );
+ MediaListView( StackViewController *nav, MediaContainer *mc );
virtual ~MediaListView();
private:
- StackViewController* m_nav;
+ StackViewController *m_nav;
QUuid m_currentUuid;
QHash<QUuid, MediaCellView*> m_cells;
QUuid m_lastUuidClipListAsked;
- MediaContainer* m_mediaContainer;
+ MediaContainer *m_mediaContainer;
public slots:
- void cellSelection( const QUuid& uuid );
- void showSubClips( const QUuid& uuid );
+ void cellSelection( const QUuid &uuid );
+ void showSubClips( const QUuid &uuid );
void clear();
private slots:
@@ -65,7 +65,7 @@ private slots:
* This slot will be triggered when a Clip is removed from the media container.
*/
void __clipRemoved( const QUuid& );
- void newClipLoaded( Clip* clip );
+ void newClipLoaded( Clip *clip );
signals:
void clipSelected( Clip* );
More information about the Vlmc-devel
mailing list