1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
24 #include <QScrollArea>
25 #include <QVBoxLayout>
28 #include <QGraphicsScene>
29 #include <QGraphicsLineItem>
30 #include <QDomElement>
33 #include "customtrackscene.h"
34 #include "ui_timeline_ui.h"
38 class CustomTrackView;
43 class TrackView : public QWidget {
47 explicit TrackView(KdenliveDoc *doc, QWidget *parent = 0);
49 void setEditMode(const QString & editMode);
50 const QString & editMode() const;
51 QGraphicsScene *projectScene();
52 CustomTrackView *projectView();
54 int tracksNumber() const;
55 KdenliveDoc *document();
62 void slotDeleteClip(const QString &clipId);
63 void slotChangeZoom(int factor);
64 void setDuration(int dur);
65 void slotSetZone(QPoint p);
68 Ui::TimeLine_UI *view;
70 CustomTrackView *m_trackview;
71 QList <QString> m_invalidProducers;
75 CustomTrackScene *m_scene;
78 QVBoxLayout *m_tracksLayout;
79 QVBoxLayout *m_headersLayout;
80 QScrollArea *m_scrollArea;
82 QVBoxLayout *m_tracksAreaLayout;
83 QString m_documentErrors;
84 void parseDocument(QDomDocument doc);
85 int slotAddProjectTrack(int ix, QDomElement xml, bool locked);
86 DocClipBase *getMissingProducer(const QString id) const;
89 void setCursorPos(int pos);
90 void moveCursorPos(int pos);
91 void slotTransitionItemSelected(Transition*, bool update);
92 void slotRebuildTrackHeaders();
93 void slotChangeTrackLock(int ix, bool lock);
96 void mousePosition(int);
98 void transitionItemSelected(Transition*, bool);
99 void zoneMoved(int, int);
100 void insertTrack(int);
101 void deleteTrack(int);
102 void changeTrack(int);