# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# KTextBrowser Class Reference

An extended QTextBrowser. Extended QTextBrowser. More...

`#include <ktextbrowser.h>`

Inheritance diagram for KTextBrowser:

[legend]
Collaboration diagram for KTextBrowser:

[legend]
List of all members.

## Signals

void | mailClick (const QString &name, const QString &address)
| Emitted when a mail link has been activated and the widget has been configured to emit the signal.
void | urlClick (const QString &url)
| Emitted if mailClick() is not emitted and the widget has been configured to emit the signal.

## Public Member Functions

| KTextBrowser (QWidget *parent=0, const char *name=0, bool notifyClick=false)
| Constructor.
| ~KTextBrowser (void)
| Destructor.
void | setNotifyClick (bool notifyClick)
| Decide whether a click on a link should be handled internally or if a signal should be emitted.
bool | isNotifyClick () const
| Returns whether a click on a link should be handled internally or if a signal should be emitted.

## Protected Member Functions

void | setSource (const QString &name)
| Reimplemented to NOT set the source but to do the special handling.
virtual void | keyPressEvent (QKeyEvent *e)
| Makes sure Key_Escape is ignored.
virtual void | viewportMouseMoveEvent (QMouseEvent *e)
| Make sure we use our own hand cursor.
virtual void | contentsWheelEvent (QWheelEvent *e)
| Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll).
virtual void | virtual_hook (int id, void *data)

## Detailed Description

An extended QTextBrowser. Extended QTextBrowser.

By default it will invoke the system mailer or the system browser when a link is activated, or it can emit the signal urlClick() or mailClick() when a link is activated.

Author:
  Espen Sand (espensa@online.no)

Version:
  Id
    ktextbrowser.h,v 1.13 2002/03/04 00:51:51 lunakl Exp

Definition at line 38 of file ktextbrowser.h.

## Constructor & Destructor Documentation

KTextBrowser::KTextBrowser | ( | QWidget * | parent = 0,
|  | const char * | name = 0,
|  | bool | notifyClick = false
| ) |

Constructor.

Parameters:

  parent | Parent of the widget.
  name | Widget name.
  notifyClick | `true` causes signals to be emitted.

Definition at line 82 of file ktextbrowser.cpp.

References KStdAccel::name().

KTextBrowser::~KTextBrowser | ( | void |  | ) |

| Destructor. Definition at line 92 of file ktextbrowser.cpp.

## Member Function Documentation

void KTextBrowser::setNotifyClick | ( | bool | notifyClick | ) |

Decide whether a click on a link should be handled internally or if a signal should be emitted.

Parameters:

  notifyClick | `true` causes signals to be emitted.

Definition at line 97 of file ktextbrowser.cpp.

bool KTextBrowser::isNotifyClick | ( |  | ) | const

| Returns whether a click on a link should be handled internally or if a signal should be emitted. Definition at line 103 of file ktextbrowser.cpp.

void KTextBrowser::setSource | ( | const QString & | name | ) | `[protected]`

| Reimplemented to NOT set the source but to do the special handling. Do not call. Reimplemented from QTextBrowser. Definition at line 109 of file ktextbrowser.cpp. References QString::contains(), QString::isNull(), mailClick(), KStdAccel::name(), and urlClick().

void KTextBrowser::keyPressEvent | ( | QKeyEvent * | e | ) | `[protected, virtual]`

| Makes sure Key_Escape is ignored. Reimplemented from QTextBrowser. Definition at line 141 of file ktextbrowser.cpp. References QKeyEvent::ignore(), QKeyEvent::key(), and QTextBrowser::keyPressEvent().

void KTextBrowser::viewportMouseMoveEvent | ( | QMouseEvent * | e | ) | `[protected, virtual]`

| Make sure we use our own hand cursor. Definition at line 157 of file ktextbrowser.cpp. References KCursor::handCursor().

void KTextBrowser::contentsWheelEvent | ( | QWheelEvent * | e | ) | `[protected, virtual]`

| Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll). Definition at line 166 of file ktextbrowser.cpp. References QScrollView::contentsWheelEvent(), and KGlobalSettings::wheelMouseZooms().

void KTextBrowser::mailClick | ( | const QString & | name,
|  | const QString & | address
| ) | `[signal]`

Emitted when a mail link has been activated and the widget has been configured to emit the signal.

Parameters:

  name | The destination name. It is QString::null at the moment.
  address | The destination address.

Referenced by setSource().

void KTextBrowser::urlClick | ( | const QString & | url | ) | `[signal]`

Emitted if mailClick() is not emitted and the widget has been configured to emit the signal.

Parameters:

  url | The destination address.

Referenced by setSource().

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

- ktextbrowser.h
- ktextbrowser.cpp

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:04:54 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001