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  · 

Q3TableSelection Class Reference
[Qt3Support module]

The Q3TableSelection class provides access to a selected area in a Q3Table. More...

 #include <Q3TableSelection>

This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.

Note to Qt Desktop Light Edition users: This class is only available in the Qt Desktop Edition.

Public Functions


Detailed Description

The Q3TableSelection class provides access to a selected area in a Q3Table.

The selection is a rectangular set of cells in a Q3Table. One of the rectangle's cells is called the anchor cell; this is the cell that was selected first. The init() function sets the anchor and the selection rectangle to exactly this cell; the expandTo() function expands the selection rectangle to include additional cells.

There are various access functions to find out about the area: anchorRow() and anchorCol() return the anchor's position; leftCol(), rightCol(), topRow() and bottomRow() return the rectangle's four edges. All four are part of the selection.

A newly created Q3TableSelection is inactive -- isActive() returns false. You must use init() and expandTo() to activate it.

Q3Table::selectCells() Q3Table::selectRow() Q3Table::selectColumn()

See also Q3Table, Q3Table::addSelection(), and Q3Table::selection().


Member Function Documentation

Q3TableSelection::Q3TableSelection ()

Creates an inactive selection. Use init() and expandTo() to activate it.

Q3TableSelection::Q3TableSelection ( int start_row, int start_col, int end_row, int end_col )

Creates an active selection, starting at start_row and start_col, ending at end_row and end_col.

int Q3TableSelection::anchorCol () const

Returns the anchor column of the selection.

See also anchorRow() and expandTo().

int Q3TableSelection::anchorRow () const

Returns the anchor row of the selection.

See also anchorCol() and expandTo().

int Q3TableSelection::bottomRow () const

Returns the bottom row of the selection.

See also topRow(), leftCol(), and rightCol().

void Q3TableSelection::expandTo ( int row, int col )

Expands the selection to include cell row, col. The new selection rectangle is the bounding rectangle of row, col and the previous selection rectangle. After calling this function the selection is active.

If you haven't called init(), this function does nothing.

See also init() and isActive().

void Q3TableSelection::init ( int row, int col )

Sets the selection anchor to cell row, col and the selection to only contain this cell. The selection is not active until expandTo() is called.

To extend the selection to include additional cells, call expandTo().

See also isActive().

bool Q3TableSelection::isActive () const

Returns whether the selection is active or not. A selection is active after init() and expandTo() have been called.

bool Q3TableSelection::isEmpty () const

Returns whether the selection is empty or not.

See also numRows() and numCols().

int Q3TableSelection::leftCol () const

Returns the left column of the selection.

See also topRow(), bottomRow(), and rightCol().

int Q3TableSelection::numCols () const

Returns the number of columns in the selection.

See also numRows().

int Q3TableSelection::numRows () const

Returns the number of rows in the selection.

See also numCols().

int Q3TableSelection::rightCol () const

Returns the right column of the selection.

See also topRow(), bottomRow(), and leftCol().

int Q3TableSelection::topRow () const

Returns the top row of the selection.

See also bottomRow(), leftCol(), and rightCol().

bool Q3TableSelection::operator!= ( const Q3TableSelection & s ) const

Returns true if s does not include the same cells as the selection; otherwise returns false.

bool Q3TableSelection::operator== ( const Q3TableSelection & s ) const

Returns true if s includes the same cells as the selection; otherwise returns false.

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 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  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 Qt Quarterly au hasard

Logo

Implémenter un mutex en lecture et en écriture

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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 4.2
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