GraphicsMovieItem.h 2.13 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/*****************************************************************************
 * GraphicsMovieItem.h: Represent a movie graphically in the timeline
 *****************************************************************************
 * Copyright (C) 2008-2009 the VLMC team
 *
 * Authors: Ludovic Fauvet <etix@l0cal.com>
 *
 * 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 GRAPHICSMOVIEITEM_H
#define GRAPHICSMOVIEITEM_H

#include "AbstractGraphicsMediaItem.h"
27
#include "Clip.h"
28
#include "TracksView.h"
29 30 31 32 33

class GraphicsMovieItem : public AbstractGraphicsMediaItem
{
    Q_OBJECT
public:
34
    enum { Type = UserType + 1 };
35
    GraphicsMovieItem( Clip* clip );
36 37
    virtual ~GraphicsMovieItem();

38
    virtual int type() const { return Type; }
39 40
    virtual bool expandable() const { return false; }
    virtual bool moveable() const { return true; }
41
    virtual const QUuid& uuid() const { return m_clip->getUuid(); }
42 43 44 45 46
    virtual QRectF boundingRect() const;
    virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0 );

    void setWidth( int width );
    void setHeight( int height );
47
    Clip* clip() const;
48 49
    //void setAudioSpectrum( QVector<float*> spectrum );
    void paintAudioSpectrum( QPainter* painter );
50 51

private:
52
    Clip*           m_clip;
53 54 55
    int             m_width;
    int             m_height;
    QVector<float*> m_audioSpectrum;
56 57 58
};

#endif // GRAPHICSMOVIEITEM_H