KDELibs4Support

ktextbrowser.h
1 /* This file is part of the KDE Libraries
2  * Copyright (C) 1999 Espen Sand ([email protected])
3  * Copyright (C) 2006 Urs Wolfer <uwolfer at fwo.ch>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef KTEXTBROWSER_H
22 #define KTEXTBROWSER_H
23 
24 #include <kdelibs4support_export.h>
25 
26 #include <QTextBrowser>
27 
56 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KTextBrowser : public QTextBrowser
57 {
58  Q_OBJECT
59  Q_PROPERTY(bool notifyClick READ isNotifyClick WRITE setNotifyClick)
60 
61 public:
68  KDELIBS4SUPPORT_DEPRECATED explicit KTextBrowser(QWidget *parent = nullptr, bool notifyClick = false);
69 
73  ~KTextBrowser();
74 
81  void setNotifyClick(bool notifyClick);
82 
87  bool isNotifyClick() const;
88 
89 protected:
98  void setSource(const QUrl &name) override;
99 
103  void keyPressEvent(QKeyEvent *event) override;
104 
108  void wheelEvent(QWheelEvent *event) override;
109 
116  void contextMenuEvent(QContextMenuEvent *event) override;
117 
118 Q_SIGNALS:
126  void mailClick(const QString &name, const QString &address);
127 
134  void urlClick(const QString &url);
135 
136 private:
137  class Private;
138  Private *const d;
139 };
140 
141 #endif
virtual void keyPressEvent(QKeyEvent *ev) override
virtual void contextMenuEvent(QContextMenuEvent *event) override
virtual void wheelEvent(QWheelEvent *e) override
Q_PROPERTY(...)
virtual void setSource(const QUrl &name)
Extended QTextBrowser.
Definition: ktextbrowser.h:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 22:58:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.