CuteLogger
Fast and simple logging solution for Qt based applications
filtersdock.h
1/*
2 * Copyright (c) 2013-2026 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 "qmltypes/qmlproducer.h"
22#include "sharedframe.h"
23
24#include <QDockWidget>
25#include <QObject>
26#include <QPointer>
27#include <QQuickWidget>
28
29class QmlFilter;
30class QmlMetadata;
31class MetadataModel;
32class AttachedFiltersModel;
33class MotionTrackerModel;
34class SubtitlesModel;
35class AddOnMetadataHelpDialog;
36
37class FiltersDock : public QDockWidget
38{
39 Q_OBJECT
40
41public:
42 explicit FiltersDock(MetadataModel *metadataModel,
43 AttachedFiltersModel *attachedModel,
44 MotionTrackerModel *motionTrackerModel,
45 SubtitlesModel *subtitlesModel,
46 QWidget *parent = 0);
47
48 QmlProducer *qmlProducer() { return &m_producer; }
49
50signals:
51 void currentFilterRequested(int attachedIndex);
52 void changed();
53 void seeked(int);
54 void producerInChanged(int delta);
55 void producerOutChanged(int delta);
56
57public slots:
58 void setCurrentFilter(QmlFilter *filter, QmlMetadata *meta, int index);
59 void onSeeked(int position);
60 void onShowFrame(const SharedFrame &frame);
61 void openFilterMenu() const;
62 void showCopyFilterMenu();
63 void showAddOnMetadataHelp(const QString &serviceName);
64 void onServiceInChanged(int delta, Mlt::Service *service);
65 void load();
66
67protected:
68 bool event(QEvent *event);
69 void keyPressEvent(QKeyEvent *event);
70
71private:
72 void setupActions();
73 void closeAddOnMetadataHelp();
74 QQuickWidget m_qview;
75 QmlProducer m_producer;
76 QPointer<AddOnMetadataHelpDialog> m_addOnMetadataDialog;
77 unsigned loadTries{0};
78};
79
80#endif // FILTERSDOCK_H