]> git.sesse.net Git - kdenlive/blob - src/customtrackview.h
Load & save markers (audacity compatible):
[kdenlive] / src / customtrackview.h
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 #ifndef CUSTOMTRACKVIEW_H
22 #define CUSTOMTRACKVIEW_H
23
24 #include <kdeversion.h>
25 #include <KColorScheme>
26
27 #include <QGraphicsView>
28 #include <QGraphicsItemAnimation>
29 #include <QTimeLine>
30 #include <QMenu>
31 #include <QUndoStack>
32 #include <QMutex>
33 #include <QWaitCondition>
34
35 #include "kdenlivedoc.h"
36 #include "docclipbase.h"
37 #include "guide.h"
38 #include "effectslist.h"
39 #include "customtrackscene.h"
40
41 class ClipItem;
42 class AbstractClipItem;
43 class AbstractGroupItem;
44 class Transition;
45 class AudioCorrelation;
46
47 class CustomTrackView : public QGraphicsView
48 {
49     Q_OBJECT
50
51 public:
52     CustomTrackView(KdenliveDoc *doc, CustomTrackScene* projectscene, QWidget *parent = 0);
53     virtual ~ CustomTrackView();
54     virtual void mousePressEvent(QMouseEvent * event);
55     virtual void mouseReleaseEvent(QMouseEvent * event);
56     virtual void mouseMoveEvent(QMouseEvent * event);
57     virtual void mouseDoubleClickEvent(QMouseEvent *event);
58     void addTrack(TrackInfo type, int ix = -1);
59     void removeTrack(int ix);
60     /** @brief Makes the document use new track infos (name, type, ...). */
61     void configTracks(QList <TrackInfo> trackInfos);
62     int cursorPos();
63     void checkAutoScroll();
64     /**
65       Move the clip at \c start to \c end.
66
67       If \c out_actualEnd is not NULL, it will be set to the position the clip really ended up at.
68       For example, attempting to move a clip to t = -1 s will actually move it to t = 0 s.
69       */
70     bool moveClip(const ItemInfo &start, const ItemInfo &end, bool refresh, ItemInfo *out_actualEnd = NULL);
71     void moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> startTransition, const GenTime &offset, const int trackOffset, bool reverseMove = false);
72     /** move transition, startPos = (old start, old end), endPos = (new start, new end) */
73     void moveTransition(const ItemInfo &start, const ItemInfo &end, bool refresh);
74     void resizeClip(const ItemInfo &start, const ItemInfo &end, bool dontWorry = false);
75     void addClip(QDomElement xml, const QString &clipId, ItemInfo info, EffectsList list = EffectsList(), bool overwrite = false, bool push = false, bool refresh = true);
76     void deleteClip(ItemInfo info, bool refresh = true);
77     void slotDeleteClipMarker(const QString &comment, const QString &id, const GenTime &position);
78     void slotDeleteAllClipMarkers(const QString &id);
79     void addMarker(const QString &id, const GenTime &pos, const QString &comment);
80     void setScale(double scaleFactor, double verticalScale);
81     void deleteClip(const QString &clipId);
82     /** @brief Add effect to current clip */
83     void slotAddEffect(QDomElement effect, GenTime pos, int track);
84     void slotAddGroupEffect(QDomElement effect, AbstractGroupItem *group);
85     void addEffect(int track, GenTime pos, QDomElement effect);
86     void deleteEffect(int track, GenTime pos, QDomElement effect);
87     void updateEffect(int track, GenTime pos, QDomElement insertedEffect, bool refreshEffectStack = false);
88     /** @brief Enable / disable a list of effects */
89     void updateEffectState(int track, GenTime pos, QList <int> effectIndexes, bool disable, bool updateEffectStack);
90     void moveEffect(int track, GenTime pos, QList <int> oldPos, QList <int> newPos);
91     void addTransition(ItemInfo transitionInfo, int endTrack, QDomElement params, bool refresh);
92     void deleteTransition(ItemInfo transitionInfo, int endTrack, QDomElement params, bool refresh);
93     void updateTransition(int track, GenTime pos,  QDomElement oldTransition, QDomElement transition, bool updateTransitionWidget);
94     void moveTransition(GenTime oldpos, GenTime newpos);
95     void activateMonitor();
96     int duration() const;
97     void deleteSelectedClips();
98     /** @brief Cuts all clips that are selected at the timeline cursor position. */
99     void cutSelectedClips();
100     void setContextMenu(QMenu *timeline, QMenu *clip, QMenu *transition, QActionGroup *clipTypeGroup, QMenu *markermenu);
101     bool checkTrackHeight();
102     void updateSceneFrameWidth();
103     //QList <TrackInfo> tracksList() const;
104     void setTool(PROJECTTOOL tool);
105     ClipItem *cutClip(ItemInfo info, GenTime cutTime, bool cut, bool execute = true);
106     void slotSeekToPreviousSnap();
107     void slotSeekToNextSnap();
108     double getSnapPointForPos(double pos);
109     void editKeyFrame(const GenTime &pos, const int track, const int index, const QString &keyframes);
110     bool findString(const QString &text);
111     void selectFound(QString track, QString pos);
112     bool findNextString(const QString &text);
113     void initSearchStrings();
114     void clearSearchStrings();
115     QList<ItemInfo> findId(const QString &clipId);
116     void clipStart();
117     void clipEnd();
118     void doChangeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, const double speed, const double oldspeed, int strobe, const QString &id);
119     /** @brief Sets the document as modified. */
120     void setDocumentModified();
121     void setInPoint();
122     void setOutPoint();
123
124     /** @brief Prepares inserting space.
125     *
126     * Shows a dialog to configure length and track. */
127     void slotInsertSpace();
128     /** @brief Prepares removing space. */
129     void slotRemoveSpace();
130     void insertSpace(QList<ItemInfo> clipsToMove, QList<ItemInfo> transToMove, int track, const GenTime &duration, const GenTime &offset);
131     ClipItem *getActiveClipUnderCursor(bool allowOutsideCursor = false) const;
132     void deleteTimelineTrack(int ix, TrackInfo trackinfo);
133     void saveThumbnails();
134     void autoTransition();
135     void initCursorPos(int pos);
136
137     /** @brief Locks or unlocks a track.
138     * @param ix number of track
139     * @param lock whether to lock or unlock
140     * @param requestUpdate (default = true) Whether to request an update of the icon in the track header
141     *
142     * Makes sure no clip on track to lock is selected. */
143     void lockTrack(int ix, bool lock, bool requestUpdate = true);
144     void groupClips(bool group = true);
145     void doGroupClips(QList <ItemInfo> clipInfos, QList <ItemInfo> transitionInfos, bool group);
146     void loadGroups(const QDomNodeList &groups);
147
148     /** @brief Creates SplitAudioCommands for selected clips. */
149     void splitAudio();
150
151     /// Define which clip to take as reference for automatic audio alignment
152     void setAudioAlignReference();
153
154     /// Automatically align the currently selected clips to synchronize their audio with the reference's audio
155     void alignAudio();
156
157     /** @brief Seperates the audio of a clip to a audio track.
158     * @param pos Position of the clip to split
159     * @param track Track of the clip
160     * @param split Split or unsplit */
161     void doSplitAudio(const GenTime &pos, int track, EffectsList effects, bool split);
162     void setVideoOnly();
163     void setAudioOnly();
164     void setAudioAndVideo();
165     void doChangeClipType(const GenTime &pos, int track, bool videoOnly, bool audioOnly);
166     int hasGuide(int pos, int offset);
167     void reloadTransitionLumas();
168     void updateProjectFps();
169     double fps() const;
170     int selectedTrack() const;
171     QStringList selectedClips() const;
172     QList<ClipItem *> selectedClipItems() const;
173     /** @brief Checks wheter an item can be inserted (make sure it does not overlap another item) */
174     bool canBePastedTo(ItemInfo info, int type) const;
175
176     /** @brief Selects a clip.
177     * @param add Whether to select or deselect
178     * @param group (optional) Whether to add the clip to a group
179     * @param track (optional) The track of the clip (has to be combined with @param pos)
180     * @param pos (optional) The position of the clip (has to be combined with @param track) */
181     void selectClip(bool add, bool group = false, int track = -1, int pos = -1);
182     void selectTransition(bool add, bool group = false);
183     QStringList extractTransitionsLumas();
184     void setEditMode(EDITMODE mode);
185
186     /** @brief Inserts @param clip.
187     * @param clip The clip to insert
188     * @param in The inpoint of the clip (crop from start)
189     * @param out The outpoint of the clip (crop from end)
190     *
191     * Inserts at the position of timeline cursor and selected track. */
192     void insertClipCut(DocClipBase *clip, int in, int out);
193     void clearSelection(bool emitInfo = true);
194     void editItemDuration();
195     void buildGuidesMenu(QMenu *goMenu) const;
196     /** update the timeline objects when palette changes */
197     void updatePalette();
198     /** @brief Returns true if a track has audio data on it.
199     * @param track The track number
200     *
201     * Check whether given track has a clip with audio in it. */
202     bool hasAudio(int track) const;
203
204     int getFrameWidth();
205     /** @brief Returns last requested seeking pos (or SEEK_INACTIVE if no seek). */
206     int seekPosition() const;
207     
208 public slots:
209     /** @brief Send seek request to MLT. */
210     void seekCursorPos(int pos);
211     /** @brief Move timeline cursor to new position. */
212     void setCursorPos(int pos);
213     void moveCursorPos(int delta);
214     void updateCursorPos();
215     void slotDeleteEffect(ClipItem *clip, int track, QDomElement effect, bool affectGroup = true);
216     void slotChangeEffectState(ClipItem *clip, int track, QList <int> effectIndexes, bool disable);
217     void slotChangeEffectPosition(ClipItem *clip, int track, QList <int> currentPos, int newPos);
218     void slotUpdateClipEffect(ClipItem *clip, int track, QDomElement oldeffect, QDomElement effect, int ix, bool refreshEffectStack = true);
219     void slotUpdateClipRegion(ClipItem *clip, int ix, QString region);
220     void slotRefreshEffects(ClipItem *clip);
221     void setDuration(int duration);
222     void slotAddTransition(ClipItem* clip, ItemInfo transitionInfo, int endTrack, QDomElement transition = QDomElement());
223     void slotAddTransitionToSelectedClips(QDomElement transition);
224     void slotTransitionUpdated(Transition *, QDomElement);
225     void slotSwitchTrackAudio(int ix);
226     void slotSwitchTrackVideo(int ix);
227     void slotSwitchTrackLock(int ix);
228     void slotUpdateClip(const QString &clipId, bool reload = true);
229
230     /** @brief Creates a AddClipCommand to add, edit or delete a marker.
231      * @param id Id of the marker's clip
232      * @param t Position of the marker
233      * @param c Comment of the marker */
234     void slotAddClipMarker(const QString &id, GenTime t, QString c, QUndoCommand *groupCommand = 0);
235     void slotLoadClipMarkers(const QString &id);
236     void slotSaveClipMarkers(const QString &id);
237     bool addGuide(const GenTime &pos, const QString &comment);
238
239     /** @brief Shows a dialog for adding a guide.
240      * @param dialog (default = true) false = do not show the dialog but use current position as position and comment */
241     void slotAddGuide(bool dialog = true);
242     void slotEditGuide(CommentedTime guide);
243     void slotEditGuide(int guidePos = -1);
244     void slotDeleteGuide(int guidePos = -1);
245     void slotDeleteAllGuides();
246     void editGuide(const GenTime &oldPos, const GenTime &pos, const QString &comment);
247     void copyClip();
248     void pasteClip();
249     void pasteClipEffects();
250     void slotUpdateAllThumbs();
251     void slotCheckPositionScrolling();
252     void slotInsertTrack(int ix);
253
254     /** @brief Shows a dialog for selecting a track to delete.
255     * @param ix Number of the track, which should be pre-selected in the dialog */
256     void slotDeleteTrack(int ix);
257     /** @brief Shows the configure tracks dialog. */
258     void slotConfigTracks(int ix);
259     void clipNameChanged(const QString &id, const QString &name);
260     void slotTrackUp();
261     void slotTrackDown();
262     void slotSelectTrack(int ix);
263     void insertZoneOverwrite(QStringList data, int in);
264
265     /** @brief Rebuilds a group to fit again after children changed.
266     * @param childTrack the track of one of the groups children
267     * @param childPos The position of the same child */
268     void rebuildGroup(int childTrack, GenTime childPos);
269     /** @brief Rebuilds a group to fit again after children changed.
270     * @param group The group to rebuild */
271     void rebuildGroup(AbstractGroupItem *group);
272
273     /** @brief Cuts a group into two parts.
274     * @param clips1 Clips before the cut
275     * @param transitions1 Transitions before the cut
276     * @param clipsCut Clips that need to be cut
277     * @param transitionsCut Transitions that need to be cut
278     * @param clips2 Clips behind the cut
279     * @param transitions2 Transitions behind the cut
280     * @param cutPos Absolute position of the cut
281     * @param cut true = cut, false = "uncut" */
282     void slotRazorGroup(QList <ItemInfo> clips1, QList <ItemInfo> transitions1, QList <ItemInfo> clipsCut, QList <ItemInfo> transitionsCut, QList <ItemInfo> clips2, QList <ItemInfo> transitions2, GenTime cutPos, bool cut);
283
284     /** @brief Add en effect to a track.
285     * @param effect The new effect xml
286     * @param ix The track index */
287     void slotAddTrackEffect(const QDomElement &effect, int ix);
288     /** @brief Select all clips in selected track. */
289     void slotSelectClipsInTrack();
290     /** @brief Select all clips in timeline. */
291     void slotSelectAllClips();
292
293     /** @brief Update the list of snap points (sticky timeline hotspots).
294     * @param selected The currently selected clip if any
295     * @param offsetList The list of points that should also snap (for example when movin a clip, start and end points should snap
296     * @param skipSelectedItems if true, the selected item start and end points will not be added to snap list */
297     void updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList = QList <GenTime> (), bool skipSelectedItems = false);
298     
299     void slotAddEffect(ClipItem *clip, QDomElement effect);
300
301 protected:
302     virtual void drawBackground(QPainter * painter, const QRectF & rect);
303     //virtual void drawForeground ( QPainter * painter, const QRectF & rect );
304     virtual void dragEnterEvent(QDragEnterEvent * event);
305     virtual void dragMoveEvent(QDragMoveEvent * event);
306     virtual void dragLeaveEvent(QDragLeaveEvent * event);
307     /** @brief Something has been dropped onto the timeline */
308     virtual void dropEvent(QDropEvent * event);
309     virtual void wheelEvent(QWheelEvent * e);
310     virtual void keyPressEvent(QKeyEvent * event);
311     virtual QStringList mimeTypes() const;
312     virtual Qt::DropActions supportedDropActions() const;
313
314 private:
315     int m_ct;
316     int m_tracksHeight;
317     int m_projectDuration;
318     int m_cursorPos;
319     KdenliveDoc *m_document;
320     CustomTrackScene *m_scene;
321     QGraphicsLineItem *m_cursorLine;
322     ItemInfo m_dragItemInfo;
323     ItemInfo m_selectionGroupInfo;
324     OPERATIONTYPE m_operationMode;
325     OPERATIONTYPE m_moveOpMode;
326     AbstractClipItem *m_dragItem;
327     Guide *m_dragGuide;
328     QUndoStack *m_commandStack;
329     QGraphicsItem *m_visualTip;
330     QGraphicsItemAnimation *m_animation;
331     QTimeLine *m_animationTimer;
332     QColor m_tipColor;
333     QPen m_tipPen;
334     QPoint m_clickPoint;
335     QPoint m_clickEvent;
336     QList <CommentedTime> m_searchPoints;
337     QList <Guide *> m_guides;
338
339     ClipItem *getClipItemAt(int pos, int track);
340     ClipItem *getClipItemAt(GenTime pos, int track);
341     ClipItem *getClipItemAtEnd(GenTime pos, int track);
342     ClipItem *getClipItemAtStart(GenTime pos, int track);
343     Transition *getTransitionItem(TransitionInfo info);
344     Transition *getTransitionItemAt(int pos, int track);
345     Transition *getTransitionItemAt(GenTime pos, int track);
346     Transition *getTransitionItemAtEnd(GenTime pos, int track);
347     Transition *getTransitionItemAtStart(GenTime pos, int track);
348     void checkScrolling();
349     /** Should we auto scroll while playing (keep in sync with KdenliveSettings::autoscroll() */
350     bool m_autoScroll;
351     void displayContextMenu(QPoint pos, AbstractClipItem *clip, AbstractGroupItem *group);
352     QMenu *m_timelineContextMenu;
353     QMenu *m_timelineContextClipMenu;
354     QMenu *m_timelineContextTransitionMenu;
355     QMenu *m_markerMenu;
356     QAction *m_autoTransition;
357     QAction *m_pasteEffectsAction;
358     QAction *m_ungroupAction;
359     QAction *m_editGuide;
360     QAction *m_deleteGuide;
361     QActionGroup *m_clipTypeGroup;
362     QTimer m_scrollTimer;
363     QTimer m_thumbsTimer;
364     int m_scrollOffset;
365     bool m_clipDrag;
366
367     int m_findIndex;
368     PROJECTTOOL m_tool;
369     QCursor m_razorCursor;
370     QCursor m_spacerCursor;
371     /** list containing items currently copied in the timeline */
372     QList<AbstractClipItem *> m_copiedItems;
373     /** Used to get the point in timeline where a context menu was opened */
374     QPoint m_menuPosition;
375     bool m_blockRefresh;
376     AbstractGroupItem *m_selectionGroup;
377     QList <ClipItem *> m_waitingThumbs;
378     int m_selectedTrack;
379     int m_spacerOffset;
380
381     QMutex m_mutex;
382     QWaitCondition m_producerNotReady;
383     KStatefulBrush m_activeTrackBrush;
384
385     AudioCorrelation *m_audioCorrelator;
386     ClipItem *m_audioAlignmentReference;
387
388     /** stores the state of the control modifier during mouse press.
389      * Will then be used to identify whether we resize a group or only one item of it. */
390     bool m_controlModifier;
391
392     /** Get the index of the video track that is just below current track */
393     int getPreviousVideoTrack(int track);
394     void updatePositionEffects(ClipItem * item, ItemInfo info, bool standalone = true);
395     bool insertDropClips(const QMimeData *data, const QPoint &pos);
396     bool canBePastedTo(QList <ItemInfo> infoList, int type) const;
397     bool canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
398     bool canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
399     ClipItem *getClipUnderCursor() const;
400     AbstractClipItem *getMainActiveClip() const;
401     void resetSelectionGroup(bool selectItems = true);
402     void groupSelectedItems(bool force = false, bool createNewGroup = false);
403     /** Get available space for clip move (min and max free positions) */
404     void getClipAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum);
405     /** Get available space for transition move (min and max free positions) */
406     void getTransitionAvailableSpace(AbstractClipItem *item, GenTime &minimum, GenTime &maximum);
407     void updateClipTypeActions(ClipItem *clip);
408     /** Whether an item can be moved to a new position without colliding with similar items */
409     bool itemCollision(AbstractClipItem *item, ItemInfo newPos);
410     /** Selects all items in the scene rect, and sets ok to false if a group going over several tracks is found in it */
411     QList<QGraphicsItem *> checkForGroups(const QRectF &rect, bool *ok);
412     /** Adjust clips under another one when working in overwrite mode */
413     void adjustTimelineClips(EDITMODE mode, ClipItem *item, ItemInfo posinfo, QUndoCommand *command);
414     void adjustTimelineTransitions(EDITMODE mode, Transition *item, QUndoCommand *command);
415     /** Adjust keyframes when pasted to another clip */
416     void adjustKeyfames(GenTime oldstart, GenTime newstart, GenTime duration, QDomElement xml);
417
418     /** @brief Removes the tip and stops the animation timer. */
419     void removeTipAnimation();
420     /** @brief Creates a new tip animation.
421     * @param clip clip to display the tip on
422     * @param mode operation mode for which the tip should be displayed
423     * @param size size of the tip */
424     void setTipAnimation(AbstractClipItem *clip, OPERATIONTYPE mode, const double size);
425
426     /** @brief Takes care of updating effects and attached transitions during a resize from start.
427     * @param item Item to resize
428     * @param oldInfo The item's info before resizement (set to item->info() is @param check true)
429     * @param pos New startPos
430     * @param check (optional, default = false) Whether to check for collisions
431     * @param command (optional) Will be used as parent command (for undo history) */
432     void prepareResizeClipStart(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false, QUndoCommand *command = NULL);
433
434     /** @brief Takes care of updating effects and attached transitions during a resize from end.
435     * @param item Item to resize
436     * @param oldInfo The item's info before resizement (set to item->info() is @param check true)
437     * @param pos New endPos
438     * @param check (optional, default = false) Whether to check for collisions
439     * @param command (optional) Will be used as parent command (for undo history) */
440     void prepareResizeClipEnd(AbstractClipItem *item, ItemInfo oldInfo, int pos, bool check = false, QUndoCommand *command = NULL);
441
442     /** @brief Collects information about the group's children to pass it on to RazorGroupCommand.
443     * @param group The group to cut
444     * @param cutPos The absolute position of the cut */
445     void razorGroup(AbstractGroupItem *group, GenTime cutPos);
446
447     /** @brief Gets the effect parameters that will be passed to Mlt. */
448     EffectsParameterList getEffectArgs(const QDomElement &effect);
449
450     /** @brief Update Tracknames to fit again after track was added/deleted.
451      * @param track Number of track which was added/deleted
452      * @param added true = track added, false = track deleted
453      * 
454      * The default track name consists of type + number. If we add/delete a track the number has to be adjusted
455      * if the name is still the default one. */
456     void updateTrackNames(int track, bool added);
457
458     /** @brief Updates the duration stored in a track's TrackInfo.
459      * @param track Number of track as used in ItemInfo (not the numbering used in KdenliveDoc) (negative for all tracks)
460      * @param command If effects need to be updated the commands to do this will be attached to this undo command
461      * 
462      * In addition to update the duration in TrackInfo it updates effects with keyframes on the track. */
463     void updateTrackDuration(int track, QUndoCommand *command);
464
465     /** @brief Adjusts effects after a clip resize.
466      * @param item The item that was resized
467      * @param oldInfo pre resize info
468      * @param fromStart false = resize from end
469      * @param command Used as a parent for EditEffectCommand */
470     void adjustEffects(ClipItem *item, ItemInfo oldInfo, QUndoCommand *command);
471     
472     /** @brief Prepare an add clip command for an effect */
473     void processEffect(ClipItem *item, QDomElement effect, int offset, QUndoCommand *effectCommand);
474     
475     /** @brief Get effect parameters ready for MLT*/
476     void adjustEffectParameters(EffectsParameterList &parameters, QDomNodeList params, const QString &prefix = QString());
477
478 private slots:
479     void slotRefreshGuides();
480     void slotEnableRefresh();
481     void slotCheckMouseScrolling();
482     void slotEditTimeLineGuide();
483     void slotDeleteTimeLineGuide();
484     void slotFetchNextThumbs();
485     void checkTrackSequence(int track);
486     void slotGoToMarker(QAction *action);
487     void slotResetMenuPosition();
488     void slotDoResetMenuPosition();
489     /** @brief Re-create the clip thumbnails.
490      *  @param id The clip's Id string.
491      *  @param resetThumbs Should we recreate the timeline thumbnails. */
492     void slotRefreshThumbs(const QString &id, bool resetThumbs);
493     /** @brief A Filter job producer results. */
494     void slotGotFilterJobResults(const QString &id, int startPos, int track, const QString &filter, stringMap filterParams);
495
496
497 signals:
498     void cursorMoved(int, int);
499     void zoomIn();
500     void zoomOut();
501     void mousePosition(int);
502     /** @brief A clip was selected in timeline, update the effect stack
503      *  @param clip The clip
504      *  @param raise If true, the effect stack widget will be raised (come to front). */
505     void clipItemSelected(ClipItem *clip, bool raise = true);
506     void transitionItemSelected(Transition*, int track = 0, QPoint p = QPoint(), bool update = false);
507     void activateDocumentMonitor();
508     void trackHeightChanged();
509     void tracksChanged();
510     void displayMessage(const QString &, MessageType);
511     void showClipFrame(DocClipBase *, QPoint, bool, const int);
512     void doTrackLock(int, bool);
513     void updateClipMarkers(DocClipBase *);
514     void updateTrackHeaders();
515     void playMonitor();
516     /** @brief Monitor document changes (for example the presence of audio data in timeline for export widget.*/
517     void documentModified();
518     void forceClipProcessing(const QString &);
519     void showTrackEffects(int, TrackInfo);
520     /** @brief Update the track effect button that shows if a track has effects or not.*/
521     void updateTrackEffectState(int);
522     /** @brief Cursor position changed, repaint ruler.*/
523     void updateRuler();
524 };
525
526 #endif
527