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  · 

QTextTableCell Class Reference
[QtGui module]

The QTextTableCell class represents the properties of a cell in a QTextTable. More...

 #include <QTextTableCell>

Public Functions


Detailed Description

The QTextTableCell class represents the properties of a cell in a QTextTable.

Table cells are pieces of document structure that belong to a table. The table orders cells into particular rows and columns; cells can also span multiple columns and rows.

Cells are usually created when a table is inserted into a document with QTextCursor::insertTable(), but they are also created and destroyed when a table is resized.

Cells contain information about their location in a table; you can obtain the row() and column() numbers of a cell, and its rowSpan() and columnSpan().

The format() of a cell describes the default character format of its contents. The firstCursorPosition() and lastCursorPosition() functions are used to obtain the extent of the cell in the document.

See also QTextTable and QTextTableFormat.


Member Function Documentation

QTextTableCell::QTextTableCell ()

Constructs an invalid table cell.

See also isValid().

QTextTableCell::QTextTableCell ( const QTextTableCell & other )

Copy constructor. Creates a new QTextTableCell object based on the other cell.

QTextTableCell::~QTextTableCell ()

Destroys the table cell.

QTextFrame::iterator QTextTableCell::begin () const

Returns a frame iterator pointing to the beginning of the table's cell.

See also end().

int QTextTableCell::column () const

Returns the number of the column in the table that contains this cell.

See also row().

int QTextTableCell::columnSpan () const

Returns the number of columns this cell spans. The default is 1.

See also rowSpan().

QTextFrame::iterator QTextTableCell::end () const

Returns a frame iterator pointing to the end of the table's cell.

See also begin().

QTextCursor QTextTableCell::firstCursorPosition () const

Returns the first valid cursor position in this cell.

See also lastCursorPosition().

QTextCharFormat QTextTableCell::format () const

Returns the cell's character format.

See also setFormat().

bool QTextTableCell::isValid () const

Returns true if this is a valid table cell; otherwise returns false.

QTextCursor QTextTableCell::lastCursorPosition () const

Returns the last valid cursor position in this cell.

See also firstCursorPosition().

int QTextTableCell::row () const

Returns the number of the row in the table that contains this cell.

See also column().

int QTextTableCell::rowSpan () const

Returns the number of rows this cell spans. The default is 1.

See also columnSpan().

void QTextTableCell::setFormat ( const QTextCharFormat & format )

Sets the cell's character format to format. This can for example be used to change the background color of the entire cell:

QTextTableCell cell = table->cellAt(2, 3); QTextCharFormat format = cell.format(); format.setBackground(Qt::blue); cell.setFormat(format);

This function was introduced in Qt 4.2.

See also format().

bool QTextTableCell::operator!= ( const QTextTableCell & other ) const

Returns true if this cell object and the other cell object describe different cells; otherwise returns false.

QTextTableCell & QTextTableCell::operator= ( const QTextTableCell & other )

Assigns the other table cell to this table cell.

bool QTextTableCell::operator== ( const QTextTableCell & other ) const

Returns true if this cell object and the other cell object describe the same cell; 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 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 Qt Developer Network au hasard

Logo

Comment fermer une application

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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