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