PreviewWidget.h 2.53 KB
Newer Older
1 2 3
/*****************************************************************************
 * PreviewWidget: Main preview widget
 *****************************************************************************
Ludovic Fauvet's avatar
Ludovic Fauvet committed
4
 * Copyright (C) 2008-2010 VideoLAN
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *
 * Authors: Hugo Beauzee-Luyssen <hugo@vlmc.org>
 *
 * 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.
 *****************************************************************************/


#ifndef PREVIEWWIDGET_H
#define PREVIEWWIDGET_H

#include <QWidget>
28
#include "Workflow/MainWorkflow.h"
29

Ludovic Fauvet's avatar
Ludovic Fauvet committed
30 31
class GenericRenderer;

32 33 34 35
namespace Ui {
    class PreviewWidget;
}

36
class PreviewWidget : public QWidget
37 38 39 40 41
{
    Q_OBJECT
    Q_DISABLE_COPY( PreviewWidget )

public:
42
    explicit PreviewWidget( QWidget* parent = NULL );
43
    virtual ~PreviewWidget();
44
    const GenericRenderer*  getGenericRenderer() const;
45
    void                    setRenderer( GenericRenderer *renderer );
46 47 48

private:
    Ui::PreviewWidget*      m_ui;
49
    GenericRenderer*        m_renderer;
50 51
    bool                    m_endReached;
    bool                    m_previewStopped;
52
    QPalette                m_videoPalette;
53 54 55

protected:
    virtual void    changeEvent( QEvent *e );
56

57 58 59
public slots:
    void            stop();

60 61
private slots:
    void            on_pushButtonPlay_clicked();
62
    void            on_pushButtonStop_clicked();
63 64
    void            on_pushButtonNextFrame_clicked();
    void            on_pushButtonPreviousFrame_clicked();
65
    void            frameChanged( qint64, Vlmc::FrameChangedReason reason );
66 67
    void            videoPaused();
    void            videoPlaying();
68
    void            videoStopped();
69 70
    void            volumeChanged();
    void            updateVolume( int );
71
    void            endReached();
72 73
    void            markerStartClicked();
    void            markerStopClicked();
74
    void            createNewClipFromMarkers();
75
    void            error();
76 77 78
};

#endif // PREVIEWWIDGET_H