]> git.sesse.net Git - kdenlive/blob - src/trackview.cpp
d4ccbde877d0346d63bf0d9df1b2702f68aca7aa
[kdenlive] / src / trackview.cpp
1 /***************************************************************************
2  *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
3  *                                                                         *
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.                                   *
8  *                                                                         *
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.                          *
13  *                                                                         *
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  ***************************************************************************/
19
20
21 #include <QScrollBar>
22
23 #include <KDebug>
24 #include <KMessageBox>
25
26 #include "definitions.h"
27 #include "headertrack.h"
28 #include "trackview.h"
29 #include "clipitem.h"
30 #include "transition.h"
31 #include "kdenlivesettings.h"
32 #include "clipmanager.h"
33 #include "customruler.h"
34 #include "kdenlivedoc.h"
35 #include "mainwindow.h"
36 #include "customtrackview.h"
37
38
39 TrackView::TrackView(KdenliveDoc *doc, QWidget *parent)
40         : QWidget(parent), m_doc(doc), m_scale(1.0), m_projectTracks(0) {
41
42     view = new Ui::TimeLine_UI();
43     view->setupUi(this);
44
45     m_scene = new CustomTrackScene(doc);
46     m_trackview = new CustomTrackView(doc, m_scene, parent);
47     m_trackview->scale(1, 1);
48     m_trackview->setAlignment(Qt::AlignLeft | Qt::AlignTop);
49     //m_scene->addRect(QRectF(0, 0, 100, 100), QPen(), QBrush(Qt::red));
50
51     m_ruler = new CustomRuler(doc->timecode(), m_trackview);
52     connect(m_ruler, SIGNAL(zoneMoved(int, int)), this, SIGNAL(zoneMoved(int, int)));
53     QHBoxLayout *layout = new QHBoxLayout;
54     view->ruler_frame->setLayout(layout);
55     int left_margin;
56     int right_margin;
57     layout->getContentsMargins(&left_margin, 0, &right_margin, 0);
58     layout->setContentsMargins(left_margin, 0, right_margin, 0);
59     layout->addWidget(m_ruler);
60
61     QHBoxLayout *tracksLayout = new QHBoxLayout;
62     tracksLayout->setContentsMargins(0, 0, 0, 0);
63     view->tracks_frame->setLayout(tracksLayout);
64
65     view->headers_area->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
66     view->headers_area->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
67
68     m_headersLayout = new QVBoxLayout;
69     m_headersLayout->setContentsMargins(0, 0, 0, 0);
70     m_headersLayout->setSpacing(0);
71     view->headers_container->setLayout(m_headersLayout);
72
73     connect(view->headers_area->verticalScrollBar(), SIGNAL(valueChanged(int)), m_trackview->verticalScrollBar(), SLOT(setValue(int)));
74
75     tracksLayout->addWidget(m_trackview);
76
77     connect(m_trackview->verticalScrollBar(), SIGNAL(valueChanged(int)), view->headers_area->verticalScrollBar(), SLOT(setValue(int)));
78     connect(m_trackview, SIGNAL(trackHeightChanged()), this, SLOT(slotRebuildTrackHeaders()));
79
80     parseDocument(m_doc->toXml());
81
82     connect(m_trackview, SIGNAL(cursorMoved(int, int)), m_ruler, SLOT(slotCursorMoved(int, int)));
83     connect(m_trackview->horizontalScrollBar(), SIGNAL(valueChanged(int)), m_ruler, SLOT(slotMoveRuler(int)));
84     connect(m_trackview, SIGNAL(mousePosition(int)), this, SIGNAL(mousePosition(int)));
85     connect(m_trackview, SIGNAL(transitionItemSelected(Transition*, bool)), this, SLOT(slotTransitionItemSelected(Transition*, bool)));
86     slotChangeZoom(m_doc->zoom());
87 }
88
89
90 int TrackView::duration() const {
91     return m_trackview->duration();
92 }
93
94 int TrackView::tracksNumber() const {
95     return m_projectTracks - 1;
96 }
97
98 int TrackView::inPoint() const {
99     return m_ruler->inPoint();
100 }
101
102 int TrackView::outPoint() const {
103     return m_ruler->outPoint();
104 }
105
106 void TrackView::slotSetZone(QPoint p) {
107     m_ruler->setZone(p);
108 }
109
110 void TrackView::slotTransitionItemSelected(Transition *t, bool update) {
111     emit transitionItemSelected(t, update);
112 }
113
114 void TrackView::setDuration(int dur) {
115     m_trackview->setDuration(dur);
116     m_ruler->setDuration(dur);
117 }
118
119 void TrackView::parseDocument(QDomDocument doc) {
120     int cursorPos = 0;
121     m_documentErrors = QString();
122     // kDebug() << "//// DOCUMENT: " << doc.toString();
123     QDomNode props = doc.elementsByTagName("properties").item(0);
124     if (!props.isNull()) {
125         cursorPos = props.toElement().attribute("timeline_position").toInt();
126     }
127
128     // parse project tracks
129     QDomNodeList tracks = doc.elementsByTagName("track");
130     QDomNodeList playlists = doc.elementsByTagName("playlist");
131     int duration = 300;
132     m_projectTracks = tracks.count();
133     int trackduration = 0;
134     QDomElement e;
135     QDomElement p;
136     bool videotrack;
137
138     int pos = m_projectTracks - 1;
139
140
141     for (int i = 0; i < m_projectTracks; i++) {
142         e = tracks.item(i).toElement();
143         QString playlist_name = e.attribute("producer");
144         if (playlist_name != "black_track" && playlist_name != "playlistmain") {
145             // find playlist related to this track
146             p = QDomElement();
147             for (int j = 0; j < m_projectTracks; j++) {
148                 p = playlists.item(j).toElement();
149                 if (p.attribute("id") == playlist_name) break;
150             }
151             videotrack = (e.attribute("hide") != "video");
152             trackduration = slotAddProjectTrack(pos, p, videotrack);
153             pos--;
154             //kDebug() << " PRO DUR: " << trackduration << ", TRACK DUR: " << duration;
155             if (trackduration > duration) duration = trackduration;
156         } else {
157             // background black track
158             for (int j = 0; j < m_projectTracks; j++) {
159                 p = playlists.item(j).toElement();
160                 if (p.attribute("id") == playlist_name) break;
161             }
162             int black_clips = p.childNodes().count();
163             for (int i = 0; i < black_clips; i++)
164                 m_doc->loadingProgressed();
165             qApp->processEvents();
166             pos--;
167         }
168     }
169
170     // parse transitions
171     QDomNodeList transitions = doc.elementsByTagName("transition");
172     int projectTransitions = transitions.count();
173     //kDebug() << "//////////// TIMELINE FOUND: " << projectTransitions << " transitions";
174     for (int i = 0; i < projectTransitions; i++) {
175         e = transitions.item(i).toElement();
176         QDomNodeList transitionparams = e.childNodes();
177         bool transitionAdd = true;
178         int a_track = 0;
179         int b_track = 0;
180         bool isAutomatic = false;
181         bool forceTrack = false;
182         QString mlt_geometry;
183         QString mlt_service;
184         for (int k = 0; k < transitionparams.count(); k++) {
185             p = transitionparams.item(k).toElement();
186             if (!p.isNull()) {
187                 QString paramName = p.attribute("name");
188                 // do not add audio mixing transitions
189                 if (paramName == "internal_added" && p.text() == "237") {
190                     transitionAdd = false;
191                     //kDebug() << "//  TRANSITRION " << i << " IS NOT VALID (INTERN ADDED)";
192                     //break;
193                 } else if (paramName == "a_track") a_track = p.text().toInt();
194                 else if (paramName == "b_track") b_track = p.text().toInt();
195                 else if (paramName == "mlt_service") mlt_service = p.text();
196                 else if (paramName == "geometry") mlt_geometry = p.text();
197                 else if (paramName == "automatic" && p.text() == "1") isAutomatic = true;
198                 else if (paramName == "force_track" && p.text() == "1") forceTrack = true;
199             }
200         }
201         if (transitionAdd || mlt_service != "mix") {
202             // Transition should be added to the scene
203             ItemInfo transitionInfo;
204             QString transitionId;
205             if (mlt_service == "composite") {
206                 // When adding composite transition, check if it is a wipe transition
207                 if (mlt_geometry == "0%,0%:100%x100%") transitionId = "alphatransparency";
208                 else if (mlt_geometry.count(';') == 1) {
209                     mlt_geometry.remove(QChar('%'), Qt::CaseInsensitive);
210                     mlt_geometry.replace(QChar('x'), QChar(','), Qt::CaseInsensitive);
211                     QString start = mlt_geometry.section(';', 0, 0);
212                     start = start.section(':', 0, 1);
213                     start.replace(QChar(':'), QChar(','), Qt::CaseInsensitive);
214                     QString end = mlt_geometry.section('=', 1, 1);
215                     end = end.section(':', 0, 1);
216                     end.replace(QChar(':'), QChar(','), Qt::CaseInsensitive);
217                     start.append(',' + end);
218                     QStringList numbers = start.split(',', QString::SkipEmptyParts);
219                     bool isWipeTransition = true;
220                     int checkNumber;
221                     for (int i = 0; i < numbers.size(); ++i) {
222                         checkNumber = qAbs(numbers.at(i).toInt());
223                         if (checkNumber != 0 && checkNumber != 100) {
224                             isWipeTransition = false;
225                             break;
226                         }
227                     }
228                     if (isWipeTransition) transitionId = "wipe";
229                 }
230             }
231             QDomElement base = MainWindow::transitions.getEffectByTag(mlt_service, transitionId).cloneNode().toElement();
232
233             for (int k = 0; k < transitionparams.count(); k++) {
234                 p = transitionparams.item(k).toElement();
235                 if (!p.isNull()) {
236                     QString paramName = p.attribute("name");
237                     QString paramValue = p.text();
238
239                     QDomNodeList params = base.elementsByTagName("parameter");
240                     if (paramName != "a_track" && paramName != "b_track") for (int i = 0; i < params.count(); i++) {
241                             QDomElement e = params.item(i).toElement();
242                             if (!e.isNull() && e.attribute("tag") == paramName) {
243                                 if (e.attribute("type") == "double") {
244                                     QString factor = e.attribute("factor", "1");
245                                     if (factor != "1") {
246                                         double val = paramValue.toDouble() * factor.toDouble();
247                                         paramValue = QString::number(val);
248                                     }
249                                 }
250                                 e.setAttribute("value", paramValue);
251                                 break;
252                             }
253                         }
254                 }
255             }
256
257             /*QDomDocument doc;
258             doc.appendChild(doc.importNode(base, true));
259             kDebug() << "///////  TRANSITION XML: "<< doc.toString();*/
260
261             transitionInfo.startPos = GenTime(e.attribute("in").toInt(), m_doc->fps());
262             transitionInfo.endPos = GenTime(e.attribute("out").toInt() + 1, m_doc->fps());
263             transitionInfo.track = m_projectTracks - 1 - b_track;
264             //kDebug() << "///////////////   +++++++++++  ADDING TRANSITION ON TRACK: " << b_track << ", TOTAL TRKA: " << m_projectTracks;
265             Transition *tr = new Transition(transitionInfo, a_track, m_doc->fps(), base, isAutomatic);
266             if (forceTrack) tr->setForcedTrack(true, a_track);
267             m_scene->addItem(tr);
268         }
269     }
270
271     // Add guides
272     QDomNodeList guides = doc.elementsByTagName("guide");
273     for (int i = 0; i < guides.count(); i++) {
274         e = guides.item(i).toElement();
275         const QString comment = e.attribute("comment");
276         const GenTime pos = GenTime(e.attribute("time").toDouble());
277         m_trackview->addGuide(pos, comment);
278     }
279
280     m_trackview->setDuration(duration);
281     kDebug() << "///////////  TOTAL PROJECT DURATION: " << duration;
282     slotRebuildTrackHeaders();
283     if (!m_documentErrors.isNull()) KMessageBox::sorry(this, m_documentErrors);
284     //m_trackview->setCursorPos(cursorPos);
285     //m_scrollBox->setGeometry(0, 0, 300 * zoomFactor(), m_scrollArea->height());
286 }
287
288 void TrackView::slotDeleteClip(const QString &clipId) {
289     m_trackview->deleteClip(clipId);
290 }
291
292 void TrackView::setCursorPos(int pos) {
293     m_trackview->setCursorPos(pos);
294 }
295
296 void TrackView::moveCursorPos(int pos) {
297     m_trackview->setCursorPos(pos, false);
298 }
299
300 void TrackView::slotChangeZoom(int factor) {
301     m_doc->setZoom(factor);
302     m_ruler->setPixelPerMark(factor);
303     m_scale = (double) FRAME_SIZE / m_ruler->comboScale[factor]; // m_ruler->comboScale[m_currentZoom] /
304     m_trackview->setScale(m_scale);
305 }
306
307 int TrackView::fitZoom() const {
308     int zoom = (int)((duration() + 20 / m_scale) * FRAME_SIZE / m_trackview->width());
309     int i;
310     for (i = 0; i < 13; i++)
311         if (m_ruler->comboScale[i] > zoom) break;
312     return i;
313 }
314
315 const double TrackView::zoomFactor() const {
316     return m_scale;
317 }
318
319 const int TrackView::mapLocalToValue(int x) const {
320     return (int)(x * zoomFactor());
321 }
322
323 KdenliveDoc *TrackView::document() {
324     return m_doc;
325 }
326
327 void TrackView::refresh() {
328     m_trackview->viewport()->update();
329 }
330
331 void TrackView::slotRebuildTrackHeaders() {
332     QList <TrackInfo> list = m_trackview->tracksList();
333     QList<HeaderTrack *> widgets = this->findChildren<HeaderTrack *>();
334     for (int i = 0; i < widgets.count(); i++)
335         delete widgets.at(i);
336     int max = list.count();
337     for (int i = 0; i < max; i++) {
338         HeaderTrack *header = new HeaderTrack(i, list.at(max - i - 1), this);
339         connect(header, SIGNAL(switchTrackVideo(int)), m_trackview, SLOT(slotSwitchTrackVideo(int)));
340         connect(header, SIGNAL(switchTrackAudio(int)), m_trackview, SLOT(slotSwitchTrackAudio(int)));
341         /*
342         //TODO: re-enable when add / remove track is implemented
343         connect(header, SIGNAL(deleteTrack(int)), m_trackview, SLOT(slotDeleteTrack(int)));
344         connect(header, SIGNAL(insertTrack(int)), m_trackview, SLOT(slotInsertTrack(int)));*/
345         m_headersLayout->addWidget(header);
346     }
347     view->headers_container->adjustSize();
348 }
349
350 int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool videotrack) {
351     TrackInfo info;
352
353     if (videotrack) {
354         info.type = VIDEOTRACK;
355         info.isMute = false;
356         info.isBlind = false;
357     } else {
358         info.type = AUDIOTRACK;
359         info.isMute = false;
360         info.isBlind = false;
361     }
362
363     m_trackview->addTrack(info);
364
365     int trackTop = KdenliveSettings::trackheight() * ix;
366     // parse track
367     int position = 0;
368     for (QDomNode n = xml.firstChild(); !n.isNull(); n = n.nextSibling()) {
369         QDomElement elem = n.toElement();
370         if (elem.tagName() == "blank") {
371             position += elem.attribute("length").toInt();
372         } else if (elem.tagName() == "entry") {
373             m_doc->loadingProgressed();
374             qApp->processEvents();
375             // Found a clip
376             int in = elem.attribute("in").toInt();
377             QString idString = elem.attribute("producer");
378             QString id = idString;
379             bool hasSpeedAttribute = false;
380             double speed;
381             if (idString.startsWith("slowmotion")) {
382                 hasSpeedAttribute = true;
383                 id = idString.section(":", 1, 1);
384                 speed = idString.section(":", 2, 2).toDouble();
385             } else id = id.section('_', 0, 0);
386             DocClipBase *clip = m_doc->clipManager()->getClipById(id);
387             if (clip != NULL) {
388                 int out = elem.attribute("out").toInt();
389
390                 ItemInfo clipinfo;
391                 clipinfo.startPos = GenTime(position, m_doc->fps());
392                 clipinfo.endPos = clipinfo.startPos + GenTime(out - in + 1, m_doc->fps());
393                 clipinfo.cropStart = GenTime(in, m_doc->fps());
394                 clipinfo.track = ix;
395                 //kDebug() << "// INSERTING CLIP: " << in << "x" << out << ", track: " << ix << ", ID: " << id << ", SCALE: " << m_scale << ", FPS: " << m_doc->fps();
396                 ClipItem *item = new ClipItem(clip, clipinfo, m_doc->fps(), false);
397                 if (hasSpeedAttribute) item->setSpeed(speed);
398                 m_scene->addItem(item);
399                 clip->addReference();
400                 position += (out - in + 1);
401
402                 // parse clip effects
403                 QDomNodeList effects = elem.childNodes();
404                 for (int ix = 0; ix < effects.count(); ix++) {
405                     QDomElement effect = effects.at(ix).toElement();
406                     if (effect.tagName() == "filter") {
407                         // add effect to clip
408                         QString effecttag;
409                         QString effectid;
410                         QString effectindex;
411                         // Get effect tag & index
412                         for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
413                             // parse effect parameters
414                             QDomElement effectparam = n3.toElement();
415                             if (effectparam.attribute("name") == "tag") {
416                                 effecttag = effectparam.text();
417                             } else if (effectparam.attribute("name") == "kdenlive_id") {
418                                 effectid = effectparam.text();
419                             } else if (effectparam.attribute("name") == "kdenlive_ix") {
420                                 effectindex = effectparam.text();
421                             }
422                         }
423                         //kDebug() << "+ + CLIP EFF FND: " << effecttag << ", " << effectid << ", " << effectindex;
424                         // get effect standard tags
425                         QDomElement clipeffect = MainWindow::customEffects.getEffectByTag(QString(), effectid);
426                         if (clipeffect.isNull()) clipeffect = MainWindow::videoEffects.getEffectByTag(effecttag, effectid);
427                         if (clipeffect.isNull()) clipeffect = MainWindow::audioEffects.getEffectByTag(effecttag, effectid);
428                         if (clipeffect.isNull()) {
429                             kDebug() << "///  WARNING, EFFECT: " << effecttag << ": " << effectid << " not found, removing it from project";
430                             m_documentErrors.append(i18n("Effect %1:%2 not found in MLT, it was removed from this project\n", effecttag, effectid));
431                             elem.removeChild(effects.at(ix));
432                             ix--;
433                         } else {
434                             QDomElement currenteffect = clipeffect.cloneNode().toElement();
435                             currenteffect.setAttribute("kdenlive_ix", effectindex);
436                             QDomNodeList clipeffectparams = currenteffect.childNodes();
437
438                             if (MainWindow::videoEffects.hasKeyFrames(currenteffect)) {
439                                 //kDebug() << " * * * * * * * * * * ** CLIP EFF WITH KFR FND  * * * * * * * * * * *";
440                                 // effect is key-framable, read all effects to retrieve keyframes
441                                 double factor;
442                                 QString starttag;
443                                 QString endtag;
444                                 QDomNodeList params = currenteffect.elementsByTagName("parameter");
445                                 for (int i = 0; i < params.count(); i++) {
446                                     QDomElement e = params.item(i).toElement();
447                                     if (e.attribute("type") == "keyframe") {
448                                         starttag = e.attribute("starttag", "start");
449                                         endtag = e.attribute("endtag", "end");
450                                         factor = e.attribute("factor", "1").toDouble();
451                                         break;
452                                     }
453                                 }
454                                 QString keyframes;
455                                 int effectin = effect.attribute("in").toInt();
456                                 int effectout = effect.attribute("out").toInt();
457                                 double startvalue;
458                                 double endvalue;
459                                 for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
460                                     // parse effect parameters
461                                     QDomElement effectparam = n3.toElement();
462                                     if (effectparam.attribute("name") == starttag)
463                                         startvalue = effectparam.text().toDouble() * factor;
464                                     if (effectparam.attribute("name") == endtag)
465                                         endvalue = effectparam.text().toDouble() * factor;
466                                 }
467                                 // add first keyframe
468                                 keyframes.append(QString::number(effectin) + ":" + QString::number(startvalue) + ";" + QString::number(effectout) + ":" + QString::number(endvalue) + ";");
469                                 QDomNode lastParsedEffect;
470                                 ix++;
471                                 QDomNode n2 = effects.at(ix);
472                                 bool continueParsing = true;
473                                 for (; !n2.isNull() && continueParsing; n2 = n2.nextSibling()) {
474                                     // parse all effects
475                                     QDomElement kfreffect = n2.toElement();
476                                     int effectout = kfreffect.attribute("out").toInt();
477
478                                     for (QDomNode n4 = kfreffect.firstChild(); !n4.isNull(); n4 = n4.nextSibling()) {
479                                         // parse effect parameters
480                                         QDomElement subeffectparam = n4.toElement();
481                                         if (subeffectparam.attribute("name") == "kdenlive_ix" && subeffectparam.text() != effectindex) {
482                                             //We are not in the same effect, stop parsing
483                                             lastParsedEffect = n2.previousSibling();
484                                             ix--;
485                                             continueParsing = false;
486                                             break;
487                                         } else if (subeffectparam.attribute("name") == endtag) {
488                                             endvalue = subeffectparam.text().toDouble() * factor;
489                                             break;
490                                         }
491                                     }
492                                     if (continueParsing) {
493                                         keyframes.append(QString::number(effectout) + ":" + QString::number(endvalue) + ";");
494                                         ix++;
495                                     }
496                                 }
497
498                                 params = currenteffect.elementsByTagName("parameter");
499                                 for (int i = 0; i < params.count(); i++) {
500                                     QDomElement e = params.item(i).toElement();
501                                     if (e.attribute("type") == "keyframe") e.setAttribute("keyframes", keyframes);
502                                 }
503                                 if (!continueParsing) {
504                                     n2 = lastParsedEffect;
505                                 }
506                             } else {
507                                 // Check if effect has in/out points
508                                 if (effect.hasAttribute("in")) {
509                                     EffectsList::setParameter(currenteffect, "in",  effect.attribute("in"));
510                                 }
511                                 if (effect.hasAttribute("out")) {
512                                     EffectsList::setParameter(currenteffect, "out",  effect.attribute("out"));
513                                 }
514                             }
515
516                             // adjust effect parameters
517                             for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
518                                 // parse effect parameters
519                                 QDomElement effectparam = n3.toElement();
520                                 QString paramname = effectparam.attribute("name");
521                                 QString paramvalue = effectparam.text();
522
523                                 // try to find this parameter in the effect xml
524                                 QDomElement e;
525                                 for (int k = 0; k < clipeffectparams.count(); k++) {
526                                     e = clipeffectparams.item(k).toElement();
527                                     if (!e.isNull() && e.tagName() == "parameter" && e.attribute("name") == paramname) {
528                                         e.setAttribute("value", paramvalue);
529                                         break;
530                                     }
531                                 }
532                             }
533                             item->addEffect(currenteffect, false);
534                             item->effectsCounter();
535                         }
536                     }
537                 }
538             } else kWarning() << "CANNOT INSERT CLIP " << id;
539             //m_clipList.append(clip);
540         }
541     }
542     //m_trackDuration = position;
543
544
545     //documentTracks.insert(ix, track);
546     kDebug() << "*************  ADD DOC TRACK " << ix << ", DURATION: " << position;
547     return position;
548     //track->show();
549 }
550
551 QGraphicsScene *TrackView::projectScene() {
552     return m_scene;
553 }
554
555 CustomTrackView *TrackView::projectView() {
556     return m_trackview;
557 }
558
559 void TrackView::setEditMode(const QString & editMode) {
560     m_editMode = editMode;
561 }
562
563 const QString & TrackView::editMode() const {
564     return m_editMode;
565 }
566
567
568
569 #include "trackview.moc"