Qt 4.8
Classes | Functions
qtextformat.h File Reference
#include <QtGui/qcolor.h>
#include <QtGui/qfont.h>
#include <QtCore/qshareddata.h>
#include <QtCore/qvector.h>
#include <QtCore/qvariant.h>
#include <QtGui/qpen.h>
#include <QtGui/qbrush.h>
#include <QtGui/qtextoption.h>

Go to the source code of this file.

Classes

class  QTextBlockFormat
 The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument. More...
 
class  QTextCharFormat
 The QTextCharFormat class provides formatting information for characters in a QTextDocument. More...
 
class  QTextFormat
 The QTextFormat class provides formatting information for a QTextDocument. More...
 
class  QTextFrameFormat
 The QTextFrameFormat class provides formatting information for frames in a QTextDocument. More...
 
class  QTextImageFormat
 The QTextImageFormat class provides formatting information for images in a QTextDocument. More...
 
class  QTextLength
 The QTextLength class encapsulates the different types of length used in a QTextDocument. More...
 
class  QTextListFormat
 The QTextListFormat class provides formatting information for lists in a QTextDocument. More...
 
class  QTextTableCellFormat
 The QTextTableCellFormat class provides formatting information for table cells in a QTextDocument. More...
 
class  QTextTableFormat
 The QTextTableFormat class provides formatting information for tables in a QTextDocument. More...
 

Functions

Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &, const QTextLength &)
 
Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &, const QTextFormat &)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &, QTextLength &)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &, QTextFormat &)
 

Function Documentation

◆ operator<<() [1/2]

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream ,
const QTextLength  
)

Definition at line 179 of file qtextformat.cpp.

180 {
181  return stream << qint32(length.lengthType) << double(length.fixedValueOrPercentage);
182 }
int qint32
Definition: qglobal.h:937
static FILE * stream

◆ operator<<() [2/2]

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream ,
const QTextFormat  
)

Definition at line 459 of file qtextformat.cpp.

460 {
461  stream << fmt.format_type << fmt.properties();
462  return stream;
463 }
static FILE * stream

◆ operator>>() [1/2]

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream ,
QTextLength  
)

Definition at line 184 of file qtextformat.cpp.

185 {
186  qint32 type;
187  double fixedValueOrPercentage;
188  stream >> type >> fixedValueOrPercentage;
189  length.fixedValueOrPercentage = fixedValueOrPercentage;
190  length.lengthType = QTextLength::Type(type);
191  return stream;
192 }
int type
Definition: qmetatype.cpp:239
int qint32
Definition: qglobal.h:937
Type
This enum describes the different types a length object can have.
Definition: qtextformat.h:87
static FILE * stream

◆ operator>>() [2/2]

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream ,
QTextFormat  
)

Definition at line 465 of file qtextformat.cpp.

466 {
468  stream >> fmt.format_type >> properties;
469 
470  // QTextFormat's default constructor doesn't allocate the private structure, so
471  // we have to do this, in case fmt is a default constructed value.
472  if(!fmt.d)
473  fmt.d = new QTextFormatPrivate();
474 
476  it != properties.constEnd(); ++it)
477  fmt.d->insertProperty(it.key(), it.value());
478 
479  return stream;
480 }
#define it(className, varName)
static FILE * stream
const_iterator constBegin() const
Returns a const STL-style iterator pointing to the first item in the map.
Definition: qmap.h:374
The QMap::const_iterator class provides an STL-style const iterator for QMap and QMultiMap.
Definition: qmap.h:301
const_iterator constEnd() const
Returns a const STL-style iterator pointing to the imaginary item after the last item in the map...
Definition: qmap.h:380
static const QCssKnownValue properties[NumProperties - 1]
Definition: qcssparser.cpp:67
The QMap class is a template class that provides a skip-list-based dictionary.
Definition: qdatastream.h:67