summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-mobile/qmlmanager.cpp11
-rw-r--r--qt-mobile/qmlmanager.h5
2 files changed, 16 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 9d506859d..f0e6dcca4 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -954,3 +954,14 @@ void QMLManager::setAccessingCloud(bool status)
m_accessingCloud = status;
emit accessingCloudChanged();
}
+
+qreal QMLManager::lastDevicePixelRatio()
+{
+ return m_lastDevicePixelRatio;
+}
+
+void QMLManager::screenChanged(QScreen *screen)
+{
+ m_lastDevicePixelRatio = screen->devicePixelRatio();
+ emit sendScreenChanged(screen);
+}
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h
index ff3507991..04374bde6 100644
--- a/qt-mobile/qmlmanager.h
+++ b/qt-mobile/qmlmanager.h
@@ -4,6 +4,7 @@
#include <QObject>
#include <QString>
#include <QNetworkAccessManager>
+#include <QScreen>
#include "gpslocation.h"
@@ -115,6 +116,8 @@ public slots:
QString getVersion() const;
void deleteGpsFix(quint64 when);
void refreshDiveList();
+ void screenChanged(QScreen *screen);
+ qreal lastDevicePixelRatio();
private:
QString m_cloudUserName;
@@ -136,6 +139,7 @@ private:
struct dive_trip *deletedTrip;
bool m_accessingCloud;
credentialStatus_t m_credentialStatus;
+ qreal m_lastDevicePixelRatio;
signals:
void cloudUserNameChanged();
@@ -150,6 +154,7 @@ signals:
void startPageTextChanged();
void credentialStatusChanged();
void accessingCloudChanged();
+ void sendScreenChanged(QScreen *screen);
};
#endif