MediaListView.h 2.33 KB
Newer Older
1
/*****************************************************************************
2
 * MediaListView.h:
3 4 5 6
 *****************************************************************************
 * Copyright (C) 2008-2010 VideoLAN
 *
 * Authors: Thomas Boquet <thomas.boquet@gmail.com>
7
 *          Hugo Beauzée-Luyssen <beauze.h@vlmc.org>
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 *
 * 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.
 *****************************************************************************/

24 25
#ifndef MEDIALISTVIEW_H
#define MEDIALISTVIEW_H
Thomas Boquet's avatar
Thomas Boquet committed
26 27 28

#include "ListViewController.h"

29 30 31 32 33
#include <QHash>
#include <QUuid>

class   Clip;
class   Media;
34
class   MediaContainer;
35 36 37 38
class   MediaCellView;
class   StackViewController;

class   QWidget;
39

40
class MediaListView : public ListViewController
Thomas Boquet's avatar
Thomas Boquet committed
41 42 43 44
{
    Q_OBJECT

public:
45 46
    MediaListView( StackViewController* nav, MediaContainer* mc );
    virtual ~MediaListView();
Thomas Boquet's avatar
Thomas Boquet committed
47

48
private:
49 50 51 52 53
    StackViewController*            m_nav;
    QUuid                           m_currentUuid;
    QHash<QUuid, MediaCellView*>    m_cells;
    QUuid                           m_lastUuidClipListAsked;
    MediaContainer*                 m_mediaContainer;
54

Thomas Boquet's avatar
Thomas Boquet committed
55
public slots:
Geoffroy Lacarriere's avatar
Geoffroy Lacarriere committed
56
    void        cellSelection( const QUuid& uuid );
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
57
    void        showSubClips( const QUuid& uuid );
58
    void        clear();
59

60
private slots:
61 62 63 64 65 66 67
    void        removeClip( const Clip* );
    /**
     *  \brief  Called when the media container unload a clip
     *
     *  This slot will be triggered when a Clip is removed from the media container.
     */
    void        __clipRemoved( const QUuid& );
Hugo Beauzee-Luyssen's avatar
Hugo Beauzee-Luyssen committed
68
    void        newClipLoaded( Clip* clip );
69

Geoffroy Lacarriere's avatar
Geoffroy Lacarriere committed
70
signals:
71
    void        clipSelected( Clip* );
72
    void        clipRemoved( const QUuid& );
Thomas Boquet's avatar
Thomas Boquet committed
73
};
74
#endif // MEDIALISTVIEW_H