ScreenToolsController.cc 942 Bytes
Newer Older
1 2 3 4 5 6 7 8
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/
Don Gagne's avatar
Don Gagne committed
9 10 11


/// @file
12
/// @author Gus Grubba <mavlink@grubba.com>
Don Gagne's avatar
Don Gagne committed
13 14

#include "ScreenToolsController.h"
15
#include <QFontDatabase>
dogmaphobic's avatar
dogmaphobic committed
16
#include <QScreen>
17

18 19 20
#if defined(__ios__)
#include <sys/utsname.h>
#endif
Don Gagne's avatar
Don Gagne committed
21 22 23

ScreenToolsController::ScreenToolsController()
{
24

Don Gagne's avatar
Don Gagne committed
25
}
26 27

QString
28
ScreenToolsController::iOSDevice() const
29 30 31 32 33 34 35 36 37
{
#if defined(__ios__)
    struct utsname systemInfo;
    uname(&systemInfo);
    return QString(systemInfo.machine);
#else
    return QString();
#endif
}
38 39 40 41 42 43

QString
ScreenToolsController::fixedFontFamily() const
{
    return QFontDatabase::systemFont(QFontDatabase::FixedFont).family();
}