21 #include <QDockWidget>
22 #include <QUndoCommand>
24 #include <QFileSystemModel>
32 class QAbstractItemView;
33 class QItemSelectionModel;
35 class PlaylistIconView;
37 class FilesProxyModel;
38 class QSortFilterProxyModel;
40 class FilesDock :
public QDockWidget
45 explicit FilesDock(QWidget *parent = 0);
52 int getCacheMediaType(
const QString &key);
53 void setCacheMediaType(
const QString &key,
int mediaType);
56 void selectionChanged();
59 void onOpenActionTriggered();
60 void changeDirectory(
const QString &path,
bool resetLocations =
true);
61 void changeFilesDirectory(
const QModelIndex &index);
64 void viewCustomContextMenuRequested(
const QPoint &pos);
65 void onMediaTypeClicked();
66 void onOpenOtherAdd();
67 void onOpenOtherRemove();
69 void on_locationsCombo_activated(
int index);
71 void on_addLocationButton_clicked();
73 void on_removeLocationButton_clicked();
76 void keyPressEvent(QKeyEvent *event);
77 void keyReleaseEvent(QKeyEvent *event);
81 void emitDataChanged(
const QVector<int> &roles);
82 void updateViewMode();
83 void onUpdateThumbnailsActionTriggered();
84 void onSelectAllActionTriggered();
85 void incrementIndex(
int step);
86 void addOpenWithMenu(QMenu *menu);
87 QString firstSelectedFilePath();
88 QString firstSelectedMediaType();
89 void openClip(
const QString &filePath);
92 QAbstractItemView *m_view;
93 PlaylistIconView *m_iconsView;
94 std::unique_ptr<QFileSystemModel> m_dirsModel;
95 FilesModel *m_filesModel;
96 QItemSelectionModel *m_selectionModel;
98 FilesProxyModel *m_filesProxyModel;
99 QHash<QString, CacheItem> m_cache;