18#ifndef QMLAPPLICATION_H
19#define QMLAPPLICATION_H
23#include <QKeySequence>
33class QmlApplication :
public QObject
36 Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality CONSTANT);
37 Q_PROPERTY(QPoint mousePos READ mousePos);
38 Q_PROPERTY(QColor playheadColor READ playheadColor CONSTANT)
39 Q_PROPERTY(QColor toolTipBaseColor READ toolTipBaseColor NOTIFY paletteChanged)
40 Q_PROPERTY(QColor toolTipTextColor READ toolTipTextColor NOTIFY paletteChanged)
41 Q_PROPERTY(QString OS READ OS CONSTANT)
42 Q_PROPERTY(QRect mainWinRect READ mainWinRect);
43 Q_PROPERTY(
bool hasFiltersOnClipboard READ hasFiltersOnClipboard NOTIFY filtersCopied)
44 Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio CONSTANT)
45 Q_PROPERTY(
int maxTextureSize READ maxTextureSize CONSTANT)
46 Q_PROPERTY(QStringList wipes READ wipes CONSTANT)
49 static QmlApplication &singleton();
50 static Qt::WindowModality dialogModality();
51 static QPoint mousePos();
52 static QColor playheadColor() {
return QColor(0xe0, 0x46, 0x4e); }
53 static QColor toolTipBaseColor();
54 static QColor toolTipTextColor();
56 static QRect mainWinRect();
57 static bool hasFiltersOnClipboard();
58 Q_INVOKABLE
static void copyAllFilters();
59 Q_INVOKABLE
static void copyEnabledFilters();
60 Q_INVOKABLE
static void copyCurrentFilter();
61 Q_INVOKABLE
static QString clockFromFrames(
int frames);
62 Q_INVOKABLE
static QString timeFromFrames(
int frames);
63 Q_INVOKABLE
static int audioChannels();
64 Q_INVOKABLE
static QString getNextProjectFile(
const QString &filename);
65 Q_INVOKABLE
static bool isProjectFolder();
66 static qreal devicePixelRatio();
67 Q_INVOKABLE
void showStatusMessage(
const QString &message,
int timeoutSeconds = 15);
68 Q_INVOKABLE
void showAddOnFiltersDialog();
69 static int maxTextureSize();
70 Q_INVOKABLE
static bool confirmOutputFilter();
71 static QDir dataDir();
72 Q_INVOKABLE
static QColor contrastingColor(QString color);
73 static QStringList wipes();
74 Q_INVOKABLE
static bool addWipe(
const QString &filePath);
75 Q_INVOKABLE
static bool intersects(
const QRectF &a,
const QRectF &b);
76 Q_INVOKABLE
static QString actionFirstShortcut(
const QString &actionName);
77 Q_INVOKABLE
static void triggerAction(
const QString &actionName);
80 void paletteChanged();
82 void filtersPasted(Mlt::Producer *);
85 explicit QmlApplication();
86 QmlApplication(QmlApplication
const &);
87 void operator=(QmlApplication
const &);