qtextbrowser.sip 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // qtextbrowser.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QTextBrowser : public QTextEdit
  22. {
  23. %TypeHeaderCode
  24. #include <qtextbrowser.h>
  25. %End
  26. public:
  27. explicit QTextBrowser(QWidget *parent /TransferThis/ = 0);
  28. virtual ~QTextBrowser();
  29. QUrl source() const;
  30. QStringList searchPaths() const;
  31. void setSearchPaths(const QStringList &paths);
  32. virtual QVariant loadResource(int type, const QUrl &name);
  33. public slots:
  34. void setSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource);
  35. virtual void backward();
  36. virtual void forward();
  37. virtual void home();
  38. virtual void reload();
  39. signals:
  40. void backwardAvailable(bool);
  41. void forwardAvailable(bool);
  42. void sourceChanged(const QUrl &);
  43. void highlighted(const QUrl &);
  44. void anchorClicked(const QUrl &);
  45. protected:
  46. virtual bool event(QEvent *e);
  47. virtual void keyPressEvent(QKeyEvent *ev);
  48. virtual void mouseMoveEvent(QMouseEvent *ev);
  49. virtual void mousePressEvent(QMouseEvent *ev);
  50. virtual void mouseReleaseEvent(QMouseEvent *ev);
  51. virtual void focusOutEvent(QFocusEvent *ev);
  52. virtual bool focusNextPrevChild(bool next);
  53. virtual void paintEvent(QPaintEvent *e);
  54. public:
  55. bool isBackwardAvailable() const;
  56. bool isForwardAvailable() const;
  57. void clearHistory();
  58. bool openExternalLinks() const;
  59. void setOpenExternalLinks(bool open);
  60. bool openLinks() const;
  61. void setOpenLinks(bool open);
  62. QString historyTitle(int) const;
  63. QUrl historyUrl(int) const;
  64. int backwardHistoryCount() const;
  65. int forwardHistoryCount() const;
  66. signals:
  67. void historyChanged();
  68. public:
  69. QTextDocument::ResourceType sourceType() const;
  70. protected:
  71. virtual void doSetSource(const QUrl &name, QTextDocument::ResourceType type = QTextDocument::UnknownResource);
  72. };