• Skip to content
  • Skip to link menu
KDE API Documentation - GCText Class Reference (GCompris-qt)
  • KDE Home
  • Contact Us
 

GCompris-qt

  • View on LXR
  • Comments
Properties | List of all members
GCText Class Reference
Core QML Components

Inherits QtQuick.Text, and Text.

Properties

bool fixFontSize
 
int fontSize
 
int hugeSize
 
int largeSize
 
int mediumSize
 
int regularSize
 
int smallSize
 
int tinySize
 

Detailed Description

A QML component unifying text presentation in GCompris.

GCText wraps QtQuick's Text to provide

(1) a uniform font-family,
(2) DPI based automatic font-scaling and
(3) application-wide manual font-sizing.

Activities should almost always use the fontSize property to define font sizes, it implements both (2) and (3). Do not set font.pointSize directly, or GCText's automatic scaling will be deactivated. If you really need to enforce a fixed font size (which might be the case for dialogs) use the fixFontSize property.

The xxxSize properties are meant to be enum-like values for often needed font sizes. (QtQuick does not support enum definitions on QML layer, cf. Qt issue #14861.)

See also
GCSingletonFontLoader

Definition at line 47 of file GCText.qml.

Property Documentation

bool GCText::fixFontSize

Whether to not apply ApplicationSettings.baseFontSize.

Set to true if you don't want to scale fonts. Used in some rare cases like for dialogs.

Definition at line 98 of file GCText.qml.

int GCText::fontSize

Font size wrapping font.pointSize and applying font-scaling.

Font-sizes are best specified using the fontSize property, which wraps font.pointSize to take the DPI of the display into account. If font.pointSize is used directly text might appear to small on some devices.

If you really need to specify font.pixelSize instead of pointSize, you need to clear font.pointSize explicitly with NaN:

font.pointSize: NaN

Default is 14.

Definition at line 117 of file GCText.qml.

int GCText::hugeSize

Huge font-size.

Value: 32

Remarks
This property is read-only

Definition at line 90 of file GCText.qml.

int GCText::largeSize

Large font-size.

Value: 24

Remarks
This property is read-only

Definition at line 83 of file GCText.qml.

int GCText::mediumSize

Medium font-size.

Value: 16

Remarks
This property is read-only

Definition at line 76 of file GCText.qml.

int GCText::regularSize

Regular font-size.

Value: 14

Remarks
This property is read-only

Definition at line 69 of file GCText.qml.

int GCText::smallSize

Small font-size.

Value: 12

Remarks
This property is read-only

Definition at line 62 of file GCText.qml.

int GCText::tinySize

Tiny font-size.

Value: 10

Remarks
This property is read-only

Definition at line 55 of file GCText.qml.


The documentation for this class was generated from the following file:
  • GCText.qml
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:48 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