CuteLogger
Fast and simple logging solution for Qt based applications
qmlapplication.h
1 /*
2  * Copyright (c) 2014-2017 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(QString numericLocale READ numericLocale CONSTANT)
42  Q_PROPERTY(QRect mainWinRect READ mainWinRect);
43  Q_PROPERTY(bool hasFiltersOnClipboard READ hasFiltersOnClipboard NOTIFY filtersCopied)
44 
45 
46 public:
47  static QmlApplication& singleton();
48  static Qt::WindowModality dialogModality();
49  static QPoint mousePos();
50  static QColor toolTipBaseColor();
51  static QColor toolTipTextColor();
52  static QString OS();
53  static QString numericLocale();
54  static QRect mainWinRect();
55  static bool hasFiltersOnClipboard();
56  Q_INVOKABLE static void copyFilters();
57  Q_INVOKABLE static void pasteFilters();
58 
59 signals:
60  void paletteChanged();
61  void filtersCopied();
62  void filtersPasted(Mlt::Producer*);
63 
64 private:
65  explicit QmlApplication();
66  QmlApplication(QmlApplication const&);
67  void operator=(QmlApplication const&);
68 };
69 
70 #endif // QMLAPPLICATION_H
Definition: encodedock.h:35