QTextImageFormat Class
The QTextImageFormat class provides formatting information for images in a QTextDocument. More...
Header: | #include <QTextImageFormat> |
qmake: | QT += gui |
Inherits: | QTextCharFormat |
Note: All functions in this class are reentrant.
Public Functions
QTextImageFormat() | |
qreal | height() const |
bool | isValid() const |
QString | name() const |
int | quality() const |
void | setHeight(qreal height) |
void | setName(const QString &name) |
void | setQuality(int quality = 100) |
void | setWidth(qreal width) |
qreal | width() const |
- 60 public functions inherited from QTextCharFormat
- 51 public functions inherited from QTextFormat
Protected Functions
QTextImageFormat(const QTextFormat &format) |
Detailed Description
The QTextImageFormat class provides formatting information for images in a QTextDocument.
Inline images are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER) which has an associated QTextImageFormat. The image format specifies a name with setName() that is used to locate the image. The size of the rectangle that the image will occupy is specified in pixels using setWidth() and setHeight(). The desired image quality may be set with setQuality().
Images can be supplied in any format for which Qt has an image reader, so SVG drawings can be included alongside PNG, TIFF and other bitmap formats.
See also QImage and QImageReader.
Member Function Documentation
QTextImageFormat::QTextImageFormat()
Default constructs an instance of QTextImageFormat.
[protected]
QTextImageFormat::QTextImageFormat(const QTextFormat &format)
Default constructs an instance of QTextImageFormat.
qreal QTextImageFormat::height() const
See also setHeight().
bool QTextImageFormat::isValid() const
QString QTextImageFormat::name() const
See also setName().
int QTextImageFormat::quality() const
See also setQuality().
void QTextImageFormat::setHeight(qreal height)
See also height().
void QTextImageFormat::setName(const QString &name)
See also name().
void QTextImageFormat::setQuality(int quality = 100)
See also quality().
void QTextImageFormat::setWidth(qreal width)
See also width().
qreal QTextImageFormat::width() const
See also setWidth().