summaryrefslogtreecommitdiffstats
path: root/src/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.h')
-rw-r--r--src/engine.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/engine.h b/src/engine.h
index a837879..a33c08a 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -77,7 +77,10 @@ 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; }
protected:
@@ -114,6 +117,7 @@ private:
QSize m_screenSize;
qreal m_dpcm;
+ int m_screenWidth, m_screenHeight;
FpsCounter *m_fpsCounter;
qreal m_fps;