Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

PhoneLauncherView Class Reference
[QtBaseModule]

The PhoneLauncherView class is a view onto a scene, which is a grid of objects. More...

    #include <PhoneLauncherView>

Inherits QGraphicsView.

Public Functions

Public Slots

Signals

Additional Inherited Members


Detailed Description

The PhoneLauncherView class is a view onto a scene, which is a grid of objects.

PhoneLauncherView creates and maintains the scene itself; it is capable of creating and adding the grid objects which will populate the scene's grid. Each grid object represents a folder or application, i.e. something that can be 'opened'.

In addition to the grid objects, a 'selected' item is positioned over the 'current' grid object. The selected item has a different appearance to its current grid object, and is also able to animate.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.

See also GridBrowserScreen.


Member Function Documentation

PhoneLauncherView::PhoneLauncherView ( int rows, int cols, const QString & mapping, const QString & animator, const QString & animatorBackground, QWidget * parent = 0 )

rows: Number of rows that will be in the grid. cols: Number of columns that will be in the grid. mapping: A list of characters that map to grid objects according to their position. For example, the first character in mapping will refer to the grid object at row 0, column 0, the second character will refer to row 0, column 1 etc. The mapping is used by keyPressEvent(QKeyEvent *). animator: The name of an animation object, which generally comes from a configuration file. Note that this name must be known to AnimatorFactory, which is responsible for the creation of the animators. The string may be an empty string, in which case there will be no animation. Note, however, that if any movie files (.mng) are present for a QContent object, these will take precedence over any animator. animatorBackground: The name of an animation object (to be used for the background during animation), which generally comes from a configuration file. Note that this name must be known to AnimatorFactory, which is responsible for the creation of the animators. The string may be an empty string, in which case there will be no background animation. parent: Optional parent widget.

PhoneLauncherView::~PhoneLauncherView ()   [virtual]

void PhoneLauncherView::addItem ( QContent * content, int pos = -1 )

Creates a new GridItem object and adds it to the scene, or else updates the GridItem at the given position, if it already exists. When a new GridItem object is added, its position and size will be calculated and set in response to resizeevent(...). When an existing GridItem object is modified, its position and size do not change in response to content -- position and size are determined by other factors, such as the size of the view and the current resolution.

content: Contains information to be used by the GridItem object, such as the Icon used to display it, the name of its underlying application, etc. pos: The index of the GridItem object, which will be converted into a row and a column position.

void PhoneLauncherView::clicked ( QContent content )   [signal]

Indicates that an item on the grid with the given content has been selected. Typically, this is handled by invoking that item's underlying application. content See description.

QContent * PhoneLauncherView::currentItem () const   [slot]

Returns the content information for the current GridItem object, or 0 if no item is current.

See also setCurrentItem().

void PhoneLauncherView::highlighted ( QContent content )   [signal]

Indicates that the item on the grid with the given content has become the new current item. content See description.

void PhoneLauncherView::pressed ( QContent content )   [signal]

Indicates that a key or mouse press has occurred which, when released, will result in the item on the grid with the given content to be selected. content See description.

void PhoneLauncherView::setBusy ( bool flag )

Currently does nothing. In the future, this function could allow PhoneLauncherView to change the appearance of the SelectedItem object to indicate that it is 'busy' (for example, starting an application). flag: Not currently used.

void PhoneLauncherView::setCurrentItem ( int idx )

Causes the item positioned at the given index to become the current item. If idx is invalid, no change will occur. idx: The index of a GridItem object.

See also currentItem().

void PhoneLauncherView::updateImages ()

Causes all GridItem objects to query their QContent counterparts to refresh their image information. This function should be called when image data has/may have changed.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le blog Digia au hasard

Logo

Créer des applications avec un style Metro avec Qt, exemples en QML et C++, un article de Digia Qt traduit par Thibaut Cuvelier

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web