Marble

MarbleGlobal.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Torsten Rahn <tackat@kde.org>
4//
5
6#include "MarbleGlobal.h"
7#include "MarbleGlobal_p.h"
8
9namespace Marble
10{
11
12MarbleGlobalPrivate::MarbleGlobalPrivate()
13 : m_profiles(MarbleGlobal::Default)
14{
15#ifdef Q_OS_ANDROID
16 m_profiles |= MarbleGlobal::SmallScreen;
17 m_profiles |= MarbleGlobal::HighResolution;
18#endif
19}
20
21MarbleGlobalPrivate::~MarbleGlobalPrivate() = default;
22
23MarbleGlobal::MarbleGlobal()
24 : d(new MarbleGlobalPrivate)
25{
26}
27
28MarbleGlobal::~MarbleGlobal()
29{
30 delete d;
31}
32
33MarbleGlobal *MarbleGlobal::getInstance()
34{
35 static MarbleGlobal instance;
36 return &instance;
37}
38
39MarbleLocale *MarbleGlobal::locale() const
40{
41 return &d->m_locale;
42}
43
44MarbleGlobal::Profiles MarbleGlobal::profiles() const
45{
46 return d->m_profiles;
47}
48
49void MarbleGlobal::setProfiles(MarbleGlobal::Profiles profiles)
50{
51 d->m_profiles = profiles;
52}
53
54MarbleGlobal::Profiles MarbleGlobal::detectProfiles()
55{
56 return getInstance()->profiles();
57}
58
59}
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.