• Skip to content
  • Skip to link menu
KDE API Documentation - GCSingletonFontLoader.qml Source File (GCompris-qt)
  • KDE Home
  • Contact Us
 

GCompris-qt

  • src
  • core
GCSingletonFontLoader.qml
1 /* GCompris - GCSingletonFontLoader.qml
2  *
3  * Copyright (C) 2014 Johnny Jazeix <jazeix@gmail.com>
4  *
5  * Authors:
6  * Johnny Jazeix <jazeix@gmail.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, see <http://www.gnu.org/licenses/>.
20  */
21 import QtQuick 2.0
22 import GCompris 1.0
23 
24 //QTBUG-34418, singletons require explicit import to load qmldir file
25 //https://qt-project.org/wiki/QmlStyling#6b81104b320e452a59cc3bf6857115ab
26 import "."
27 
28 // FIXME: this triggers a doxygen error, why?
29 pragma Singleton
30 
39 QtObject {
40  property QtObject fontLoader: ApplicationSettings.isEmbeddedFont ? sourceLoader : nameLoader
41 
42  property QtObject fontSourceLoader: FontLoader {
43  id: sourceLoader
44  source: ApplicationSettings.isEmbeddedFont ? "resource/fonts/"+ApplicationSettings.font : ""
45  }
46 
47  property QtObject fontNameLoader: FontLoader {
48  id: nameLoader
49  name: ApplicationSettings.font
50  }
51 
52 }
ApplicationSettings::isEmbeddedFont
bool isEmbeddedFont
Whether currently active font is a shipped font (or a system font).
Definition: ApplicationSettings.h:112
QtQuick
GCompris
ApplicationSettings::font
QString font
Currently selected font.
Definition: ApplicationSettings.h:104
ApplicationSettings
Singleton that contains GCompris' persistent settings.
Definition: ApplicationSettings.h:63
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:47 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

GCompris-qt

Skip menu "GCompris-qt"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules

Class Picker

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