khtml Library API Documentation

KHTMLView Class Reference

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

#include <khtmlview.h>

Inheritance diagram for KHTMLView:

Inheritance graph
[legend]
Collaboration diagram for KHTMLView:

Collaboration graph
[legend]
List of all members.

Signals

void finishedLayout ()
void cleared ()
void zoomView (int)
void hideAccessKeys ()
void repaintAccessKeys ()

Public Member Functions

 KHTMLView (KHTMLPart *part, QWidget *parent, const char *name=0)
virtual ~KHTMLView ()
KHTMLPartpart () const
int frameWidth () const
void setMarginWidth (int x)
int marginWidth () const
void setMarginHeight (int y)
int marginHeight ()
virtual void setVScrollBarMode (ScrollBarMode mode)
virtual void setHScrollBarMode (ScrollBarMode mode)
void print ()
void print (bool quick)
void layout ()
void displayAccessKeys ()

Protected Slots

void slotPaletteChanged ()
void slotScrollBarMoved ()

Protected Member Functions

void clear ()
virtual void resizeEvent (QResizeEvent *event)
virtual void showEvent (QShowEvent *)
virtual void hideEvent (QHideEvent *)
virtual bool focusNextPrevChild (bool next)
virtual void drawContents (QPainter *p, int clipx, int clipy, int clipw, int cliph)
virtual void drawContents (QPainter *)
virtual void viewportMousePressEvent (QMouseEvent *)
virtual void focusInEvent (QFocusEvent *)
virtual void focusOutEvent (QFocusEvent *)
virtual void viewportMouseDoubleClickEvent (QMouseEvent *)
virtual void viewportMouseMoveEvent (QMouseEvent *)
virtual void viewportMouseReleaseEvent (QMouseEvent *)
virtual void viewportResizeEvent (QResizeEvent *)
virtual void viewportWheelEvent (QWheelEvent *)
virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dropEvent (QDropEvent *)
virtual void closeEvent (QCloseEvent *)
virtual bool eventFilter (QObject *, QEvent *)
void keyPressEvent (QKeyEvent *_ke)
void keyReleaseEvent (QKeyEvent *_ke)
void contentsContextMenuEvent (QContextMenuEvent *_ce)
void doAutoScroll ()
void timerEvent (QTimerEvent *)

Friends

class DOM::HTMLDocumentImpl
class DOM::HTMLTitleElementImpl
class DOM::HTMLGenericFormElementImpl
class DOM::HTMLFormElementImpl
class DOM::HTMLAnchorElementImpl
class DOM::HTMLInputElementImpl
class DOM::DocumentImpl
class KHTMLPart
class khtml::RenderCanvas
class khtml::RenderObject
class khtml::RenderLineEdit
class khtml::RenderPartObject
class khtml::RenderWidget
class khtml::CSSStyleSelector
class khtml::LineEditWidget
class KJS::WindowFunc
class KJS::ExternalFunc
void applyRule (DOM::CSSProperty *prop)

Detailed Description

Renders and displays HTML in a QScrollView.

Suitable for use as an application's main view.

Definition at line 77 of file khtmlview.h.


Constructor & Destructor Documentation

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

Constructs a KHTMLView.

Definition at line 458 of file khtmlview.cpp.

References QScrollView::contentsMoving(), QScrollView::enableClipper(), KImageIO::registerFormats(), QScrollView::setHScrollBarMode(), QScrollView::setResizePolicy(), QScrollView::setVScrollBarMode(), slotPaletteChanged(), slotScrollBarMoved(), 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 112 of file khtmlview.h.

Referenced by KJS::JSNodeFilter::acceptNode(), khtml::CSSStyleSelector::applyRule(), KJS::checkNodeSecurity(), KJS::HTMLDocument::hasProperty(), KJS::HTMLDocument::putValueProperty(), KJS::HTMLElementFunction::tryCall(), KJS::HTMLDocument::tryGet(), and KJS::HTMLDocument::tryPut().

void KHTMLView::setMarginWidth int  x  ) 
 

Sets a margin in x direction.

Definition at line 729 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 126 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 138 of file khtmlview.h.

void KHTMLView::setVScrollBarMode ScrollBarMode  mode  )  [virtual]
 

Sets verticals scrollbar mode.

Reimplemented for internal reasons.

Reimplemented from QScrollView.

Definition at line 2528 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 2538 of file khtmlview.cpp.

References QScrollView::setHScrollBarMode().

void KHTMLView::print  ) 
 

Prints the HTML document.

Definition at line 2297 of file khtmlview.cpp.

Referenced by KHTMLPartBrowserExtension::print().

void KHTMLView::print bool  quick  ) 
 

Prints the HTML document.

Parameters:
quick if true, fully automated printing, without print dialog

Definition at line 2302 of file khtmlview.cpp.

References QString::arg(), QPainter::begin(), QPainter::boundingRect(), KStringHandler::csqueeze(), QDate::currentDate(), QPainter::drawText(), QPainter::end(), endl(), QPainter::fontMetrics(), KLocale::formatDate(), QPaintDeviceMetrics::height(), QString::isEmpty(), kdDebug(), khtml::RenderCanvas, KGlobal::locale(), QPainter::resetXForm(), QPainter::scale(), QPainter::setClipRect(), QPainter::setFont(), 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 741 of file khtmlview.cpp.

References displayAccessKeys(), DOM::DocumentImpl, endl(), QScrollView::horizontalScrollBar(), KHTMLPart::isCaretMode(), KHTMLPart::isEditable(), kdDebug(), khtml::RenderCanvas, QScrollView::setHScrollBarMode(), QScrollView::setVScrollBarMode(), QScrollView::verticalScrollBar(), QScrollView::visibleHeight(), QScrollView::visibleWidth(), and KHTMLPart::xmlDocImpl().

Referenced by drawContents(), slotScrollBarMoved(), timerEvent(), and viewportResizeEvent().

void KHTMLView::displayAccessKeys  ) 
 

Display all accesskeys in small tooltips.

Definition at line 2137 of file khtmlview.cpp.

References QScrollView::addChild(), QScrollView::contentsHeight(), QScrollView::contentsWidth(), QRect::height(), QRect::left(), DOM::DOMString::length(), QToolTip::palette(), QScrollView::showChild(), DOM::DOMString::string(), QRect::top(), QScrollView::viewport(), QRect::width(), and KHTMLPart::xmlDocImpl().

Referenced by keyReleaseEvent(), and layout().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for khtml Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 16 07:10:38 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003