diff options
Diffstat (limited to 'basicsuite/shared/engine.h')
-rw-r--r-- | basicsuite/shared/engine.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/basicsuite/shared/engine.h b/basicsuite/shared/engine.h index 43713c8..1c637a7 100644 --- a/basicsuite/shared/engine.h +++ b/basicsuite/shared/engine.h @@ -2,7 +2,7 @@ ** ** Copyright (C) 2014 Digia Plc ** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com +** For any questions to Digia, please use contact form at http://www.qt.io ** ** This file is part of Qt Enterprise Embedded. ** @@ -12,7 +12,7 @@ ** a written agreement between you and Digia. ** ** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com +** contact form at http://www.qt.io ** ****************************************************************************/ #ifndef ENGINE_H @@ -23,11 +23,6 @@ #include <QString> #include <QUrl> -class QQmlEngine; -class QQuickItem; -class FpsCounter; -class QQuickWindow; - /*! A simplified version of the one used by b2qt-launcher */ @@ -42,11 +37,15 @@ public: Q_INVOKABLE int smallFontSize() const { return qMax<int>(m_dpcm * 0.4, 10); } Q_INVOKABLE int fontSize() const { return qMax<int>(m_dpcm * 0.6, 14); } Q_INVOKABLE int titleFontSize() const { return qMax<int>(m_dpcm * 0.9, 20); } - Q_INVOKABLE int centimeter() const { return m_dpcm; } + Q_INVOKABLE int centimeter(int val = 1) const { return (m_dpcm * val); } + Q_INVOKABLE int mm(int val) const { return (int)(m_dpcm * val * 0.1); } + Q_INVOKABLE int screenWidth() const { return m_screenWidth; } + Q_INVOKABLE int screenHeight() const { return m_screenHeight; } private: QSize m_screenSize; qreal m_dpcm; + int m_screenWidth, m_screenHeight; }; #endif // ENGINE_H |