CuteLogger
Fast and simple logging solution for Qt based applications
playlistdock.h
1 /*
2  * Copyright (c) 2012-2019 Meltytech, LLC
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef PLAYLISTDOCK_H
19 #define PLAYLISTDOCK_H
20 
21 #include <QDockWidget>
22 #include <QUndoCommand>
23 #include "models/playlistmodel.h"
24 
25 namespace Ui {
26  class PlaylistDock;
27 }
28 
29 class QAbstractItemView;
30 
31 class PlaylistDock : public QDockWidget
32 {
33  Q_OBJECT
34 
35 public:
36  explicit PlaylistDock(QWidget *parent = 0);
37  ~PlaylistDock();
38  PlaylistModel* model() {
39  return &m_model;
40  }
41  int position();
42 
43 signals:
44  void clipOpened(Mlt::Producer* producer);
45  void itemActivated(int start);
46  void showStatusMessage(QString);
47  void addAllTimeline(Mlt::Playlist*);
48 
49 public slots:
50  void incrementIndex();
51  void decrementIndex();
52  void setIndex(int row);
53  void moveClipUp();
54  void moveClipDown();
55  void on_actionOpen_triggered();
56  void on_actionInsertCut_triggered();
57  void on_actionAppendCut_triggered();
58  void on_actionUpdate_triggered();
59  void on_removeButton_clicked();
60  void setUpdateButtonEnabled(bool modified);
61  void onProducerOpened();
62 
63 private slots:
64  void on_menuButton_clicked();
65 
66  void on_actionInsertBlank_triggered();
67 
68  void on_actionAppendBlank_triggered();
69 
70  void viewCustomContextMenuRequested(const QPoint &pos);
71 
72  void viewDoubleClicked(const QModelIndex &index);
73 
74  void on_actionGoto_triggered();
75 
76  void on_actionRemoveAll_triggered();
77 
78  void onPlaylistCreated();
79 
80  void onPlaylistLoaded();
81 
82  void onPlaylistCleared();
83 
84  void onPlaylistClosed();
85 
86  void onDropped(const QMimeData *data, int row);
87 
88  void onMoveClip(int from, int to);
89 
90  void onPlayerDragStarted();
91 
92  void on_addButton_clicked();
93 
94  void on_actionThumbnailsHidden_triggered(bool checked);
95 
96  void on_actionLeftAndRight_triggered(bool checked);
97 
98  void on_actionTopAndBottom_triggered(bool checked);
99 
100  void on_actionInOnlySmall_triggered(bool checked);
101 
102  void on_actionInOnlyLarge_triggered(bool checked);
103 
104  void on_actionAddToTimeline_triggered();
105 
106  void on_updateButton_clicked();
107 
108  void updateViewModeFromActions();
109 
110  void on_tilesButton_clicked();
111 
112  void on_iconsButton_clicked();
113 
114  void on_detailsButton_clicked();
115 
116  void onMovedToEnd();
117 
118 protected:
119  void keyPressEvent(QKeyEvent* event);
120  void keyReleaseEvent(QKeyEvent* event);
121 
122 private:
123  void setViewMode(PlaylistModel::ViewMode mode);
124 
125  Ui::PlaylistDock *ui;
126  QAbstractItemView *m_view;
127  QAbstractItemView *m_iconsView;
128  PlaylistModel m_model;
129  int m_defaultRowHeight;
130 };
131 
132 #endif // PLAYLISTDOCK_H
Definition: addencodepresetdialog.h:24