Olive
sourcescommon.h
1 #ifndef SOURCESCOMMON_H
2 #define SOURCESCOMMON_H
3 
4 #include <QModelIndexList>
5 #include <QTimer>
6 #include <QVector>
7 
8 class Project;
9 class QMouseEvent;
10 class Media;
11 class QAbstractItemView;
12 class QDropEvent;
13 
14 struct Footage;
15 
16 class SourcesCommon : public QObject {
17  Q_OBJECT
18 public:
19  SourcesCommon(Project *parent);
20  QAbstractItemView* view;
21  void show_context_menu(QWidget* parent, const QModelIndexList &items);
22 
23  void mousePressEvent(QMouseEvent* e);
24  void mouseDoubleClickEvent(QMouseEvent* e, const QModelIndexList& selected_items);
25  void dropEvent(QWidget *parent, QDropEvent* e, const QModelIndex& drop_item, const QModelIndexList &items);
26 
27  void item_click(Media* m, const QModelIndex &index);
28 private slots:
29  void create_seq_from_selected();
30  void reveal_in_browser();
31  void rename_interval();
32  void item_renamed(Media *item);
33 
34  // proxy functions
35  void open_create_proxy_dialog();
36  void clear_proxies_from_selected();
37 private:
38  Media* editing_item;
39  QModelIndex editing_index;
40  QModelIndexList selected_items;
41  Project* project_parent;
42  void stop_rename_timer();
43  QTimer rename_timer;
44 
45  // we cache the selected footage items for open_create_proxy_dialog()
46  QVector<Footage*> cached_selected_footage;
47 };
48 
49 #endif // SOURCESCOMMON_H
Definition: media.h:20
Definition: project.h:40
Definition: sourcescommon.h:16
Definition: footage.h:46