CuteLogger
Fast and simple logging solution for Qt based applications
qmlprofile.h
1 /*
2  * Copyright (c) 2014 Meltytech, LLC
3  * Author: Brian Matherly <pez4brian@yahoo.com>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef PROFILE_H
20 #define PROFILE_H
21 
22 #include <QObject>
23 
24 class QmlProfile : public QObject
25 {
26  Q_OBJECT
27  Q_PROPERTY(int width READ width CONSTANT)
28  Q_PROPERTY(int height READ height CONSTANT)
29  Q_PROPERTY(double aspectRatio READ aspectRatio CONSTANT)
30  Q_PROPERTY(double fps READ fps CONSTANT)
31 
32 public:
33  static QmlProfile& singleton();
34 
35  int width() const;
36  int height() const;
37  double aspectRatio() const;
38  double fps() const;
39 
40 private:
41  explicit QmlProfile();
42  QmlProfile(QmlProfile const&);
43  void operator=(QmlProfile const&);
44 };
45 
46 #endif // PROFILE_H