• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KTextBrowser Class Reference

#include <ktextbrowser.h>

Inheritance diagram for KTextBrowser:
Inheritance graph
[legend]

Signals

void mailClick (const QString &name, const QString &address)
 
void urlClick (const QString &url)
 

Public Member Functions

 KTextBrowser (QWidget *parent=0, bool notifyClick=false)
 
 ~KTextBrowser ()
 
bool isNotifyClick () const
 
void setNotifyClick (bool notifyClick)
 

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
void setSource (const QUrl &name)
 
virtual void wheelEvent (QWheelEvent *event)
 

Properties

bool notifyClick
 

Detailed Description

Extended QTextBrowser.

An 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.

If the link starts with the text "whatsthis:" a QWhatsThis box will appear and then display the rest of the text.

Warning
The "whatsthis:" feature is considered deprecated: it is not available in KDE Frameworks 5, because KDE Frameworks 5 does not provide KTextBrowser anymore.
ktextbrowser.png
KDE Text Browser
Author
Espen Sand (espen.nosp@m.sa@o.nosp@m.nline.nosp@m..no)

Definition at line 51 of file ktextbrowser.h.

Constructor & Destructor Documentation

KTextBrowser::KTextBrowser ( QWidget *  parent = 0,
bool  notifyClick = false 
)
explicit

Creates a new text browser.

Parameters
parentParent of the widget.
notifyClicktrue causes signals to be emitted.

Definition at line 51 of file ktextbrowser.cpp.

KTextBrowser::~KTextBrowser ( )

Destroys the text browser.

Definition at line 57 of file ktextbrowser.cpp.

Member Function Documentation

void KTextBrowser::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Re-implemented for internal reasons.

API not affected.

See QLineEdit::createPopupMenu().

Definition at line 118 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 69 of file ktextbrowser.cpp.

void KTextBrowser::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Makes sure Key_Escape is ignored.

Definition at line 100 of file ktextbrowser.cpp.

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
nameThe destination name. It is QString() at the moment.
addressThe destination address.
void KTextBrowser::setNotifyClick ( bool  notifyClick)

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

Parameters
notifyClicktrue causes signals to be emitted.

Definition at line 63 of file ktextbrowser.cpp.

void KTextBrowser::setSource ( const QUrl &  name)
protected

Reimplemented to NOT set the source but to do the special handling of links being clicked.

Do not call this.

If you need to set an initial source url in the text browser, call the QTextBrowser method explicitly, like this: myTextBrowser->QTextBrowser::setSource(url)

Definition at line 75 of file ktextbrowser.cpp.

void KTextBrowser::urlClick ( const QString &  url)
signal

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

Parameters
urlThe destination address.
void KTextBrowser::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Reimplemented to support Qt2 behavior (Ctrl-Wheel = fast scroll)

Definition at line 110 of file ktextbrowser.cpp.

Property Documentation

bool KTextBrowser::notifyClick
readwrite

Definition at line 54 of file ktextbrowser.h.


The documentation for this class was generated from the following files:
  • ktextbrowser.h
  • ktextbrowser.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal