Changeset View
Changeset View
Standalone View
Standalone View
examples/cpp/marble-game/GameMainWindow.cpp
1 | // | 1 | // | ||
---|---|---|---|---|---|
2 | // This file is part of the Marble Virtual Globe. | 2 | // This file is part of the Marble Virtual Globe. | ||
3 | // | 3 | // | ||
4 | // This program is free software licensed under the GNU LGPL. You can | 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 | 5 | // find a copy of this license in LICENSE.txt in the top directory of | ||
6 | // the source code. | 6 | // the source code. | ||
7 | // | 7 | // | ||
8 | // Copyright 2014 Dennis Nienhüser <nienhueser@kde.org> | 8 | // Copyright 2014 Dennis Nienhüser <nienhueser@kde.org> | ||
9 | // Copyright 2014 Abhinav Gangwar <abhgang@gmail.com> | 9 | // Copyright 2014 Abhinav Gangwar <abhgang@gmail.com> | ||
10 | // | 10 | // | ||
11 | 11 | | |||
12 | 12 | | |||
13 | // Self | 13 | // Self | ||
14 | #include "config-marble.h" | ||||
14 | #include "GameMainWindow.h" | 15 | #include "GameMainWindow.h" | ||
15 | #include "CountryByShape.h" | 16 | #include "CountryByShape.h" | ||
16 | #include "CountryByFlag.h" | 17 | #include "CountryByFlag.h" | ||
17 | #include "ClickOnThat.h" | 18 | #include "ClickOnThat.h" | ||
18 | 19 | | |||
19 | #include "ui_game.h" | 20 | #include "ui_game.h" | ||
20 | 21 | | |||
21 | // Qt | 22 | // Qt | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 73 | Private::Private(QWidget* parent) : | |||
77 | m_countryByFlag( new CountryByFlag(m_marbleWidget) ), | 78 | m_countryByFlag( new CountryByFlag(m_marbleWidget) ), | ||
78 | m_clickOnThat( new ClickOnThat(m_marbleWidget) ) | 79 | m_clickOnThat( new ClickOnThat(m_marbleWidget) ) | ||
79 | { | 80 | { | ||
80 | // nothing to do | 81 | // nothing to do | ||
81 | } | 82 | } | ||
82 | 83 | | |||
83 | QString Private::readMarbleDataPath() const | 84 | QString Private::readMarbleDataPath() const | ||
84 | { | 85 | { | ||
86 | #ifdef APPLE_STANDARD_UNIX_BUILD | ||||
87 | QSettings::setDefaultFormat(QSettings::IniFormat); | ||||
88 | #endif | ||||
85 | return QSettings().value(QStringLiteral("MarbleWidget/marbleDataPath"), QString()).toString(); | 89 | return QSettings().value(QStringLiteral("MarbleWidget/marbleDataPath"), QString()).toString(); | ||
86 | } | 90 | } | ||
87 | 91 | | |||
88 | void Private::setupMarbleWidget() | 92 | void Private::setupMarbleWidget() | ||
89 | { | 93 | { | ||
90 | m_marbleWidget->setMapThemeId(QStringLiteral( "earth/political/political.dgml")); | 94 | m_marbleWidget->setMapThemeId(QStringLiteral( "earth/political/political.dgml")); | ||
91 | 95 | | |||
92 | foreach ( RenderPlugin *renderPlugin, m_marbleWidget->renderPlugins() ) { | 96 | foreach ( RenderPlugin *renderPlugin, m_marbleWidget->renderPlugins() ) { | ||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |