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>
34 #include "customtrackscene.h"
35 #include "ui_timeline_ui.h"
39 class CustomTrackView;
44 class TrackView : public QWidget {
48 TrackView(KdenliveDoc *doc, QWidget *parent = 0);
50 const double zoomFactor() const;
51 const int mapLocalToValue(int x) const;
52 void setEditMode(const QString & editMode);
53 const QString & editMode() const;
54 QGraphicsScene *projectScene();
55 CustomTrackView *projectView();
57 int tracksNumber() const;
58 KdenliveDoc *document();
65 void slotDeleteClip(const QString &clipId);
66 void slotChangeZoom(int factor);
67 void setDuration(int dur);
68 void slotSetZone(QPoint p);
71 Ui::TimeLine_UI *view;
73 CustomTrackView *m_trackview;
77 CustomTrackScene *m_scene;
80 QVBoxLayout *m_tracksLayout;
81 QVBoxLayout *m_headersLayout;
82 QScrollArea *m_scrollArea;
84 QVBoxLayout *m_tracksAreaLayout;
85 QString m_documentErrors;
86 void parseDocument(QDomDocument doc);
87 int slotAddProjectTrack(int ix, QDomElement xml);
88 DocClipBase *getMissingProducer(const QString id) const;
91 void setCursorPos(int pos);
92 void moveCursorPos(int pos);
93 void slotTransitionItemSelected(Transition*, bool update);
94 void slotRebuildTrackHeaders();
98 void mousePosition(int);
100 void transitionItemSelected(Transition*, bool);
101 void zoneMoved(int, int);
102 void insertTrack(int);
103 void deleteTrack(int);
104 void changeTrack(int);