diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2016-08-19 17:45:33 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2016-08-30 09:33:16 +0000 |
commit | 2f6d87caf307fcad9fa9506eacd948a3fd6d9eb1 (patch) | |
tree | 0c31d2fd7f5c97e3f74b3eb01f27a09b99e8b4f2 /plugins | |
parent | ada06fff404f4aea8e830afe3250dd4b49dee1b3 (diff) |
Added an autodetection for showing the Instrument Cluster
Instead of changing the main file manually, the Main file is more smart
now and tries to detect whether showing the InstrumentCluster is possible.
Using am-config.yaml the Cluster can still be disabled if it's not
wanted, e.g. for development on the Desktop
Change-Id: If2ff186cf1317fc309050e1f4b3a479e25342249
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/screenManager/screenmanager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/screenManager/screenmanager.cpp b/plugins/screenManager/screenmanager.cpp index 42b04e3..72a6bba 100644 --- a/plugins/screenManager/screenmanager.cpp +++ b/plugins/screenManager/screenmanager.cpp @@ -41,6 +41,11 @@ ScreenManager::ScreenManager(QObject *parent) connect(qApp, &QGuiApplication::screenAdded, this, &ScreenManager::availableScreensChanged); } +int ScreenManager::screenCount() const +{ + return QGuiApplication::screens().count(); +} + void ScreenManager::setScreen(QWindow *window, int screen) { if (screen >= 0 && screen < QGuiApplication::screens().count()) { |