MediaListView.h 2.5 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
    typedef     QHash<QUuid, MediaCellView*>    MediaList;

47
    MediaListView( StackViewController *nav, MediaContainer *mc );
48
    virtual ~MediaListView();
Thomas Boquet's avatar
Thomas Boquet committed
49

50 51
    const MediaList                 &mediaList() const;

52
private:
53
    StackViewController             *m_nav;
54
    QUuid                           m_currentUuid;
55
    MediaList                       m_cells;
56
    QUuid                           m_lastUuidClipListAsked;
57
    MediaContainer                  *m_mediaContainer;
58

Thomas Boquet's avatar
Thomas Boquet committed
59
public slots:
60 61
    void        cellSelection( const QUuid &uuid );
    void        showSubClips( const QUuid &uuid );
62
    void        clear();
63

64
private slots:
65 66 67 68 69 70 71
    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& );
72
    void        newClipLoaded( Clip *clip );
73

74
signals:
75
    void        clipSelected( Clip* );
76
    /// Used when the user clicks the deletion arrow.
77
    void        clipRemoved( const QUuid& );
Thomas Boquet's avatar
Thomas Boquet committed
78
};
79
#endif // MEDIALISTVIEW_H