18 #ifndef PLAYLISTDOCK_H
19 #define PLAYLISTDOCK_H
21 #include <QDockWidget>
22 #include <QUndoCommand>
24 #include "models/playlistmodel.h"
30 class QAbstractItemView;
31 class QItemSelectionModel;
33 class PlaylistIconView;
35 class PlaylistDock :
public QDockWidget
40 explicit PlaylistDock(QWidget *parent = 0);
42 PlaylistModel *model()
47 void replaceClipsWithHash(
const QString &hash, Mlt::Producer &producer);
50 void clipOpened(Mlt::Producer *producer,
bool play =
false);
51 void itemActivated(
int start);
52 void showStatusMessage(QString);
53 void addAllTimeline(Mlt::Playlist *,
bool skipProxy =
false);
54 void producerOpened();
55 void selectionChanged();
56 void enableUpdate(
bool);
59 void onOpenActionTriggered();
60 void onAppendCutActionTriggered();
61 void onProducerOpened();
64 void onProducerChanged(Mlt::Producer *producer);
65 void onProducerModified();
66 void onPlayerDragStarted();
67 void onPlaylistModified();
68 void onPlaylistCreated();
69 void onPlaylistLoaded();
70 void onPlaylistCleared();
74 void viewCustomContextMenuRequested(
const QPoint &pos);
75 void viewDoubleClicked(
const QModelIndex &index);
76 void onDropped(
const QMimeData *data,
int row);
77 void onMoveClip(
int from,
int to);
79 void onInTimerFired();
80 void onOutTimerFired();
83 void keyPressEvent(QKeyEvent *event);
84 void keyReleaseEvent(QKeyEvent *event);
88 void resetPlaylistIndex();
89 void emitDataChanged(
const QVector<int> &roles);
90 void setPlaylistIndex(Mlt::Producer *producer,
int row);
91 void updateViewMode();
92 void onAddFilesActionTriggered();
93 void onUpdateThumbnailsActionTriggered();
94 void onAddToTimelineActionTriggered();
95 void onAddToSlideshowActionTriggered();
96 void onSetFileDateActionTriggered();
97 void onRemoveAllActionTriggered();
98 void onGotoActionTriggered();
99 void onCopyActionTriggered();
100 void onSelectAllActionTriggered();
101 void onInsertCutActionTriggered();
102 void onUpdateActionTriggered();
103 void onRemoveActionTriggered();
104 void incrementIndex();
105 void decrementIndex();
106 void setIndex(
int row);
110 Ui::PlaylistDock *ui;
111 QAbstractItemView *m_view;
112 PlaylistIconView *m_iconsView;
113 PlaylistModel m_model;
114 QItemSelectionModel *m_selectionModel;
115 int m_defaultRowHeight;
116 QTimer m_inChangedTimer;
117 QTimer m_outChangedTimer;
119 bool m_blockResizeColumnsToContents;