1// qtextbrowser.sip generated by MetaSIP 2// 3// This file is part of the QtWidgets Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QTextBrowser : QTextEdit 24{ 25%TypeHeaderCode 26#include <qtextbrowser.h> 27%End 28 29public: 30 explicit QTextBrowser(QWidget *parent /TransferThis/ = 0); 31 virtual ~QTextBrowser(); 32 QUrl source() const; 33 QStringList searchPaths() const; 34 void setSearchPaths(const QStringList &paths); 35 virtual QVariant loadResource(int type, const QUrl &name); 36 37public slots: 38 virtual void setSource(const QUrl &name); 39 virtual void backward(); 40 virtual void forward(); 41 virtual void home(); 42 virtual void reload(); 43 44signals: 45 void backwardAvailable(bool); 46 void forwardAvailable(bool); 47 void sourceChanged(const QUrl &); 48 void highlighted(const QUrl &); 49 void highlighted(const QString &); 50 void anchorClicked(const QUrl &); 51 52protected: 53 virtual bool event(QEvent *e); 54 virtual void keyPressEvent(QKeyEvent *ev); 55 virtual void mouseMoveEvent(QMouseEvent *ev); 56 virtual void mousePressEvent(QMouseEvent *ev); 57 virtual void mouseReleaseEvent(QMouseEvent *ev); 58 virtual void focusOutEvent(QFocusEvent *ev); 59 virtual bool focusNextPrevChild(bool next); 60 virtual void paintEvent(QPaintEvent *e); 61 62public: 63 bool isBackwardAvailable() const; 64 bool isForwardAvailable() const; 65 void clearHistory(); 66 bool openExternalLinks() const; 67 void setOpenExternalLinks(bool open); 68 bool openLinks() const; 69 void setOpenLinks(bool open); 70 QString historyTitle(int) const; 71 QUrl historyUrl(int) const; 72 int backwardHistoryCount() const; 73 int forwardHistoryCount() const; 74 75signals: 76 void historyChanged(); 77 78public: 79%If (Qt_5_14_0 -) 80 QTextDocument::ResourceType sourceType() const; 81%End 82 83public slots: 84%If (Qt_5_14_0 -) 85 void setSource(const QUrl &name, QTextDocument::ResourceType type); 86%End 87 88protected: 89%If (Qt_5_14_0 -) 90 void doSetSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource); 91%End 92}; 93