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