summaryrefslogtreecommitdiffstats
path: root/basicsuite/shared/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/shared/engine.h')
-rw-r--r--basicsuite/shared/engine.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/basicsuite/shared/engine.h b/basicsuite/shared/engine.h
index 43713c8..8d083ef 100644
--- a/basicsuite/shared/engine.h
+++ b/basicsuite/shared/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