VideoPlayerTextObject Class Reference

QTextObjectInterface implementation for video text objects. More...

#include <VideoPlayerTextObject.h>

List of all members.

Public Member Functions

QSizeF intrinsicSize (QTextDocument *doc, int posInDocument, const QTextFormat &format)
 Called when size of visible videoplayer object in the document needs to be calculated.
void drawObject (QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format)
 Called when visible videoplayer object in the document needs to be redrawn.


Detailed Description

QTextObjectInterface implementation for video text objects.

Used for keeping the videoplayer objects in correct places within the text editor.


Member Function Documentation

void VideoPlayerTextObject::drawObject ( QPainter *  painter,
const QRectF &  rect,
QTextDocument *  doc,
int  posInDocument,
const QTextFormat &  format 
)

Called when visible videoplayer object in the document needs to be redrawn.

Parameters:
painter QPainter used for drawing. Not used in this implementation
rect Area within the text document where the object needs to be drawn. Used when calculating the location of Video embedded in the text.
doc Pointer to document. Not used in this implementation.
posInDocument Position of the object in the document. Not used in this implementation.
format Format of the object. Stores pointer to struct VideoTextobjectListEntry as MyQTextBrowser::VideoPlayer property. This pointer can be used for accessing the related video player widget.
This function will update the geometry of the videoplayer object according to the rect parameter and position of the sliders of the text editor. The sliderpositions of the text editor are accessed by using pointer to struct VideoTextobjectListEntry type of object stored in format parameter and calling ((QTextEdit*)videoObjectPtr->WidgetPtr->parent())->verticalScrollBar()->sliderPosition()) where videoObjectPtr is pointer to struct VideoTextobjectListEntry.

QSizeF VideoPlayerTextObject::intrinsicSize ( QTextDocument *  doc,
int  posInDocument,
const QTextFormat &  format 
)

Called when size of visible videoplayer object in the document needs to be calculated.

Parameters:
doc Pointer to document. Not used in this implementation.
posInDocument Position of embedded video in document counted as characters/textobjects from the beginning. Not used in this implementation.
format Format of the object. Stores pointer to struct VideoTextobjectListEntry as MyQTextBrowser::VideoPlayer property. This pointer can be used for accessing the related video player widget.
Returns:
Size of the video player widget embedded in the text document.


The documentation for this class was generated from the following files:

Generated on Thu Mar 3 17:42:04 2011 for Xiaoning's Diary by  doxygen 1.5.9