]> git.sesse.net Git - kdenlive/blob - src/trackview.cpp
Fix tracks issues (load & save of tracks with hidden audio or video), also fix
[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
137     int pos = m_projectTracks - 1;
138
139
140     for (int i = 0; i < m_projectTracks; i++) {
141         e = tracks.item(i).toElement();
142         QString playlist_name = e.attribute("producer");
143         if (playlist_name != "black_track" && playlist_name != "playlistmain") {
144             // find playlist related to this track
145             p = QDomElement();
146             for (int j = 0; j < m_projectTracks; j++) {
147                 p = playlists.item(j).toElement();
148                 if (p.attribute("id") == playlist_name) break;
149             }
150             if (e.attribute("hide") == "video") {
151                 m_doc->switchTrackVideo(i - 1, true);
152             } else if (e.attribute("hide") == "audio") {
153                 m_doc->switchTrackAudio(i - 1, true);
154             } else if (e.attribute("hide") == "both") {
155                 m_doc->switchTrackVideo(i - 1, true);
156                 m_doc->switchTrackAudio(i - 1, true);
157             }
158             trackduration = slotAddProjectTrack(pos, p);
159             pos--;
160             //kDebug() << " PRO DUR: " << trackduration << ", TRACK DUR: " << duration;
161             if (trackduration > duration) duration = trackduration;
162         } else {
163             // background black track
164             for (int j = 0; j < m_projectTracks; j++) {
165                 p = playlists.item(j).toElement();
166                 if (p.attribute("id") == playlist_name) break;
167             }
168             int black_clips = p.childNodes().count();
169             for (int i = 0; i < black_clips; i++)
170                 m_doc->loadingProgressed();
171             qApp->processEvents();
172             pos--;
173         }
174     }
175
176     // parse transitions
177     QDomNodeList transitions = doc.elementsByTagName("transition");
178     int projectTransitions = transitions.count();
179     //kDebug() << "//////////// TIMELINE FOUND: " << projectTransitions << " transitions";
180     for (int i = 0; i < projectTransitions; i++) {
181         e = transitions.item(i).toElement();
182         QDomNodeList transitionparams = e.childNodes();
183         bool transitionAdd = true;
184         int a_track = 0;
185         int b_track = 0;
186         bool isAutomatic = false;
187         bool forceTrack = false;
188         QString mlt_geometry;
189         QString mlt_service;
190         for (int k = 0; k < transitionparams.count(); k++) {
191             p = transitionparams.item(k).toElement();
192             if (!p.isNull()) {
193                 QString paramName = p.attribute("name");
194                 // do not add audio mixing transitions
195                 if (paramName == "internal_added" && p.text() == "237") {
196                     transitionAdd = false;
197                     //kDebug() << "//  TRANSITRION " << i << " IS NOT VALID (INTERN ADDED)";
198                     //break;
199                 } else if (paramName == "a_track") a_track = p.text().toInt();
200                 else if (paramName == "b_track") b_track = p.text().toInt();
201                 else if (paramName == "mlt_service") mlt_service = p.text();
202                 else if (paramName == "geometry") mlt_geometry = p.text();
203                 else if (paramName == "automatic" && p.text() == "1") isAutomatic = true;
204                 else if (paramName == "force_track" && p.text() == "1") forceTrack = true;
205             }
206         }
207         if (transitionAdd || mlt_service != "mix") {
208             // Transition should be added to the scene
209             ItemInfo transitionInfo;
210             QString transitionId;
211             if (mlt_service == "composite") {
212                 // When adding composite transition, check if it is a wipe transition
213                 if (mlt_geometry == "0%,0%:100%x100%") transitionId = "alphatransparency";
214                 else if (mlt_geometry.count(';') == 1) {
215                     mlt_geometry.remove(QChar('%'), Qt::CaseInsensitive);
216                     mlt_geometry.replace(QChar('x'), QChar(','), Qt::CaseInsensitive);
217                     QString start = mlt_geometry.section(';', 0, 0);
218                     start = start.section(':', 0, 1);
219                     start.replace(QChar(':'), QChar(','), Qt::CaseInsensitive);
220                     QString end = mlt_geometry.section('=', 1, 1);
221                     end = end.section(':', 0, 1);
222                     end.replace(QChar(':'), QChar(','), Qt::CaseInsensitive);
223                     start.append(',' + end);
224                     QStringList numbers = start.split(',', QString::SkipEmptyParts);
225                     bool isWipeTransition = true;
226                     int checkNumber;
227                     for (int i = 0; i < numbers.size(); ++i) {
228                         checkNumber = qAbs(numbers.at(i).toInt());
229                         if (checkNumber != 0 && checkNumber != 100) {
230                             isWipeTransition = false;
231                             break;
232                         }
233                     }
234                     if (isWipeTransition) transitionId = "wipe";
235                 }
236             }
237             QDomElement base = MainWindow::transitions.getEffectByTag(mlt_service, transitionId).cloneNode().toElement();
238
239             for (int k = 0; k < transitionparams.count(); k++) {
240                 p = transitionparams.item(k).toElement();
241                 if (!p.isNull()) {
242                     QString paramName = p.attribute("name");
243                     QString paramValue = p.text();
244
245                     QDomNodeList params = base.elementsByTagName("parameter");
246                     if (paramName != "a_track" && paramName != "b_track") for (int i = 0; i < params.count(); i++) {
247                             QDomElement e = params.item(i).toElement();
248                             if (!e.isNull() && e.attribute("tag") == paramName) {
249                                 if (e.attribute("type") == "double") {
250                                     QString factor = e.attribute("factor", "1");
251                                     if (factor != "1") {
252                                         double val = paramValue.toDouble() * factor.toDouble();
253                                         paramValue = QString::number(val);
254                                     }
255                                 }
256                                 e.setAttribute("value", paramValue);
257                                 break;
258                             }
259                         }
260                 }
261             }
262
263             /*QDomDocument doc;
264             doc.appendChild(doc.importNode(base, true));
265             kDebug() << "///////  TRANSITION XML: "<< doc.toString();*/
266
267             transitionInfo.startPos = GenTime(e.attribute("in").toInt(), m_doc->fps());
268             transitionInfo.endPos = GenTime(e.attribute("out").toInt() + 1, m_doc->fps());
269             transitionInfo.track = m_projectTracks - 1 - b_track;
270             //kDebug() << "///////////////   +++++++++++  ADDING TRANSITION ON TRACK: " << b_track << ", TOTAL TRKA: " << m_projectTracks;
271             Transition *tr = new Transition(transitionInfo, a_track, m_doc->fps(), base, isAutomatic);
272             if (forceTrack) tr->setForcedTrack(true, a_track);
273             m_scene->addItem(tr);
274         }
275     }
276
277     // Add guides
278     QDomNodeList guides = doc.elementsByTagName("guide");
279     for (int i = 0; i < guides.count(); i++) {
280         e = guides.item(i).toElement();
281         const QString comment = e.attribute("comment");
282         const GenTime pos = GenTime(e.attribute("time").toDouble());
283         m_trackview->addGuide(pos, comment);
284     }
285
286     m_trackview->setDuration(duration);
287     kDebug() << "///////////  TOTAL PROJECT DURATION: " << duration;
288     slotRebuildTrackHeaders();
289     if (!m_documentErrors.isNull()) KMessageBox::sorry(this, m_documentErrors);
290     //m_trackview->setCursorPos(cursorPos);
291     //m_scrollBox->setGeometry(0, 0, 300 * zoomFactor(), m_scrollArea->height());
292 }
293
294 void TrackView::slotDeleteClip(const QString &clipId) {
295     m_trackview->deleteClip(clipId);
296 }
297
298 void TrackView::setCursorPos(int pos) {
299     m_trackview->setCursorPos(pos);
300 }
301
302 void TrackView::moveCursorPos(int pos) {
303     m_trackview->setCursorPos(pos, false);
304 }
305
306 void TrackView::slotChangeZoom(int factor) {
307     m_doc->setZoom(factor);
308     m_ruler->setPixelPerMark(factor);
309     m_scale = (double) FRAME_SIZE / m_ruler->comboScale[factor]; // m_ruler->comboScale[m_currentZoom] /
310     m_trackview->setScale(m_scale);
311 }
312
313 int TrackView::fitZoom() const {
314     int zoom = (int)((duration() + 20 / m_scale) * FRAME_SIZE / m_trackview->width());
315     int i;
316     for (i = 0; i < 13; i++)
317         if (m_ruler->comboScale[i] > zoom) break;
318     return i;
319 }
320
321 const double TrackView::zoomFactor() const {
322     return m_scale;
323 }
324
325 const int TrackView::mapLocalToValue(int x) const {
326     return (int)(x * zoomFactor());
327 }
328
329 KdenliveDoc *TrackView::document() {
330     return m_doc;
331 }
332
333 void TrackView::refresh() {
334     m_trackview->viewport()->update();
335 }
336
337 void TrackView::slotRebuildTrackHeaders() {
338     QList <TrackInfo> list = m_doc->tracksList();
339     QList<HeaderTrack *> widgets = this->findChildren<HeaderTrack *>();
340     for (int i = 0; i < widgets.count(); i++)
341         delete widgets.at(i);
342     int max = list.count();
343     for (int i = 0; i < max; i++) {
344         HeaderTrack *header = new HeaderTrack(i, list.at(max - i - 1), this);
345         connect(header, SIGNAL(switchTrackVideo(int)), m_trackview, SLOT(slotSwitchTrackVideo(int)));
346         connect(header, SIGNAL(switchTrackAudio(int)), m_trackview, SLOT(slotSwitchTrackAudio(int)));
347
348         //TODO: re-enable when add / remove track is implemented
349         connect(header, SIGNAL(deleteTrack(int)), this, SIGNAL(deleteTrack(int)));
350         connect(header, SIGNAL(insertTrack(int)), this, SIGNAL(insertTrack(int)));
351         m_headersLayout->addWidget(header);
352     }
353     view->headers_container->adjustSize();
354 }
355
356
357 int TrackView::slotAddProjectTrack(int ix, QDomElement xml) {
358     int trackTop = KdenliveSettings::trackheight() * ix;
359     // parse track
360     int position = 0;
361     for (QDomNode n = xml.firstChild(); !n.isNull(); n = n.nextSibling()) {
362         QDomElement elem = n.toElement();
363         if (elem.tagName() == "blank") {
364             position += elem.attribute("length").toInt();
365         } else if (elem.tagName() == "entry") {
366             m_doc->loadingProgressed();
367             qApp->processEvents();
368             // Found a clip
369             int in = elem.attribute("in").toInt();
370             QString idString = elem.attribute("producer");
371             QString id = idString;
372             bool hasSpeedAttribute = false;
373             double speed;
374             if (idString.startsWith("slowmotion")) {
375                 hasSpeedAttribute = true;
376                 id = idString.section(":", 1, 1);
377                 speed = idString.section(":", 2, 2).toDouble();
378             } else id = id.section('_', 0, 0);
379             DocClipBase *clip = m_doc->clipManager()->getClipById(id);
380             if (clip != NULL) {
381                 int out = elem.attribute("out").toInt();
382
383                 ItemInfo clipinfo;
384                 clipinfo.startPos = GenTime(position, m_doc->fps());
385                 clipinfo.endPos = clipinfo.startPos + GenTime(out - in + 1, m_doc->fps());
386                 clipinfo.cropStart = GenTime(in, m_doc->fps());
387                 clipinfo.track = ix;
388                 //kDebug() << "// INSERTING CLIP: " << in << "x" << out << ", track: " << ix << ", ID: " << id << ", SCALE: " << m_scale << ", FPS: " << m_doc->fps();
389                 ClipItem *item = new ClipItem(clip, clipinfo, m_doc->fps(), false);
390                 if (hasSpeedAttribute) item->setSpeed(speed);
391                 m_scene->addItem(item);
392                 clip->addReference();
393                 position += (out - in + 1);
394
395                 // parse clip effects
396                 QDomNodeList effects = elem.childNodes();
397                 for (int ix = 0; ix < effects.count(); ix++) {
398                     QDomElement effect = effects.at(ix).toElement();
399                     if (effect.tagName() == "filter") {
400                         // add effect to clip
401                         QString effecttag;
402                         QString effectid;
403                         QString effectindex;
404                         // Get effect tag & index
405                         for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
406                             // parse effect parameters
407                             QDomElement effectparam = n3.toElement();
408                             if (effectparam.attribute("name") == "tag") {
409                                 effecttag = effectparam.text();
410                             } else if (effectparam.attribute("name") == "kdenlive_id") {
411                                 effectid = effectparam.text();
412                             } else if (effectparam.attribute("name") == "kdenlive_ix") {
413                                 effectindex = effectparam.text();
414                             }
415                         }
416                         //kDebug() << "+ + CLIP EFF FND: " << effecttag << ", " << effectid << ", " << effectindex;
417                         // get effect standard tags
418                         QDomElement clipeffect = MainWindow::customEffects.getEffectByTag(QString(), effectid);
419                         if (clipeffect.isNull()) clipeffect = MainWindow::videoEffects.getEffectByTag(effecttag, effectid);
420                         if (clipeffect.isNull()) clipeffect = MainWindow::audioEffects.getEffectByTag(effecttag, effectid);
421                         if (clipeffect.isNull()) {
422                             kDebug() << "///  WARNING, EFFECT: " << effecttag << ": " << effectid << " not found, removing it from project";
423                             m_documentErrors.append(i18n("Effect %1:%2 not found in MLT, it was removed from this project\n", effecttag, effectid));
424                             elem.removeChild(effects.at(ix));
425                             ix--;
426                         } else {
427                             QDomElement currenteffect = clipeffect.cloneNode().toElement();
428                             currenteffect.setAttribute("kdenlive_ix", effectindex);
429                             QDomNodeList clipeffectparams = currenteffect.childNodes();
430
431                             if (MainWindow::videoEffects.hasKeyFrames(currenteffect)) {
432                                 //kDebug() << " * * * * * * * * * * ** CLIP EFF WITH KFR FND  * * * * * * * * * * *";
433                                 // effect is key-framable, read all effects to retrieve keyframes
434                                 double factor;
435                                 QString starttag;
436                                 QString endtag;
437                                 QDomNodeList params = currenteffect.elementsByTagName("parameter");
438                                 for (int i = 0; i < params.count(); i++) {
439                                     QDomElement e = params.item(i).toElement();
440                                     if (e.attribute("type") == "keyframe") {
441                                         starttag = e.attribute("starttag", "start");
442                                         endtag = e.attribute("endtag", "end");
443                                         factor = e.attribute("factor", "1").toDouble();
444                                         break;
445                                     }
446                                 }
447                                 QString keyframes;
448                                 int effectin = effect.attribute("in").toInt();
449                                 int effectout = effect.attribute("out").toInt();
450                                 double startvalue;
451                                 double endvalue;
452                                 for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
453                                     // parse effect parameters
454                                     QDomElement effectparam = n3.toElement();
455                                     if (effectparam.attribute("name") == starttag)
456                                         startvalue = effectparam.text().toDouble() * factor;
457                                     if (effectparam.attribute("name") == endtag)
458                                         endvalue = effectparam.text().toDouble() * factor;
459                                 }
460                                 // add first keyframe
461                                 keyframes.append(QString::number(effectin) + ":" + QString::number(startvalue) + ";" + QString::number(effectout) + ":" + QString::number(endvalue) + ";");
462                                 QDomNode lastParsedEffect;
463                                 ix++;
464                                 QDomNode n2 = effects.at(ix);
465                                 bool continueParsing = true;
466                                 for (; !n2.isNull() && continueParsing; n2 = n2.nextSibling()) {
467                                     // parse all effects
468                                     QDomElement kfreffect = n2.toElement();
469                                     int effectout = kfreffect.attribute("out").toInt();
470
471                                     for (QDomNode n4 = kfreffect.firstChild(); !n4.isNull(); n4 = n4.nextSibling()) {
472                                         // parse effect parameters
473                                         QDomElement subeffectparam = n4.toElement();
474                                         if (subeffectparam.attribute("name") == "kdenlive_ix" && subeffectparam.text() != effectindex) {
475                                             //We are not in the same effect, stop parsing
476                                             lastParsedEffect = n2.previousSibling();
477                                             ix--;
478                                             continueParsing = false;
479                                             break;
480                                         } else if (subeffectparam.attribute("name") == endtag) {
481                                             endvalue = subeffectparam.text().toDouble() * factor;
482                                             break;
483                                         }
484                                     }
485                                     if (continueParsing) {
486                                         keyframes.append(QString::number(effectout) + ":" + QString::number(endvalue) + ";");
487                                         ix++;
488                                     }
489                                 }
490
491                                 params = currenteffect.elementsByTagName("parameter");
492                                 for (int i = 0; i < params.count(); i++) {
493                                     QDomElement e = params.item(i).toElement();
494                                     if (e.attribute("type") == "keyframe") e.setAttribute("keyframes", keyframes);
495                                 }
496                                 if (!continueParsing) {
497                                     n2 = lastParsedEffect;
498                                 }
499                             } else {
500                                 // Check if effect has in/out points
501                                 if (effect.hasAttribute("in")) {
502                                     EffectsList::setParameter(currenteffect, "in",  effect.attribute("in"));
503                                 }
504                                 if (effect.hasAttribute("out")) {
505                                     EffectsList::setParameter(currenteffect, "out",  effect.attribute("out"));
506                                 }
507                             }
508
509                             // adjust effect parameters
510                             for (QDomNode n3 = effect.firstChild(); !n3.isNull(); n3 = n3.nextSibling()) {
511                                 // parse effect parameters
512                                 QDomElement effectparam = n3.toElement();
513                                 QString paramname = effectparam.attribute("name");
514                                 QString paramvalue = effectparam.text();
515
516                                 // try to find this parameter in the effect xml
517                                 QDomElement e;
518                                 for (int k = 0; k < clipeffectparams.count(); k++) {
519                                     e = clipeffectparams.item(k).toElement();
520                                     if (!e.isNull() && e.tagName() == "parameter" && e.attribute("name") == paramname) {
521                                         e.setAttribute("value", paramvalue);
522                                         break;
523                                     }
524                                 }
525                             }
526                             item->addEffect(currenteffect, false);
527                             item->effectsCounter();
528                         }
529                     }
530                 }
531             } else kWarning() << "CANNOT INSERT CLIP " << id;
532             //m_clipList.append(clip);
533         }
534     }
535     //m_trackDuration = position;
536
537
538     //documentTracks.insert(ix, track);
539     kDebug() << "*************  ADD DOC TRACK " << ix << ", DURATION: " << position;
540     return position;
541     //track->show();
542 }
543
544 QGraphicsScene *TrackView::projectScene() {
545     return m_scene;
546 }
547
548 CustomTrackView *TrackView::projectView() {
549     return m_trackview;
550 }
551
552 void TrackView::setEditMode(const QString & editMode) {
553     m_editMode = editMode;
554 }
555
556 const QString & TrackView::editMode() const {
557     return m_editMode;
558 }
559
560
561
562 #include "trackview.moc"