18#ifndef QMLAPPLICATION_H
19#define QMLAPPLICATION_H
31class QmlApplication :
public QObject
34 Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality CONSTANT);
35 Q_PROPERTY(QPoint mousePos READ mousePos);
36 Q_PROPERTY(QColor toolTipBaseColor READ toolTipBaseColor NOTIFY paletteChanged)
37 Q_PROPERTY(QColor toolTipTextColor READ toolTipTextColor NOTIFY paletteChanged)
38 Q_PROPERTY(QString OS READ OS CONSTANT)
39 Q_PROPERTY(QRect mainWinRect READ mainWinRect);
40 Q_PROPERTY(
bool hasFiltersOnClipboard READ hasFiltersOnClipboard NOTIFY filtersCopied)
41 Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio CONSTANT)
42 Q_PROPERTY(
int maxTextureSize READ maxTextureSize CONSTANT)
43 Q_PROPERTY(QStringList wipes READ wipes CONSTANT)
46 static QmlApplication &singleton();
47 static Qt::WindowModality dialogModality();
48 static QPoint mousePos();
49 static QColor toolTipBaseColor();
50 static QColor toolTipTextColor();
52 static QRect mainWinRect();
53 static bool hasFiltersOnClipboard();
54 Q_INVOKABLE
static void copyAllFilters();
55 Q_INVOKABLE
static void copyEnabledFilters();
56 Q_INVOKABLE
static void copyCurrentFilter();
57 Q_INVOKABLE
static QString clockFromFrames(
int frames);
58 Q_INVOKABLE
static QString timeFromFrames(
int frames);
59 Q_INVOKABLE
static int audioChannels();
60 Q_INVOKABLE
static QString getNextProjectFile(
const QString &filename);
61 Q_INVOKABLE
static bool isProjectFolder();
62 static qreal devicePixelRatio();
63 Q_INVOKABLE
void showStatusMessage(
const QString &message,
int timeoutSeconds = 15);
64 static int maxTextureSize();
65 Q_INVOKABLE
static bool confirmOutputFilter();
66 static QDir dataDir();
67 Q_INVOKABLE
static QColor contrastingColor(QString color);
68 static QStringList wipes();
69 Q_INVOKABLE
static bool addWipe(
const QString &filePath);
70 Q_INVOKABLE
static bool intersects(
const QRectF &a,
const QRectF &b);
73 void paletteChanged();
75 void filtersPasted(Mlt::Producer *);
78 explicit QmlApplication();
79 QmlApplication(QmlApplication
const &);
80 void operator=(QmlApplication
const &);