#ifndef CUSTOMTRACKVIEW_H
#define CUSTOMTRACKVIEW_H
-#include <KPixmapCache>
+#include <kdeversion.h>
#include <KColorScheme>
#include <QGraphicsView>
class AbstractGroupItem;
class Transition;
-
class CustomTrackView : public QGraphicsView
{
Q_OBJECT
int selectedTrack() const;
QStringList selectedClips() const;
QList<ClipItem *> selectedClipItems() const;
+ /** @brief Checks wheter an item can be inserted (make sure it does not overlap another item) */
+ bool canBePastedTo(ItemInfo info, int type) const;
/** @brief Selects a clip.
* @param add Whether to select or deselect
void clearSelection();
void editItemDuration();
void buildGuidesMenu(QMenu *goMenu) const;
- KPixmapCache* m_pixmapCache;
/** update the timeline objects when palette changes */
void updatePalette();
/** @brief Returns true if a track has audio data on it.
* @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);
- /** @brief Save a snapshot image of current timeline view */
- void saveTimelinePreview(const QString path);
protected:
virtual void drawBackground(QPainter * painter, const QRectF & rect);
virtual Qt::DropActions supportedDropActions() const;
private:
+ int m_ct;
int m_tracksHeight;
int m_projectDuration;
int m_cursorPos;
int getPreviousVideoTrack(int track);
void updatePositionEffects(ClipItem * item, ItemInfo info, bool standalone = true);
bool insertDropClips(const QMimeData *data, const QPoint pos);
- bool canBePastedTo(ItemInfo info, int type) const;
bool canBePastedTo(QList <ItemInfo> infoList, int type) const;
bool canBePasted(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
bool canBeMoved(QList<AbstractClipItem *> items, GenTime offset, int trackOffset) const;
/** @brief Gets the effect parameters that will be passed to Mlt. */
EffectsParameterList getEffectArgs(const QDomElement effect);
- /** @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 */
- 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