#define CUSTOMTRACKVIEW_H
#include <KPixmapCache>
+#include <KColorScheme>
#include <QGraphicsView>
#include <QGraphicsItemAnimation>
class AbstractGroupItem;
class Transition;
+
class CustomTrackView : public QGraphicsView
{
Q_OBJECT
* @param ix The track index */
void slotAddTrackEffect(const QDomElement effect, int ix);
+ /** @brief Update the list of snap points (sticky timeline hotspots).
+ * @param selected The currently selected clip if any
+ * @param offsetList The list of points that should also snap (for example when movin a clip, start and end points should snap
+ * @param skipSelectedItems if true, the selected item start and end points will not be added to snap list */
+ void updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList = QList <GenTime> (), bool skipSelectedItems = false);
+
protected:
virtual void drawBackground(QPainter * painter, const QRectF & rect);
//virtual void drawForeground ( QPainter * painter, const QRectF & rect );
QPoint m_clickEvent;
QList <CommentedTime> m_searchPoints;
QList <Guide *> m_guides;
- void updateSnapPoints(AbstractClipItem *selected, QList <GenTime> offsetList = QList <GenTime> (), bool skipSelectedItems = false);
+
ClipItem *getClipItemAt(int pos, int track);
ClipItem *getClipItemAt(GenTime pos, int track);
ClipItem *getClipItemAtEnd(GenTime pos, int track);
QMutex m_mutex;
QWaitCondition m_producerNotReady;
+ KStatefulBrush m_activeTrackBrush;
/** stores the state of the control modifier during mouse press.
* Will then be used to identify whether we resize a group or only one item of it. */
/** @brief Updates @param item's pan and zoom effect after resize or cut.
* @param item clip whose pan and zoom effect should be updated
- * @param cutPos (optional) if clip was cut, cut position relative to the original's clip position
- *
- */
+ * @param cutPos (optional) if clip was cut, cut position relative to the original's clip position */
void updatePanZoom(ClipItem *item, GenTime cutPos = GenTime());
+ /** @brief Update Tracknames to fit again after track was added/deleted.
+ * @param track Number of track which was added/deleted
+ * @param added true = track added, false = track deleted
+ *
+ * The default track name consists of type + number. If we add/delete a track the number has to be adjusted
+ * if the name is still the default one. */
+ void updateTrackNames(int track, bool added);
+
private slots:
void slotRefreshGuides();
void slotEnableRefresh();