• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
MarbleGlobal.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2009 Torsten Rahn <tackat@kde.org>
9 //
10 
11 #include "MarbleGlobal.h"
12 #include "MarbleGlobal_p.h"
13 
14 
15 namespace Marble
16 {
17 
18 MarbleGlobalPrivate::MarbleGlobalPrivate()
19  : m_profiles( MarbleGlobal::Default )
20 {
21 }
22 
23 MarbleGlobalPrivate::~MarbleGlobalPrivate()
24 {
25 }
26 
27 MarbleGlobal::MarbleGlobal()
28  : d ( new MarbleGlobalPrivate )
29 {
30 }
31 
32 MarbleGlobal::~MarbleGlobal()
33 {
34  delete d;
35 }
36 
37 MarbleGlobal * MarbleGlobal::getInstance()
38 {
39  static MarbleGlobal instance;
40  return &instance;
41 }
42 
43 MarbleLocale * MarbleGlobal::locale() const
44 {
45  return &d->m_locale;
46 }
47 
48 MarbleGlobal::Profiles MarbleGlobal::profiles() const {
49  return d->m_profiles;
50 }
51 
52 void MarbleGlobal::setProfiles( MarbleGlobal::Profiles profiles ) {
53  d->m_profiles = profiles;
54 }
55 
56 MarbleGlobal::Profiles MarbleGlobal::detectProfiles() {
57  MarbleGlobal::Profiles profile = MarbleGlobal::Default;
58  // Checking Qt for maemo flags to find out if we are on a small screen device.
59 #ifdef Q_WS_HILDON // flag for Qt 4.5 (diablo and fremantle)
60  profile |= MarbleGlobal::SmallScreen;
61  profile |= MarbleGlobal::HighResolution;
62 #endif
63 #ifdef Q_WS_MAEMO_5
64  profile |= MarbleGlobal::SmallScreen;
65  profile |= MarbleGlobal::HighResolution;
66 #endif
67 #ifdef MEEGO_EDITION_HARMATTAN
68  profile |= MarbleGlobal::SmallScreen;
69  profile |= MarbleGlobal::HighResolution;
70 #endif
71 
72  return profile;
73 }
74 
75 }
Marble::MarbleGlobal::~MarbleGlobal
~MarbleGlobal()
Definition: MarbleGlobal.cpp:32
Marble::MarbleGlobal::setProfiles
void setProfiles(Profiles profiles)
Definition: MarbleGlobal.cpp:52
Marble::MarbleGlobal::HighResolution
Definition: MarbleGlobal.h:288
Marble::MarbleGlobal::detectProfiles
static Profiles detectProfiles()
Automatically detects the profile.
Definition: MarbleGlobal.cpp:56
Marble::MarbleGlobal::Default
Definition: MarbleGlobal.h:286
Marble::MarbleGlobalPrivate::MarbleGlobalPrivate
MarbleGlobalPrivate()
Definition: MarbleGlobal.cpp:18
Marble::MarbleGlobalPrivate::~MarbleGlobalPrivate
virtual ~MarbleGlobalPrivate()
Definition: MarbleGlobal.cpp:23
MarbleGlobal_p.h
Marble::MarbleGlobalPrivate::m_profiles
MarbleGlobal::Profiles m_profiles
Definition: MarbleGlobal_p.h:36
Marble::MarbleGlobal::locale
MarbleLocale * locale() const
Definition: MarbleGlobal.cpp:43
MarbleGlobal.h
Marble::MarbleGlobal::SmallScreen
Definition: MarbleGlobal.h:287
Marble::MarbleGlobal::getInstance
static MarbleGlobal * getInstance()
Definition: MarbleGlobal.cpp:37
Marble::MarbleLocale
A class that contains all localization stuff for Marble.
Definition: MarbleLocale.h:31
Marble::MarbleGlobal::profiles
Profiles profiles() const
Definition: MarbleGlobal.cpp:48
Marble::MarbleGlobalPrivate::m_locale
MarbleLocale m_locale
Definition: MarbleGlobal_p.h:34
Marble::MarbleGlobal
Definition: MarbleGlobal.h:277
Marble::MarbleGlobalPrivate
Definition: MarbleGlobal_p.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal