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