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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

VisualDataGroup

Encapsulates a filtered set of visual data items More...

Inherits QtObject

Properties

Signals

Methods

  • addGroups(int index, int count, stringlist groups)
  • create(jsdict data)
  • create(var index)
  • create(var index, jsdict data)
  • move(var from, var to, int count)
  • remove(int index, int count)
  • removeGroups(int index, int count, stringlist groups)
  • setGroups(int index, int count, stringlist groups)
  • var get(int index)

Detailed Description

Property Documentation

read-onlycount : int

This property holds the number of items in the group.


includeByDefault : bool

This property holds whether new items are assigned to this group by default.


name : string

This property holds the name of the group.

Each group in a model must have a unique name starting with a lower case letter.


Signal Documentation

VisualDataGroup::onChanged(array removed, array inserted)

This handler is called when items have been removed from or inserted into the group.

Each object in the removed and inserted arrays has two values; the index of the first item inserted or removed and a count of the number of consecutive items inserted or removed.

Each index is adjusted for previous changes with all removed items preceding any inserted items.


Method Documentation

VisualDataGroup::addGroups(int index, int count, stringlist groups)

Adds count items starting at index to groups.


VisualDataGroup::create(jsdict data)

Returns a reference to the instantiated item at index in the group.

All items returned by create are added to the persistedItems group. Items in this group remain instantiated when not referenced by any view.


VisualDataGroup::create(var index)

Returns a reference to the instantiated item at index in the group.

All items returned by create are added to the persistedItems group. Items in this group remain instantiated when not referenced by any view.


VisualDataGroup::create(var index, jsdict data)

Returns a reference to the instantiated item at index in the group.

All items returned by create are added to the persistedItems group. Items in this group remain instantiated when not referenced by any view.


VisualDataGroup::move(var from, var to, int count)

Moves count at from in a group to a new position.


VisualDataGroup::remove(int index, int count)

Removes count items starting at index from the group.


VisualDataGroup::removeGroups(int index, int count, stringlist groups)

Removes count items starting at index from groups.


VisualDataGroup::setGroups(int index, int count, stringlist groups)

Sets the groups count items starting at index belong to.


var VisualDataGroup::get(int index)

Returns a javascript object describing the item at index in the group.

The returned object contains the same information that is available to a delegate from the VisualDataModel attached as well as the model for that item. It has the properties:

  • model The model data of the item. This is the same as the model context property in a delegate
  • groups A list the of names of groups the item is a member of. This property can be written to change the item's membership.
  • inItems Whether the item belongs to the items group. Writing to this property will add or remove the item from the group.
  • itemsIndex The index of the item within the items group.
  • inGroupName Whether the item belongs to the dynamic group groupName. Writing to this property will add or remove the item from the group.
  • groupNameIndex The index of the item within the dynamic group groupName.

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 5.0-snapshot
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