ClipPreviewWidget.h 2.22 KB
Newer Older
Christophe Courtaut's avatar
Christophe Courtaut committed
1
/*****************************************************************************
2
 * ClipPreviewWidget.cpp: Preview widget
Christophe Courtaut's avatar
Christophe Courtaut committed
3 4 5
 *****************************************************************************
 * Copyright (C) 2008-2009 the VLMC team
 *
6
 * Authors: Hugo Beauzee-Luyssen <hugo@vlmc.org>
Christophe Courtaut's avatar
Christophe Courtaut committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * 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.
 *****************************************************************************/

23 24
#ifndef CLIPPREVIEWWIDGET_H
#define CLIPPREVIEWWIDGET_H
geoff's avatar
geoff committed
25

26 27
#include <QWidget>
#include <QObject>
28

29
#include "VLCMediaPlayer.h"
30
#include "Media.h"
31
#include "GenericPreviewWidget.h"
geoff's avatar
geoff committed
32

33
//TODO: This should really share a common interface with RenderPreviewWorkflow
34
class ClipPreviewWidget : public GenericPreviewWidget
35
{
geoff's avatar
geoff committed
36
    Q_OBJECT
37
    Q_DISABLE_COPY( ClipPreviewWidget )
38

geoff's avatar
geoff committed
39
public:
40
    explicit ClipPreviewWidget( QWidget* renderWidget );
41
    virtual ~ClipPreviewWidget();
geoff's avatar
geoff committed
42

43 44 45
    void                    startPreview( Media* media );
    void                    setPosition( float newPos );
    void                    togglePlayPause();
46

geoff's avatar
geoff committed
47
private:
48
    bool                    m_clipLoaded;
49
    bool                    m_videoStopped;
50 51 52 53 54 55 56 57 58 59 60 61 62

public slots:
    void                    __positionChanged();
    void                    __videoPaused();
    void                    __videoPlaying();
    void                    __endReached();

signals:
    void                    stopped();
    void                    paused();
    void                    playing();
    void                    positionChanged( float );
    void                    endReached();
geoff's avatar
geoff committed
63 64
};

65
#endif // CLIPPREVIEWWIDGET_H