CuteLogger
Fast and simple logging solution for Qt based applications
filtersdock.h
1 /*
2  * Copyright (c) 2013-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 FILTERSDOCK_H
19 #define FILTERSDOCK_H
20 
21 #include <QDockWidget>
22 #include <QObject>
23 #include <QQuickView>
24 #include <QQuickWidget>
25 
26 #include "sharedframe.h"
27 #include "qmltypes/qmlproducer.h"
28 
29 class QmlFilter;
30 class QmlMetadata;
31 class MetadataModel;
32 class AttachedFiltersModel;
33 
34 class FiltersDock : public QDockWidget
35 {
36  Q_OBJECT
37 
38 public:
39  explicit FiltersDock(MetadataModel* metadataModel, AttachedFiltersModel* attachedModel, QWidget *parent = 0);
40 
41  QmlProducer* qmlProducer() { return &m_producer; }
42 
43 signals:
44  void currentFilterRequested(int attachedIndex);
45  void changed();
46  void seeked(int);
47  void producerInChanged(int delta);
48  void producerOutChanged(int delta);
49 
50 public slots:
51  void setCurrentFilter(QmlFilter* filter, QmlMetadata* meta, int index);
52  void onSeeked(int position);
53  void onShowFrame(const SharedFrame& frame);
54  void openFilterMenu() const;
55 
56 protected:
57  bool event(QEvent *event);
58  void keyPressEvent(QKeyEvent* event);
59 
60 private slots:
61  void resetQview();
62 
63 private:
64  QQuickWidget m_qview;
65  QmlProducer m_producer;
66 };
67 
68 #endif // FILTERSDOCK_H
SharedFrame
The SharedFrame provides thread safe access to Mlt::Frame data.
Definition: sharedframe.h:49