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 toolTipBaseColor READ toolTipBaseColor NOTIFY paletteChanged)
39 Q_PROPERTY(QColor toolTipTextColor READ toolTipTextColor NOTIFY paletteChanged)
40 Q_PROPERTY(QString OS READ OS CONSTANT)
41 Q_PROPERTY(QRect mainWinRect READ mainWinRect);
42 Q_PROPERTY(
bool hasFiltersOnClipboard READ hasFiltersOnClipboard NOTIFY filtersCopied)
43 Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio CONSTANT)
44 Q_PROPERTY(
int maxTextureSize READ maxTextureSize CONSTANT)
45 Q_PROPERTY(QStringList wipes READ wipes CONSTANT)
48 static QmlApplication &singleton();
49 static Qt::WindowModality dialogModality();
50 static QPoint mousePos();
51 static QColor toolTipBaseColor();
52 static QColor toolTipTextColor();
54 static QRect mainWinRect();
55 static bool hasFiltersOnClipboard();
56 Q_INVOKABLE
static void copyAllFilters();
57 Q_INVOKABLE
static void copyEnabledFilters();
58 Q_INVOKABLE
static void copyCurrentFilter();
59 Q_INVOKABLE
static QString clockFromFrames(
int frames);
60 Q_INVOKABLE
static QString timeFromFrames(
int frames);
61 Q_INVOKABLE
static int audioChannels();
62 Q_INVOKABLE
static QString getNextProjectFile(
const QString &filename);
63 Q_INVOKABLE
static bool isProjectFolder();
64 static qreal devicePixelRatio();
65 Q_INVOKABLE
void showStatusMessage(
const QString &message,
int timeoutSeconds = 15);
66 Q_INVOKABLE
void showAddOnFiltersDialog();
67 static int maxTextureSize();
68 Q_INVOKABLE
static bool confirmOutputFilter();
69 static QDir dataDir();
70 Q_INVOKABLE
static QColor contrastingColor(QString color);
71 static QStringList wipes();
72 Q_INVOKABLE
static bool addWipe(
const QString &filePath);
73 Q_INVOKABLE
static bool intersects(
const QRectF &a,
const QRectF &b);
74 Q_INVOKABLE
static QString actionFirstShortcut(
const QString &actionName);
77 void paletteChanged();
79 void filtersPasted(Mlt::Producer *);
82 explicit QmlApplication();
83 QmlApplication(QmlApplication
const &);
84 void operator=(QmlApplication
const &);