GraphicsTrack.h 1.83 KB
Newer Older
Ludovic Fauvet's avatar
Ludovic Fauvet committed
1
/*****************************************************************************
2
 * GraphicsTrack.h: Graphically represent a track in the timeline
Ludovic Fauvet's avatar
Ludovic Fauvet committed
3
 *****************************************************************************
Ludovic Fauvet's avatar
Ludovic Fauvet committed
4
 * Copyright (C) 2008-2010 VideoLAN
Ludovic Fauvet's avatar
Ludovic Fauvet committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 * 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.
 *****************************************************************************/

23 24
#ifndef GRAPHICSTRACK_H
#define GRAPHICSTRACK_H
Ludovic Fauvet's avatar
Ludovic Fauvet committed
25 26

#include <QGraphicsWidget>
27
#include <QList>
28
#include "MainWorkflow.h"
Ludovic Fauvet's avatar
Ludovic Fauvet committed
29

30 31
class AbstractGraphicsMediaItem;

Ludovic Fauvet's avatar
Ludovic Fauvet committed
32 33 34 35 36 37
class GraphicsTrack : public QGraphicsWidget
{
    Q_OBJECT

public:
    enum { Type = UserType + 2 };
Ludovic Fauvet's avatar
Ludovic Fauvet committed
38

39
    GraphicsTrack( Workflow::TrackType type, quint32 trackNumber,
40
                   QGraphicsItem *parent = 0 );
41

42 43 44
    void setHeight( int height );
    int height();
    void setTrackEnabled( bool enabled );
Ludovic Fauvet's avatar
Ludovic Fauvet committed
45
    bool isEnabled();
46
    quint32 trackNumber();
47
    Workflow::TrackType mediaType();
Ludovic Fauvet's avatar
Ludovic Fauvet committed
48 49
    virtual int type() const { return Type; }

50 51
    QList<AbstractGraphicsMediaItem*> childs();

Ludovic Fauvet's avatar
Ludovic Fauvet committed
52
private:
53
    Workflow::TrackType m_type;
54
    quint32 m_trackNumber;
55
    bool m_enabled;
Ludovic Fauvet's avatar
Ludovic Fauvet committed
56 57
};

58
#endif // GRAPHICSTRACK_H