iterator Class Reference(QTextBlock::iterator)The QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock. More... #include <QTextBlock> Public Functions
Detailed DescriptionThe QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock. A block consists of a sequence of text fragments. This class provides a way to iterate over these, and read their contents. It does not provide a way to modify the internal structure or contents of the block. An iterator can be constructed and used to access the fragments within a text block in the following way: QTextBlock::iterator it; for (it = currentBlock.begin(); !(it.atEnd()); ++it) { QTextFragment currentFragment = it.fragment(); if (currentFragment.isValid()) processFragment(currentFragment); } See also QTextFragment. Member Function Documentationiterator::iterator ()Constructs an iterator for this text block. iterator::iterator ( const iterator & other )Copy constructor. Constructs a copy of the other iterator. bool iterator::atEnd () constReturns true if the current item is the last item in the text block. QTextFragment iterator::fragment () constReturns the text fragment the iterator currently points to. bool iterator::operator!= ( const iterator & other ) constRetuns true if this iterator is different from the other iterator; otherwise returns false. iterator & iterator::operator++ ()The prefix ++ operator (++i) advances the iterator to the next item in the hash and returns an iterator to the new current item. iterator iterator::operator++ ( int )The postfix ++ operator (i++) advances the iterator to the next item in the text block and returns an iterator to the old current item. iterator & iterator::operator-- ()The prefix -- operator (--i) makes the preceding item current and returns an iterator pointing to the new current item. iterator iterator::operator-- ( int )The postfix -- operator (i--) makes the preceding item current and returns an iterator to the old current item. bool iterator::operator== ( const iterator & other ) constRetuns true if this iterator is the same as the other iterator; otherwise returns false. X
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |