KHTML
KHTMLView Class Reference
#include <khtmlview.h>

Detailed Description
Renders and displays HTML in a QScrollArea.Suitable for use as an application's main view.
Definition at line 91 of file khtmlview.h.
Public Types | |
enum | SmoothScrollingMode { SSMDisabled = 0, SSMWhenEfficient, SSMEnabled } |
Public Slots | |
void | layout () |
virtual void | resizeContents (int w, int h) |
Signals | |
void | cleared () |
void | findAheadActive (bool) |
void | finishedLayout () |
void | hideAccessKeys () |
void | repaintAccessKeys () |
void | zoomView (int) |
Public Member Functions | |
void | addChild (QWidget *child, int dx, int dy) |
int | contentsHeight () const |
void | contentsToViewport (int x, int y, int &cx, int &cy) const |
QPoint | contentsToViewport (const QPoint &p) const |
int | contentsWidth () const |
int | contentsX () const |
int | contentsY () const |
void | displayAccessKeys () |
int | frameWidth () const |
KHTMLView (KHTMLPart *part, QWidget *parent) | |
int | marginHeight () |
int | marginWidth () const |
KHTMLPart * | part () const |
void | print (bool quick=false) |
void | repaintContents (int x, int y, int w, int h) |
void | repaintContents (const QRect &r) |
void | scrollBy (int x, int y) |
void | setContentsPos (int x, int y) |
virtual void | setHorizontalScrollBarPolicy (Qt::ScrollBarPolicy policy) |
void | setMarginHeight (int y) |
void | setMarginWidth (int x) |
void | setSmoothScrollingMode (SmoothScrollingMode m) |
virtual void | setVerticalScrollBarPolicy (Qt::ScrollBarPolicy policy) |
void | setZoomLevel (int percent) |
SmoothScrollingMode | smoothScrollingMode () const |
void | updateContents (int x, int y, int w, int h) |
void | updateContents (const QRect &r) |
void | viewportToContents (int x, int y, int &cx, int &cy) const |
QPoint | viewportToContents (const QPoint &p) const |
int | visibleHeight () const |
int | visibleWidth () const |
int | zoomLevel () const |
virtual | ~KHTMLView () |
Protected Slots | |
void | slotPaletteChanged () |
Protected Member Functions | |
void | clear () |
virtual void | closeEvent (QCloseEvent *) |
void | doAutoScroll () |
virtual void | dragEnterEvent (QDragEnterEvent *) |
virtual void | dropEvent (QDropEvent *) |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *, QEvent *) |
virtual void | focusInEvent (QFocusEvent *) |
virtual bool | focusNextPrevChild (bool next) |
virtual void | focusOutEvent (QFocusEvent *) |
virtual void | hideEvent (QHideEvent *) |
void | keyPressEvent (QKeyEvent *_ke) |
void | keyReleaseEvent (QKeyEvent *_ke) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | paintEvent (QPaintEvent *) |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | scrollContentsBy (int dx, int dy) |
void | setSmoothScrollingModeDefault (SmoothScrollingMode m) |
virtual void | showEvent (QShowEvent *) |
void | timerEvent (QTimerEvent *) |
virtual bool | viewportEvent (QEvent *e) |
virtual void | wheelEvent (QWheelEvent *) |
virtual bool | widgetEvent (QEvent *) |
Friends | |
void | applyRule (DOM::CSSProperty *prop) |
Member Enumeration Documentation
Smooth Scrolling Mode enumeration.
- SSMDisabled smooth scrolling is disabled
- SSMWhenEfficient only use smooth scrolling on pages that do not require a full repaint of the content area when scrolling
- SSMAlways smooth scrolling is performed unconditionally
Definition at line 299 of file khtmlview.h.
Constructor & Destructor Documentation
KHTMLView::~KHTMLView | ( | ) | [virtual] |
Definition at line 547 of file khtmlview.cpp.
Member Function Documentation
void KHTMLView::addChild | ( | QWidget * | child, | |
int | dx, | |||
int | dy | |||
) |
Definition at line 3958 of file khtmlview.cpp.
void KHTMLView::clear | ( | ) | [protected] |
Definition at line 596 of file khtmlview.cpp.
void KHTMLView::cleared | ( | ) | [signal] |
void KHTMLView::closeEvent | ( | QCloseEvent * | ev | ) | [protected, virtual] |
Definition at line 1025 of file khtmlview.cpp.
int KHTMLView::contentsHeight | ( | ) | const |
void KHTMLView::contentsToViewport | ( | int | x, | |
int | y, | |||
int & | cx, | |||
int & | cy | |||
) | const |
Returns a point translated to viewport coordinates.
- Parameters:
-
x x coordinate of contents area point to translate y y coordinate of contents area point to translate cx resulting x coordinate cy resulting y coordinate
Definition at line 738 of file khtmlview.cpp.
Returns a point translated to viewport coordinates.
- Parameters:
-
p the contents area point to translate
Definition at line 733 of file khtmlview.cpp.
int KHTMLView::contentsWidth | ( | ) | const |
int KHTMLView::contentsX | ( | ) | const |
Returns the x coordinate of the contents area point that is currently located at the top left in the viewport.
Definition at line 673 of file khtmlview.cpp.
int KHTMLView::contentsY | ( | ) | const |
Returns the y coordinate of the contents area point that is currently located at the top left in the viewport.
Definition at line 678 of file khtmlview.cpp.
void KHTMLView::displayAccessKeys | ( | ) |
void KHTMLView::doAutoScroll | ( | ) | [protected] |
Definition at line 1981 of file khtmlview.cpp.
void KHTMLView::dragEnterEvent | ( | QDragEnterEvent * | ev | ) | [protected, virtual] |
Definition at line 3731 of file khtmlview.cpp.
void KHTMLView::dropEvent | ( | QDropEvent * | ev | ) | [protected, virtual] |
Definition at line 3737 of file khtmlview.cpp.
Definition at line 467 of file khtmlview.cpp.
Definition at line 2123 of file khtmlview.cpp.
void KHTMLView::findAheadActive | ( | bool | ) | [signal] |
void KHTMLView::finishedLayout | ( | ) | [signal] |
This signal is used for internal layouting.
Don't use it to check if rendering finished. Use KHTMLPart completed() signal instead.
void KHTMLView::focusInEvent | ( | QFocusEvent * | e | ) | [protected, virtual] |
Definition at line 3743 of file khtmlview.cpp.
Definition at line 1962 of file khtmlview.cpp.
void KHTMLView::focusOutEvent | ( | QFocusEvent * | e | ) | [protected, virtual] |
Definition at line 3757 of file khtmlview.cpp.
int KHTMLView::frameWidth | ( | ) | const [inline] |
Definition at line 131 of file khtmlview.h.
void KHTMLView::hideAccessKeys | ( | ) | [signal] |
void KHTMLView::hideEvent | ( | QHideEvent * | e | ) | [protected, virtual] |
Definition at line 620 of file khtmlview.cpp.
void KHTMLView::keyPressEvent | ( | QKeyEvent * | _ke | ) | [protected] |
Definition at line 1627 of file khtmlview.cpp.
void KHTMLView::keyReleaseEvent | ( | QKeyEvent * | _ke | ) | [protected] |
Definition at line 1908 of file khtmlview.cpp.
void KHTMLView::layout | ( | ) | [slot] |
int KHTMLView::marginHeight | ( | ) | [inline] |
Returns the margin height.
A return value of -1 means the default value will be used.
Definition at line 155 of file khtmlview.h.
int KHTMLView::marginWidth | ( | ) | const [inline] |
Returns the margin width.
A return value of -1 means the default value will be used.
Definition at line 143 of file khtmlview.h.
void KHTMLView::mouseDoubleClickEvent | ( | QMouseEvent * | _mouse | ) | [protected, virtual] |
Definition at line 1205 of file khtmlview.cpp.
void KHTMLView::mouseMoveEvent | ( | QMouseEvent * | _mouse | ) | [protected, virtual] |
Definition at line 1268 of file khtmlview.cpp.
void KHTMLView::mousePressEvent | ( | QMouseEvent * | _mouse | ) | [protected, virtual] |
Definition at line 1076 of file khtmlview.cpp.
void KHTMLView::mouseReleaseEvent | ( | QMouseEvent * | _mouse | ) | [protected, virtual] |
Definition at line 1494 of file khtmlview.cpp.
void KHTMLView::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
Definition at line 845 of file khtmlview.cpp.
KHTMLPart* KHTMLView::part | ( | ) | const [inline] |
Returns a pointer to the KHTMLPart that is rendering the page.
Definition at line 129 of file khtmlview.h.
void KHTMLView::print | ( | bool | quick = false |
) |
Prints the HTML document.
- Parameters:
-
quick if true, fully automated printing, without print dialog
Definition at line 3069 of file khtmlview.cpp.
void KHTMLView::repaintAccessKeys | ( | ) | [signal] |
void KHTMLView::repaintContents | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) |
Definition at line 775 of file khtmlview.cpp.
void KHTMLView::repaintContents | ( | const QRect & | r | ) |
Requests an immediate repaint of the content area.
- Parameters:
-
r the content area rectangle to repaint
Definition at line 786 of file khtmlview.cpp.
void KHTMLView::resizeContents | ( | int | w, | |
int | h | |||
) | [virtual, slot] |
Resize the contents area.
- Parameters:
-
w the new width h the new height
Definition at line 664 of file khtmlview.cpp.
void KHTMLView::resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Definition at line 823 of file khtmlview.cpp.
void KHTMLView::scrollBy | ( | int | x, | |
int | y | |||
) |
Scrolls the content area by a given amount.
- Parameters:
-
x x offset y y offset
Definition at line 727 of file khtmlview.cpp.
void KHTMLView::scrollContentsBy | ( | int | dx, | |
int | dy | |||
) | [protected, virtual] |
Definition at line 3777 of file khtmlview.cpp.
void KHTMLView::setContentsPos | ( | int | x, | |
int | y | |||
) |
Place the contents area point x/y at the top left of the viewport.
Definition at line 721 of file khtmlview.cpp.
void KHTMLView::setHorizontalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) | [virtual] |
Sets horizontal scrollbar mode.
WARNING: do not call this method on a base class pointer unless you specifically want QAbstractScrollArea's variant (not recommended). QAbstractScrollArea::setHorizontalScrollBarPolicy is *not* virtual.
Definition at line 3412 of file khtmlview.cpp.
void KHTMLView::setMarginHeight | ( | int | y | ) |
Definition at line 912 of file khtmlview.cpp.
void KHTMLView::setMarginWidth | ( | int | x | ) |
void KHTMLView::setSmoothScrollingMode | ( | SmoothScrollingMode | m | ) |
Set the smooth scrolling mode.
Smooth scrolling mode is normally controlled by the configuration file's SmoothScrolling key. Using this setter will override the configuration file's settings.
- Since:
- 4.1
Definition at line 1048 of file khtmlview.cpp.
void KHTMLView::setSmoothScrollingModeDefault | ( | SmoothScrollingMode | m | ) | [protected] |
Definition at line 1056 of file khtmlview.cpp.
void KHTMLView::setVerticalScrollBarPolicy | ( | Qt::ScrollBarPolicy | policy | ) | [virtual] |
Sets vertical scrollbar mode.
WARNING: do not call this method on a base class pointer unless you specifically want QAbstractScrollArea's variant (not recommended). QAbstractScrollArea::setVerticalScrollBarPolicy is *not* virtual.
Definition at line 3403 of file khtmlview.cpp.
void KHTMLView::setZoomLevel | ( | int | percent | ) |
Apply a zoom level to the content area.
- Parameters:
-
percent a zoom level expressed as a percentage
Definition at line 1031 of file khtmlview.cpp.
void KHTMLView::showEvent | ( | QShowEvent * | e | ) | [protected, virtual] |
Definition at line 627 of file khtmlview.cpp.
void KHTMLView::slotPaletteChanged | ( | ) | [protected, slot] |
Definition at line 3255 of file khtmlview.cpp.
KHTMLView::SmoothScrollingMode KHTMLView::smoothScrollingMode | ( | ) | const |
Retrieve the current smooth scrolling mode.
- Since:
- 4.1
Definition at line 1066 of file khtmlview.cpp.
void KHTMLView::timerEvent | ( | QTimerEvent * | e | ) | [protected] |
Definition at line 3971 of file khtmlview.cpp.
void KHTMLView::updateContents | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) |
Definition at line 759 of file khtmlview.cpp.
void KHTMLView::updateContents | ( | const QRect & | r | ) |
Requests an update of the content area.
- Parameters:
-
r the content area rectangle to update
Definition at line 770 of file khtmlview.cpp.
Definition at line 2070 of file khtmlview.cpp.
void KHTMLView::viewportToContents | ( | int | x, | |
int | y, | |||
int & | cx, | |||
int & | cy | |||
) | const |
Returns a point translated to contents area coordinates.
- Parameters:
-
x x coordinate of viewport point to translate y y coordinate of viewport point to translate cx resulting x coordinate cy resulting y coordinate
Definition at line 751 of file khtmlview.cpp.
Returns a point translated to contents area coordinates.
- Parameters:
-
p the viewport point to translate
Definition at line 746 of file khtmlview.cpp.
int KHTMLView::visibleHeight | ( | ) | const |
int KHTMLView::visibleWidth | ( | ) | const |
void KHTMLView::wheelEvent | ( | QWheelEvent * | e | ) | [protected, virtual] |
Definition at line 3651 of file khtmlview.cpp.
Definition at line 2275 of file khtmlview.cpp.
int KHTMLView::zoomLevel | ( | ) | const |
void KHTMLView::zoomView | ( | int | ) | [signal] |
Friends And Related Function Documentation
void applyRule | ( | DOM::CSSProperty * | prop | ) | [friend] |
The documentation for this class was generated from the following files: