CuteLogger
Fast and simple logging solution for Qt based applications
qmlapplication.h
1 /*
2  * Copyright (c) 2014-2018 Meltytech, LLC
3  * Author: Dan Dennedy <dan@dennedy.org>
4  * Author: Brian Matherly <pez4brian@yahoo.com>
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef QMLAPPLICATION_H
21 #define QMLAPPLICATION_H
22 
23 #include <QObject>
24 #include <QDir>
25 #include <QPoint>
26 #include <QColor>
27 #include <QRect>
28 
29 namespace Mlt {
30  class Producer;
31 }
32 
33 class QmlApplication : public QObject
34 {
35  Q_OBJECT
36  Q_PROPERTY(Qt::WindowModality dialogModality READ dialogModality);
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 
44 
45 public:
46  static QmlApplication& singleton();
47  static Qt::WindowModality dialogModality();
48  static QPoint mousePos();
49  static QColor toolTipBaseColor();
50  static QColor toolTipTextColor();
51  static QString OS();
52  static QRect mainWinRect();
53  static bool hasFiltersOnClipboard();
54  Q_INVOKABLE static void copyFilters();
55  Q_INVOKABLE static void pasteFilters();
56 
57 signals:
58  void paletteChanged();
59  void filtersCopied();
60  void filtersPasted(Mlt::Producer*);
61 
62 private:
63  explicit QmlApplication();
64  QmlApplication(QmlApplication const&);
65  void operator=(QmlApplication const&);
66 };
67 
68 #endif // QMLAPPLICATION_H
Definition: encodedock.h:35