7#include <QtGui/QCursor>
8#include <QtGui/QFontDatabase>
9#include <QtGui/QFontMetrics>
10#include <QtGui/QInputDevice>
13#include <sys/utsname.h>
24ScreenToolsController::~ScreenToolsController()
29int ScreenToolsController::mouseX()
31 return QCursor::pos().x();
34int ScreenToolsController::mouseY()
36 return QCursor::pos().y();
39bool ScreenToolsController::hasTouch()
41 for (
const auto &inputDevice: QInputDevice::devices()) {
42 if (inputDevice->type() == QInputDevice::DeviceType::TouchScreen) {
49QString ScreenToolsController::iOSDevice()
52 struct utsname systemInfo;
54 return QString(systemInfo.machine);
60QString ScreenToolsController::fixedFontFamily()
62 return QFontDatabase::systemFont(QFontDatabase::FixedFont).family();
65QString ScreenToolsController::normalFontFamily()
68 const int langID = SettingsManager::instance()->appSettings()->
qLocaleLanguage()->rawValue().toInt();
69 if (langID == QLocale::Korean) {
70 return QStringLiteral(
"NanumGothic");
73 return QStringLiteral(
"Open Sans");
76double ScreenToolsController::defaultFontDescent(
int pointSize)
78 return QFontMetrics(QFont(normalFontFamily(), pointSize)).descent();
81#if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS)
82bool ScreenToolsController::fakeMobile()
84 return qgcApp()->fakeMobile();
#define QGC_LOGGING_CATEGORY(name, categoryStr)
Fact *qLocaleLanguage READ qLocaleLanguage CONSTANT Fact * qLocaleLanguage()