KDEUI
ktextbrowser.h
Go to the documentation of this file.
00001 /* This file is part of the KDE Libraries 00002 * Copyright (C) 1999 Espen Sand (espensa@online.no) 00003 * Copyright (C) 2006 Urs Wolfer <uwolfer at fwo.ch> 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KTEXTBROWSER_H 00022 #define KTEXTBROWSER_H 00023 00024 #include <kdeui_export.h> 00025 00026 #include <QtGui/QTextBrowser> 00027 00028 00047 class KDEUI_EXPORT KTextBrowser : public QTextBrowser 00048 { 00049 Q_OBJECT 00050 Q_PROPERTY( bool notifyClick READ isNotifyClick WRITE setNotifyClick ) 00051 00052 public: 00059 explicit KTextBrowser( QWidget *parent = 0, bool notifyClick = false ); 00060 00064 ~KTextBrowser(); 00065 00072 void setNotifyClick( bool notifyClick ); 00073 00078 bool isNotifyClick() const; 00079 00080 protected: 00089 void setSource( const QUrl& name ); 00090 00094 virtual void keyPressEvent( QKeyEvent *event ); 00095 00099 virtual void wheelEvent( QWheelEvent *event ); 00100 00107 virtual void contextMenuEvent( QContextMenuEvent *event ); 00108 00109 Q_SIGNALS: 00117 void mailClick( const QString &name, const QString &address ); 00118 00125 void urlClick( const QString &url ); 00126 00127 private: 00128 class Private; 00129 Private* const d; 00130 }; 00131 00132 #endif
KDE 4.6 API Reference