khtml Library API Documentation

KHTMLView Class Reference

Renders and displays HTML in a QScrollView. More...

#include <khtmlview.h>

Inheritance diagram for KHTMLView:

QScrollView List of all members.

Public Methods

 KHTMLView (KHTMLPart *part, QWidget *parent, const char *name=0)
 Constructs a KHTMLView.

KHTMLPartpart () const
 Returns a pointer to the KHTMLPart that is rendering the page.

void setMarginWidth (int x)
 Sets a margin in x direction.

int marginWidth () const
 Returns the margin width.

int marginHeight ()
 Returns the margin height.

virtual void setVScrollBarMode (ScrollBarMode mode)
 Sets verticals scrollbar mode.

virtual void setHScrollBarMode (ScrollBarMode mode)
 Sets horizontal scrollbar mode.

void print ()
 Prints the HTML document.

void layout ()
 ensure the display is up to date


Protected Methods

virtual void drawContents (QPainter *p, int clipx, int clipy, int clipw, int cliph)
virtual void viewportResizeEvent (QResizeEvent *)
void contentsContextMenuEvent (QContextMenuEvent *_ce)

Detailed Description

Renders and displays HTML in a QScrollView.

Suitable for use as an application's main view.

Definition at line 71 of file khtmlview.h.


Constructor & Destructor Documentation

KHTMLView::KHTMLView KHTMLPart   part,
QWidget   parent,
const char *    name = 0
 

Constructs a KHTMLView.

Definition at line 258 of file khtmlview.cpp.

References QScrollView::contentsMoving(), QScrollView::enableClipper(), KImageIO::registerFormats(), QScrollView::setHScrollBarMode(), QScrollView::setResizePolicy(), QScrollView::setVScrollBarMode(), and QScrollView::viewport().


Member Function Documentation

KHTMLPart* KHTMLView::part   const [inline]
 

Returns a pointer to the KHTMLPart that is rendering the page.

Definition at line 103 of file khtmlview.h.

References part().

Referenced by khtml::CSSStyleSelector::CSSStyleSelector(), and part().

void KHTMLView::setMarginWidth int    x
 

Sets a margin in x direction.

Definition at line 420 of file khtmlview.cpp.

int KHTMLView::marginWidth   const [inline]
 

Returns the margin width.

A return value of -1 means the default value will be used.

Definition at line 117 of file khtmlview.h.

int KHTMLView::marginHeight   [inline]
 

Returns the margin height.

A return value of -1 means the default value will be used.

Definition at line 129 of file khtmlview.h.

void KHTMLView::setVScrollBarMode ScrollBarMode    mode [virtual]
 

Sets verticals scrollbar mode.

Reimplemented for internal reasons.

Reimplemented from QScrollView.

Definition at line 1353 of file khtmlview.cpp.

References QScrollView::setVScrollBarMode().

void KHTMLView::setHScrollBarMode ScrollBarMode    mode [virtual]
 

Sets horizontal scrollbar mode.

Reimplemented for internal reasons.

Reimplemented from QScrollView.

Definition at line 1363 of file khtmlview.cpp.

References QScrollView::setHScrollBarMode().

void KHTMLView::print  
 

Prints the HTML document.

Definition at line 1135 of file khtmlview.cpp.

References QString::arg(), QPainter::begin(), QPainter::boundingRect(), KStringHandler::csqueeze(), QDate::currentDate(), QPainter::drawText(), QPainter::end(), QPainter::fontMetrics(), KLocale::formatDate(), QPaintDeviceMetrics::height(), QString::isEmpty(), KGlobal::locale(), QPainter::resetXForm(), QPainter::scale(), QPainter::setClipRect(), QPainter::setFont(), khtml::RenderObject::setLayouted(), khtml::RenderObject::setMinMaxKnown(), QPainter::setPen(), QPainter::translate(), QScrollView::viewport(), QPaintDeviceMetrics::width(), KHTMLPart::xmlDocImpl(), and KHTMLPart::zoomFactor().

void KHTMLView::layout  
 

ensure the display is up to date

Definition at line 432 of file khtmlview.cpp.

References QScrollView::setHScrollBarMode(), khtml::RenderObject::setLayouted(), khtml::RenderObject::setMinMaxKnown(), QScrollView::setVScrollBarMode(), QScrollView::visibleHeight(), QScrollView::visibleWidth(), and KHTMLPart::xmlDocImpl().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:44 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001