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

GCompris-qt

  • View on LXR
  • Comments
Signals | Properties | List of all members
ActivityBase Class Reference
Core QML Components
Inheritance diagram for ActivityBase:
Inheritance graph
[legend]

Signals

void displayDialog (Item dialog)
 
void home ()
 
void start ()
 
void stop ()
 

Properties

QtObject activityInfo
 
GCAudio audioEffects
 
GCAudio audioVoices
 
Item main
 
QtObject menu
 
Component pageComponent
 

Detailed Description

The base QML component for activities in GCompris.

Each activity should be derived from this component. It is responsible for

  • basic common key handling,
  • unified audio handling,
  • screen switching dynamics (from/to Menu/DialogHelp/etc.)

The following common keys are handled so far:

  • Ctrl+q: Exit the application.
  • Ctrl+b: Toggle the bar.
  • Ctrl+f: Toggle fullscreen.
  • Ctrl+m: Toggle audio effects.
  • Ctrl+w: Exit the current activity and return to the menu.
  • Ctrl+p: Make a screenshot.
  • Back: Return to the home screen (corresponds to the 'Back' button on Android).

Cf. Template.qml for a sample skeleton activity.

Cf. the wiki for further information about creating a new activity.

Definition at line 52 of file ActivityBase.qml.

Member Function Documentation

void ActivityBase::displayDialog ( Item  dialog)
signal

Emitted when dialog dialog should be shown.

Emit this signal when you want to show another dialog, e.g. on Bar.onHelpClicked

Parameters
dialogDialog to show.
void ActivityBase::home ( )
signal

Emitted when the user wants to return to the Home/Menu screen.

void ActivityBase::start ( )
signal

Emitted every time the activity has been started.

Initialize your activity upon this signal.

void ActivityBase::stop ( )
signal

Emitted when the activity is about to stop.

Shutdown whatever you need to upon this signal.

Property Documentation

QtObject ActivityBase::activityInfo

Reference to the ActivityInfo object of the activity.

Populated automatically during activity-loading.

Definition at line 85 of file ActivityBase.qml.

GCAudio ActivityBase::audioEffects

The global audio item for audio effects.

Append to it to play your effects.

See also
GCAudio audioEffects

Definition at line 106 of file ActivityBase.qml.

GCAudio ActivityBase::audioVoices

The global audio item for voices.

Because of problems synchronizing multiple Audio objects between global/menu/main and individual activities, activities should refrain from implementing additional Audio elements.

Instead append to this global object to play your voices after the intro music.

See also
GCAudio audioEffects

Definition at line 98 of file ActivityBase.qml.

Item ActivityBase::main

Parent object.

Definition at line 58 of file ActivityBase.qml.

QtObject ActivityBase::menu

Reference to the menu activity.

Populated automatically during activity-loading.

Definition at line 78 of file ActivityBase.qml.

Component ActivityBase::pageComponent

The top-level component containing the visible viewport of an activity.

Put all you want to present the user into this container. Mostly implemented using a Rectangle or Image component, itself containing further graphical elements. You are pretty free of doing whatever you want inside this component.

Also common elements as Bar, Score, DialogHelp, etc. should be placed inside this element.

Definition at line 71 of file ActivityBase.qml.


The documentation for this class was generated from the following file:
  • ActivityBase.qml
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