diff options
Diffstat (limited to 'examples/webenginewidgets')
71 files changed, 7206 insertions, 1468 deletions
diff --git a/examples/webenginewidgets/markdowneditor/document.py b/examples/webenginewidgets/markdowneditor/document.py new file mode 100644 index 000000000..331fbc0ca --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/document.py @@ -0,0 +1,24 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + + +from PySide6.QtCore import QObject, Property, Signal + + +class Document(QObject): + + textChanged = Signal(str) + + def __init__(self, parent=None): + super().__init__(parent) + self._text = '' + + def text(self): + return self._text + + def setText(self, t): + if t != self._text: + self._text = t + self.textChanged.emit(t) + + text = Property(str, text, setText, notify=textChanged) diff --git a/examples/webenginewidgets/markdowneditor/main.py b/examples/webenginewidgets/markdowneditor/main.py new file mode 100644 index 000000000..4d787f0f0 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/main.py @@ -0,0 +1,20 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +"""PySide6 Markdown Editor Example""" + +import sys + +from PySide6.QtCore import QCoreApplication +from PySide6.QtWidgets import QApplication + +from mainwindow import MainWindow +import rc_markdowneditor # noqa: F401 + + +if __name__ == '__main__': + app = QApplication(sys.argv) + QCoreApplication.setOrganizationName("QtExamples") + window = MainWindow() + window.show() + sys.exit(app.exec()) diff --git a/examples/webenginewidgets/markdowneditor/mainwindow.py b/examples/webenginewidgets/markdowneditor/mainwindow.py new file mode 100644 index 000000000..6f74cf93d --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/mainwindow.py @@ -0,0 +1,137 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + + +from PySide6.QtCore import QDir, QFile, QIODevice, QUrl, Qt, Slot +from PySide6.QtGui import QFontDatabase +from PySide6.QtWebChannel import QWebChannel +from PySide6.QtWidgets import QDialog, QFileDialog, QMainWindow, QMessageBox + +from ui_mainwindow import Ui_MainWindow +from document import Document +from previewpage import PreviewPage + + +class MainWindow(QMainWindow): + + def __init__(self, parent=None): + super().__init__(parent) + self.m_file_path = '' + self.m_content = Document() + self._ui = Ui_MainWindow() + self._ui.setupUi(self) + font = QFontDatabase.systemFont(QFontDatabase.FixedFont) + self._ui.editor.setFont(font) + self._ui.preview.setContextMenuPolicy(Qt.NoContextMenu) + self._page = PreviewPage(self) + self._ui.preview.setPage(self._page) + + self._ui.editor.textChanged.connect(self.plainTextEditChanged) + + self._channel = QWebChannel(self) + self._channel.registerObject("content", self.m_content) + self._page.setWebChannel(self._channel) + + self._ui.preview.setUrl(QUrl("qrc:/index.html")) + + self._ui.actionNew.triggered.connect(self.onFileNew) + self._ui.actionOpen.triggered.connect(self.onFileOpen) + self._ui.actionSave.triggered.connect(self.onFileSave) + self._ui.actionSaveAs.triggered.connect(self.onFileSaveAs) + self._ui.actionExit.triggered.connect(self.close) + + self._ui.editor.document().modificationChanged.connect(self._ui.actionSave.setEnabled) + + defaultTextFile = QFile(":/default.md") + defaultTextFile.open(QIODevice.ReadOnly) + data = defaultTextFile.readAll() + self._ui.editor.setPlainText(data.data().decode('utf8')) + + @Slot() + def plainTextEditChanged(self): + self.m_content.setText(self._ui.editor.toPlainText()) + + @Slot(str) + def openFile(self, path): + f = QFile(path) + name = QDir.toNativeSeparators(path) + if not f.open(QIODevice.ReadOnly): + error = f.errorString() + QMessageBox.warning(self, self.windowTitle(), + f"Could not open file {name}: {error}") + return + self.m_file_path = path + data = f.readAll() + self._ui.editor.setPlainText(data.data().decode('utf8')) + self.statusBar().showMessage(f"Opened {name}") + + def isModified(self): + return self._ui.editor.document().isModified() + + @Slot() + def onFileNew(self): + if self.isModified(): + m = "You have unsaved changes. Do you want to create a new document anyway?" + button = QMessageBox.question(self, self.windowTitle(), m) + if button != QMessageBox.Yes: + return + + self.m_file_path = '' + self._ui.editor.setPlainText("## New document") + self._ui.editor.document().setModified(False) + + @Slot() + def onFileOpen(self): + if self.isModified(): + m = "You have unsaved changes. Do you want to open a new document anyway?" + button = QMessageBox.question(self, self.windowTitle(), m) + if button != QMessageBox.Yes: + return + dialog = QFileDialog(self) + dialog.setWindowTitle("Open MarkDown File") + dialog.setMimeTypeFilters(["text/markdown"]) + dialog.setAcceptMode(QFileDialog.AcceptOpen) + if dialog.exec() == QDialog.Accepted: + self.openFile(dialog.selectedFiles()[0]) + + @Slot() + def onFileSave(self): + if not self.m_file_path: + self.onFileSaveAs() + if not self.m_file_path: + return + + f = QFile(self.m_file_path) + name = QDir.toNativeSeparators(self.m_file_path) + if not f.open(QIODevice.WriteOnly | QIODevice.Text): + error = f.errorString() + QMessageBox.warning(self, self.windowTitle(), + f"Could not write to file {name}: {error}") + return + text = self._ui.editor.toPlainText() + f.write(bytes(text, encoding='utf8')) + f.close() + self._ui.editor.document().setModified(False) + self.statusBar().showMessage(f"Wrote {name}") + + @Slot() + def onFileSaveAs(self): + dialog = QFileDialog(self) + dialog.setWindowTitle("Save MarkDown File") + dialog.setMimeTypeFilters(["text/markdown"]) + dialog.setAcceptMode(QFileDialog.AcceptSave) + dialog.setDefaultSuffix("md") + if dialog.exec() != QDialog.Accepted: + return + path = dialog.selectedFiles()[0] + self.m_file_path = path + self.onFileSave() + + def closeEvent(self, event): + if self.isModified(): + m = "You have unsaved changes. Do you want to exit anyway?" + button = QMessageBox.question(self, self.windowTitle(), m) + if button != QMessageBox.Yes: + event.ignore() + else: + event.accept() diff --git a/examples/webenginewidgets/markdowneditor/mainwindow.ui b/examples/webenginewidgets/markdowneditor/mainwindow.ui new file mode 100644 index 000000000..f4e29ad95 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/mainwindow.ui @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>600</height> + </rect> + </property> + <property name="windowTitle"> + <string>MarkDown Editor</string> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QSplitter" name="splitter"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <widget class="QPlainTextEdit" name="editor"/> + <widget class="QWebEngineView" name="preview" native="true"/> + </widget> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>26</height> + </rect> + </property> + <widget class="QMenu" name="menu_File"> + <property name="title"> + <string>&File</string> + </property> + <addaction name="actionNew"/> + <addaction name="actionOpen"/> + <addaction name="actionSave"/> + <addaction name="actionSaveAs"/> + <addaction name="separator"/> + <addaction name="actionExit"/> + </widget> + <addaction name="menu_File"/> + </widget> + <widget class="QStatusBar" name="statusbar"/> + <action name="actionOpen"> + <property name="text"> + <string>&Open...</string> + </property> + <property name="toolTip"> + <string>Open document</string> + </property> + <property name="shortcut"> + <string>Ctrl+O</string> + </property> + </action> + <action name="actionSave"> + <property name="text"> + <string>&Save</string> + </property> + <property name="toolTip"> + <string>Save current document</string> + </property> + <property name="shortcut"> + <string>Ctrl+S</string> + </property> + </action> + <action name="actionExit"> + <property name="text"> + <string>E&xit</string> + </property> + <property name="toolTip"> + <string>Exit editor</string> + </property> + <property name="shortcut"> + <string>Ctrl+Q</string> + </property> + </action> + <action name="actionSaveAs"> + <property name="text"> + <string>Save &As...</string> + </property> + <property name="toolTip"> + <string>Save document under different name</string> + </property> + </action> + <action name="actionNew"> + <property name="text"> + <string>&New</string> + </property> + <property name="toolTip"> + <string>Create new document</string> + </property> + <property name="shortcut"> + <string>Ctrl+N</string> + </property> + </action> + </widget> + <resources/> + <connections/> +</ui> diff --git a/examples/webenginewidgets/markdowneditor/markdowneditor.pyproject b/examples/webenginewidgets/markdowneditor/markdowneditor.pyproject new file mode 100644 index 000000000..e18e05096 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/markdowneditor.pyproject @@ -0,0 +1,8 @@ +{ + "files": ["document.py", + "main.py", + "mainwindow.py", + "mainwindow.ui", + "previewpage.py", + "resources/markdowneditor.qrc"] +} diff --git a/examples/webenginewidgets/markdowneditor/previewpage.py b/examples/webenginewidgets/markdowneditor/previewpage.py new file mode 100644 index 000000000..35ac80be4 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/previewpage.py @@ -0,0 +1,18 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtGui import QDesktopServices +from PySide6.QtWebEngineCore import QWebEnginePage + + +class PreviewPage(QWebEnginePage): + + def __init__(self, parent=None): + super().__init__(parent) + + def acceptNavigationRequest(self, url, type, isMainFrame): + # Only allow qrc:/index.html. + if url.scheme() == "qrc": + return True + QDesktopServices.openUrl(url) + return False diff --git a/examples/webenginewidgets/markdowneditor/rc_markdowneditor.py b/examples/webenginewidgets/markdowneditor/rc_markdowneditor.py new file mode 100644 index 000000000..aa4f38a45 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/rc_markdowneditor.py @@ -0,0 +1,852 @@ +# Resource object code (Python 3) +# Created by: object code +# Created by: The Resource Compiler for Qt version 6.2.0 +# WARNING! All changes made in this file will be lost! + +from PySide6 import QtCore + +qt_resource_data = b"\ +\x00\x00\x01\xdd\ +#\ +# WebEngine Mark\ +down Editor Exam\ +ple\x0a\x0aThis exampl\ +e uses [QWebEngi\ +neView](http://d\ +oc.qt.io/qt-5/qw\ +ebengineview.htm\ +l)\x0ato preview te\ +xt written using\ + the [Markdown](\ +https://en.wikip\ +edia.org/wiki/Ma\ +rkdown)\x0asyntax.\x0a\ +\x0a### Acknowledgm\ +ents\x0a\x0aThe conver\ +sion from Markdo\ +wn to HTML is do\ +ne with the help\ + of the\x0a[marked \ +JavaScript libra\ +ry](https://gith\ +ub.com/chjj/mark\ +ed) by _Christop\ +her Jeffrey_.\x0aTh\ +e [style sheet](\ +https://kevinbur\ +ke.bitbucket.io/\ +markdowncss/)\x0awa\ +s created by _Ke\ +vin Burke_.\x0a\ +\x00\x00\x02\xb2\ +<\ +!doctype html>\x0a<\ +html lang=\x22en\x22>\x0a\ +<meta charset=\x22u\ +tf-8\x22>\x0a<head>\x0a \ +<link rel=\x22style\ +sheet\x22 type=\x22tex\ +t/css\x22 href=\x223rd\ +party/markdown.c\ +ss\x22>\x0a <script s\ +rc=\x223rdparty/mar\ +ked.js\x22></script\ +>\x0a <script src=\ +\x22qrc:/qtwebchann\ +el/qwebchannel.j\ +s\x22></script>\x0a</h\ +ead>\x0a<body>\x0a <d\ +iv id=\x22placehold\ +er\x22></div>\x0a <sc\ +ript>\x0a 'use str\ +ict';\x0a\x0a var pla\ +ceholder = docum\ +ent.getElementBy\ +Id('placeholder'\ +);\x0a\x0a var update\ +Text = function(\ +text) {\x0a pl\ +aceholder.innerH\ +TML = marked(tex\ +t);\x0a }\x0a\x0a new Q\ +WebChannel(qt.we\ +bChannelTranspor\ +t,\x0a function(\ +channel) {\x0a \ + var content = c\ +hannel.objects.c\ +ontent;\x0a up\ +dateText(content\ +.text);\x0a co\ +ntent.textChange\ +d.connect(update\ +Text);\x0a }\x0a )\ +;\x0a </script>\x0a</\ +body>\x0a</html>\x0a\x0a\x0a\ +\x0a\ +\x00\x00\x06V\ +\x00\ +\x00\x17ex\x9c\xb5XKs\xdb6\x10\xbe\xfbW\xec\ +\xd8\x93\xc6\xce\x90\x0e%Q\xb2DM\x0f\x99\x1c\xda\x1c\ +\xda\xe9!\xb7\xc6\x07\x90\x04E\x8c)\x82\x05!\xcbN\ +\xc6\xff\xbd\x8b\x07)\xf0\xa1D\x89\x12\xd9z\x10\x0b\xec\ +.\xbe\xdd\xfd\x16d\xcc\xd3\xe7/\x17\x80\xaf-\x11\x1b\ +VF\x10\x00\xd9I\xbe\xd6c\x19/\xa5\x9f\x91-+\ +\x9e#\xf8\x83r\x9cA<\xf8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.\x00m\x00d\ +\x00\x08\ +\x08\xb6\x8e\xf9\ +\x003\ +\x00r\x00d\x00p\x00a\x00r\x00t\x00y\ +\x00\x0a\ +\x0c\xba\xf2|\ +\x00i\ +\x00n\x00d\x00e\x00x\x00.\x00h\x00t\x00m\x00l\ +\x00\x0c\ +\x08\xd0i\xc3\ +\x00m\ +\x00a\x00r\x00k\x00d\x00o\x00w\x00n\x00.\x00c\x00s\x00s\ +\x00\x09\ +\x09\x1b\x92\x13\ +\x00m\ +\x00a\x00r\x00k\x00e\x00d\x00.\x00j\x00s\ +" + +qt_resource_struct = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x1a\x00\x02\x00\x00\x00\x02\x00\x00\x00\x04\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01z.[\x95V\ +\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00\x01\xe1\ +\x00\x00\x01z.[\x95V\ +\x00\x00\x00J\x00\x01\x00\x00\x00\x01\x00\x00\x04\x97\ +\x00\x00\x01z.[\x95V\ +\x00\x00\x00h\x00\x01\x00\x00\x00\x01\x00\x00\x0a\xf1\ +\x00\x00\x01z.[\x95V\ +" + +def qInitResources(): + QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt new file mode 100644 index 000000000..23c52cc43 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt @@ -0,0 +1,16 @@ +Copyright 2011 Kevin Burke unless otherwise noted. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Some content is copyrighted by Twitter, Inc., and also released under an +Apache License; these sections are noted in the source. diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt new file mode 100644 index 000000000..8e3ba0e0a --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2011-2018, Christopher Jeffrey (https://github.com/chjj/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css b/examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css new file mode 100644 index 000000000..24fc2ffe2 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css @@ -0,0 +1,260 @@ +body{ + margin: 0 auto; + font-family: Georgia, Palatino, serif; + color: #444444; + line-height: 1; + max-width: 960px; + padding: 30px; +} +h1, h2, h3, h4 { + color: #111111; + font-weight: 400; +} +h1, h2, h3, h4, h5, p { + margin-bottom: 24px; + padding: 0; +} +h1 { + font-size: 48px; +} +h2 { + font-size: 36px; + /* The bottom margin is small. It's designed to be used with gray meta text + * below a post title. */ + margin: 24px 0 6px; +} +h3 { + font-size: 24px; +} +h4 { + font-size: 21px; +} +h5 { + font-size: 18px; +} +a { + color: #0099ff; + margin: 0; + padding: 0; + vertical-align: baseline; +} +a:hover { + text-decoration: none; + color: #ff6600; +} +a:visited { + color: purple; +} +ul, ol { + padding: 0; + margin: 0; +} +li { + line-height: 24px; +} +li ul, li ul { + margin-left: 24px; +} +p, ul, ol { + font-size: 16px; + line-height: 24px; + max-width: 540px; +} +pre { + padding: 0px 24px; + max-width: 800px; + white-space: pre-wrap; +} +code { + font-family: Consolas, Monaco, Andale Mono, monospace; + line-height: 1.5; + font-size: 13px; +} +aside { + display: block; + float: right; + width: 390px; +} +blockquote { + border-left:.5em solid #eee; + padding: 0 2em; + margin-left:0; + max-width: 476px; +} +blockquote cite { + font-size:14px; + line-height:20px; + color:#bfbfbf; +} +blockquote cite:before { + content: '\2014 \00A0'; +} + +blockquote p { + color: #666; + max-width: 460px; +} +hr { + width: 540px; + text-align: left; + margin: 0 auto 0 0; + color: #999; +} + +/* Code below this line is copyright Twitter Inc. */ + +button, +input, +select, +textarea { + font-size: 100%; + margin: 0; + vertical-align: baseline; + *vertical-align: middle; +} +button, input { + line-height: normal; + *overflow: visible; +} +button::-moz-focus-inner, input::-moz-focus-inner { + border: 0; + padding: 0; +} +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} +input[type=checkbox], input[type=radio] { + cursor: pointer; +} +/* override default chrome & firefox settings */ +input:not([type="image"]), textarea { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +label, +input, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: normal; + margin-bottom: 18px; +} +input[type=checkbox], input[type=radio] { + cursor: pointer; + margin-bottom: 0; +} +input[type=text], +input[type=password], +textarea, +select { + display: inline-block; + width: 210px; + padding: 4px; + font-size: 13px; + font-weight: normal; + line-height: 18px; + height: 18px; + color: #808080; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +select, input[type=file] { + height: 27px; + line-height: 27px; +} +textarea { + height: auto; +} + +/* grey out placeholders */ +:-moz-placeholder { + color: #bfbfbf; +} +::-webkit-input-placeholder { + color: #bfbfbf; +} + +input[type=text], +input[type=password], +select, +textarea { + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} +input[type=text]:focus, input[type=password]:focus, textarea:focus { + outline: none; + border-color: rgba(82, 168, 236, 0.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); +} + +/* buttons */ +button { + display: inline-block; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + line-height: 18px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #0064cd; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd)); + background-image: -moz-linear-gradient(top, #049cdb, #0064cd); + background-image: -ms-linear-gradient(top, #049cdb, #0064cd); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd)); + background-image: -webkit-linear-gradient(top, #049cdb, #0064cd); + background-image: -o-linear-gradient(top, #049cdb, #0064cd); + background-image: linear-gradient(top, #049cdb, #0064cd); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + border: 1px solid #004b9a; + border-bottom-color: #003f81; + -webkit-transition: 0.1s linear all; + -moz-transition: 0.1s linear all; + transition: 0.1s linear all; + border-color: #0064cd #0064cd #003f81; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); +} +button:hover { + color: #fff; + background-position: 0 -15px; + text-decoration: none; +} +button:active { + -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} +button::-moz-focus-inner { + padding: 0; + border: 0; +} diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js b/examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js new file mode 100644 index 000000000..33c02d9cf --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.js @@ -0,0 +1,1514 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/markedjs/marked + */ + +;(function(root) { +'use strict'; + +/** + * Block-Level Grammar + */ + +var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: noop, + hr: /^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/, + nptable: noop, + blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/, + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: '^ {0,3}(?:' // optional indentation + + '<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)' // (1) + + '|comment[^\\n]*(\\n+|$)' // (2) + + '|<\\?[\\s\\S]*?\\?>\\n*' // (3) + + '|<![A-Z][\\s\\S]*?>\\n*' // (4) + + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*' // (5) + + '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)' // (6) + + '|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) open tag + + '|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)' // (7) closing tag + + ')', + def: /^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, + table: noop, + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/, + text: /^[^\n]+/ +}; + +block._label = /(?!\s*\])(?:\\[\[\]]|[^\[\]])+/; +block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/; +block.def = edit(block.def) + .replace('label', block._label) + .replace('title', block._title) + .getRegex(); + +block.bullet = /(?:[*+-]|\d+\.)/; +block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; +block.item = edit(block.item, 'gm') + .replace(/bull/g, block.bullet) + .getRegex(); + +block.list = edit(block.list) + .replace(/bull/g, block.bullet) + .replace('hr', '\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))') + .replace('def', '\\n+(?=' + block.def.source + ')') + .getRegex(); + +block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + + '|track|ul'; +block._comment = /<!--(?!-?>)[\s\S]*?-->/; +block.html = edit(block.html, 'i') + .replace('comment', block._comment) + .replace('tag', block._tag) + .replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/) + .getRegex(); + +block.paragraph = edit(block.paragraph) + .replace('hr', block.hr) + .replace('heading', block.heading) + .replace('lheading', block.lheading) + .replace('tag', block._tag) // pars can be interrupted by type (6) html blocks + .getRegex(); + +block.blockquote = edit(block.blockquote) + .replace('paragraph', block.paragraph) + .getRegex(); + +/** + * Normal Block Grammar + */ + +block.normal = merge({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge({}, block.normal, { + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ +}); + +block.gfm.paragraph = edit(block.paragraph) + .replace('(?!', '(?!' + + block.gfm.fences.source.replace('\\1', '\\2') + '|' + + block.list.source.replace('\\1', '\\3') + '|') + .getRegex(); + +/** + * GFM + Tables Block Grammar + */ + +block.tables = merge({}, block.gfm, { + nptable: /^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/, + table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/ +}); + +/** + * Pedantic grammar + */ + +block.pedantic = merge({}, block.normal, { + html: edit( + '^ *(?:comment *(?:\\n|\\s*$)' + + '|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)' // closed tag + + '|<tag(?:"[^"]*"|\'[^\']*\'|\\s[^\'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))') + .replace('comment', block._comment) + .replace(/tag/g, '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + + '\\b)\\w+(?!:|[^\\w\\s@]*@)\\b') + .getRegex(), + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/ +}); + +/** + * Block Lexer + */ + +function Lexer(options) { + this.tokens = []; + this.tokens.links = {}; + this.options = options || marked.defaults; + this.rules = block.normal; + + if (this.options.pedantic) { + this.rules = block.pedantic; + } else if (this.options.gfm) { + if (this.options.tables) { + this.rules = block.tables; + } else { + this.rules = block.gfm; + } + } +} + +/** + * Expose Block Rules + */ + +Lexer.rules = block; + +/** + * Static Lex Method + */ + +Lexer.lex = function(src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); +}; + +/** + * Preprocessing + */ + +Lexer.prototype.lex = function(src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' ') + .replace(/\u00a0/g, ' ') + .replace(/\u2424/g, '\n'); + + return this.token(src, true); +}; + +/** + * Lexing + */ + +Lexer.prototype.token = function(src, top) { + src = src.replace(/^ +$/gm, ''); + var next, + loose, + cap, + bull, + b, + item, + space, + i, + tag, + l, + isordered, + istask, + ischecked; + + while (src) { + // newline + if (cap = this.rules.newline.exec(src)) { + src = src.substring(cap[0].length); + if (cap[0].length > 1) { + this.tokens.push({ + type: 'space' + }); + } + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + cap = cap[0].replace(/^ {4}/gm, ''); + this.tokens.push({ + type: 'code', + text: !this.options.pedantic + ? cap.replace(/\n+$/, '') + : cap + }); + continue; + } + + // fences (gfm) + if (cap = this.rules.fences.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'code', + lang: cap[2], + text: cap[3] || '' + }); + continue; + } + + // heading + if (cap = this.rules.heading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[1].length, + text: cap[2] + }); + continue; + } + + // table no leading pipe (gfm) + if (top && (cap = this.rules.nptable.exec(src))) { + item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + src = src.substring(cap[0].length); + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = splitCells(item.cells[i], item.header.length); + } + + this.tokens.push(item); + + continue; + } + } + + // hr + if (cap = this.rules.hr.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'hr' + }); + continue; + } + + // blockquote + if (cap = this.rules.blockquote.exec(src)) { + src = src.substring(cap[0].length); + + this.tokens.push({ + type: 'blockquote_start' + }); + + cap = cap[0].replace(/^ *> ?/gm, ''); + + // Pass `top` to keep the current + // "toplevel" state. This is exactly + // how markdown.pl works. + this.token(cap, top); + + this.tokens.push({ + type: 'blockquote_end' + }); + + continue; + } + + // list + if (cap = this.rules.list.exec(src)) { + src = src.substring(cap[0].length); + bull = cap[2]; + isordered = bull.length > 1; + + this.tokens.push({ + type: 'list_start', + ordered: isordered, + start: isordered ? +bull : '' + }); + + // Get each top-level item. + cap = cap[0].match(this.rules.item); + + next = false; + l = cap.length; + i = 0; + + for (; i < l; i++) { + item = cap[i]; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+\.) +/, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (this.options.smartLists && i !== l - 1) { + b = block.bullet.exec(cap[i + 1])[0]; + if (bull !== b && !(bull.length > 1 && b.length > 1)) { + src = cap.slice(i + 1).join('\n') + src; + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + // Check for task list items + istask = /^\[[ xX]\] /.test(item); + ischecked = undefined; + if (istask) { + ischecked = item[1] !== ' '; + item = item.replace(/^\[[ xX]\] +/, ''); + } + + this.tokens.push({ + type: loose + ? 'loose_item_start' + : 'list_item_start', + task: istask, + checked: ischecked + }); + + // Recurse. + this.token(item, false); + + this.tokens.push({ + type: 'list_item_end' + }); + } + + this.tokens.push({ + type: 'list_end' + }); + + continue; + } + + // html + if (cap = this.rules.html.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: this.options.sanitize + ? 'paragraph' + : 'html', + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), + text: cap[0] + }); + continue; + } + + // def + if (top && (cap = this.rules.def.exec(src))) { + src = src.substring(cap[0].length); + if (cap[3]) cap[3] = cap[3].substring(1, cap[3].length - 1); + tag = cap[1].toLowerCase().replace(/\s+/g, ' '); + if (!this.tokens.links[tag]) { + this.tokens.links[tag] = { + href: cap[2], + title: cap[3] + }; + } + continue; + } + + // table (gfm) + if (top && (cap = this.rules.table.exec(src))) { + item = { + type: 'table', + header: splitCells(cap[1].replace(/^ *| *\| *$/g, '')), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3] ? cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') : [] + }; + + if (item.header.length === item.align.length) { + src = src.substring(cap[0].length); + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = splitCells( + item.cells[i].replace(/^ *\| *| *\| *$/g, ''), + item.header.length); + } + + this.tokens.push(item); + + continue; + } + } + + // lheading + if (cap = this.rules.lheading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[2] === '=' ? 1 : 2, + text: cap[1] + }); + continue; + } + + // top-level paragraph + if (top && (cap = this.rules.paragraph.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'paragraph', + text: cap[1].charAt(cap[1].length - 1) === '\n' + ? cap[1].slice(0, -1) + : cap[1] + }); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + // Top-level should never reach here. + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'text', + text: cap[0] + }); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return this.tokens; +}; + +/** + * Inline-Level Grammar + */ + +var inline = { + escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, + autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/, + url: noop, + tag: '^comment' + + '|^</[a-zA-Z][\\w:-]*\\s*>' // self-closing tag + + '|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>' // open tag + + '|^<\\?[\\s\\S]*?\\?>' // processing instruction, e.g. <?php ?> + + '|^<![a-zA-Z]+\\s[\\s\\S]*?>' // declaration, e.g. <!DOCTYPE html> + + '|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>', // CDATA section + link: /^!?\[(label)\]\(href(?:\s+(title))?\s*\)/, + reflink: /^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/, + nolink: /^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/, + strong: /^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/, + em: /^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/, + code: /^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/, + br: /^ {2,}\n(?!\s*$)/, + del: noop, + text: /^[\s\S]+?(?=[\\<!\[`*]|\b_| {2,}\n|$)/ +}; + +inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g; + +inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/; +inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/; +inline.autolink = edit(inline.autolink) + .replace('scheme', inline._scheme) + .replace('email', inline._email) + .getRegex(); + +inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/; + +inline.tag = edit(inline.tag) + .replace('comment', block._comment) + .replace('attribute', inline._attribute) + .getRegex(); + +inline._label = /(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/; +inline._href = /\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/; +inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/; + +inline.link = edit(inline.link) + .replace('label', inline._label) + .replace('href', inline._href) + .replace('title', inline._title) + .getRegex(); + +inline.reflink = edit(inline.reflink) + .replace('label', inline._label) + .getRegex(); + +/** + * Normal Inline Grammar + */ + +inline.normal = merge({}, inline); + +/** + * Pedantic Inline Grammar + */ + +inline.pedantic = merge({}, inline.normal, { + strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, + link: edit(/^!?\[(label)\]\((.*?)\)/) + .replace('label', inline._label) + .getRegex(), + reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/) + .replace('label', inline._label) + .getRegex() +}); + +/** + * GFM Inline Grammar + */ + +inline.gfm = merge({}, inline.normal, { + escape: edit(inline.escape).replace('])', '~|])').getRegex(), + url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/) + .replace('email', inline._email) + .getRegex(), + _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/, + del: /^~~(?=\S)([\s\S]*?\S)~~/, + text: edit(inline.text) + .replace(']|', '~]|') + .replace('|', '|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&\'*+/=?^_`{\\|}~-]+@|') + .getRegex() +}); + +/** + * GFM + Line Breaks Inline Grammar + */ + +inline.breaks = merge({}, inline.gfm, { + br: edit(inline.br).replace('{2,}', '*').getRegex(), + text: edit(inline.gfm.text).replace('{2,}', '*').getRegex() +}); + +/** + * Inline Lexer & Compiler + */ + +function InlineLexer(links, options) { + this.options = options || marked.defaults; + this.links = links; + this.rules = inline.normal; + this.renderer = this.options.renderer || new Renderer(); + this.renderer.options = this.options; + + if (!this.links) { + throw new Error('Tokens array requires a `links` property.'); + } + + if (this.options.pedantic) { + this.rules = inline.pedantic; + } else if (this.options.gfm) { + if (this.options.breaks) { + this.rules = inline.breaks; + } else { + this.rules = inline.gfm; + } + } +} + +/** + * Expose Inline Rules + */ + +InlineLexer.rules = inline; + +/** + * Static Lexing/Compiling Method + */ + +InlineLexer.output = function(src, links, options) { + var inline = new InlineLexer(links, options); + return inline.output(src); +}; + +/** + * Lexing/Compiling + */ + +InlineLexer.prototype.output = function(src) { + var out = '', + link, + text, + href, + title, + cap; + + while (src) { + // escape + if (cap = this.rules.escape.exec(src)) { + src = src.substring(cap[0].length); + out += cap[1]; + continue; + } + + // autolink + if (cap = this.rules.autolink.exec(src)) { + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = escape(this.mangle(cap[1])); + href = 'mailto:' + text; + } else { + text = escape(cap[1]); + href = text; + } + out += this.renderer.link(href, null, text); + continue; + } + + // url (gfm) + if (!this.inLink && (cap = this.rules.url.exec(src))) { + cap[0] = this.rules._backpedal.exec(cap[0])[0]; + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = escape(cap[0]); + href = 'mailto:' + text; + } else { + text = escape(cap[0]); + if (cap[1] === 'www.') { + href = 'http://' + text; + } else { + href = text; + } + } + out += this.renderer.link(href, null, text); + continue; + } + + // tag + if (cap = this.rules.tag.exec(src)) { + if (!this.inLink && /^<a /i.test(cap[0])) { + this.inLink = true; + } else if (this.inLink && /^<\/a>/i.test(cap[0])) { + this.inLink = false; + } + src = src.substring(cap[0].length); + out += this.options.sanitize + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0] + continue; + } + + // link + if (cap = this.rules.link.exec(src)) { + src = src.substring(cap[0].length); + this.inLink = true; + href = cap[2]; + if (this.options.pedantic) { + link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href); + + if (link) { + href = link[1]; + title = link[3]; + } else { + title = ''; + } + } else { + title = cap[3] ? cap[3].slice(1, -1) : ''; + } + href = href.trim().replace(/^<([\s\S]*)>$/, '$1'); + out += this.outputLink(cap, { + href: InlineLexer.escapes(href), + title: InlineLexer.escapes(title) + }); + this.inLink = false; + continue; + } + + // reflink, nolink + if ((cap = this.rules.reflink.exec(src)) + || (cap = this.rules.nolink.exec(src))) { + src = src.substring(cap[0].length); + link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = this.links[link.toLowerCase()]; + if (!link || !link.href) { + out += cap[0].charAt(0); + src = cap[0].substring(1) + src; + continue; + } + this.inLink = true; + out += this.outputLink(cap, link); + this.inLink = false; + continue; + } + + // strong + if (cap = this.rules.strong.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.strong(this.output(cap[4] || cap[3] || cap[2] || cap[1])); + continue; + } + + // em + if (cap = this.rules.em.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.em(this.output(cap[6] || cap[5] || cap[4] || cap[3] || cap[2] || cap[1])); + continue; + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.codespan(escape(cap[2].trim(), true)); + continue; + } + + // br + if (cap = this.rules.br.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.br(); + continue; + } + + // del (gfm) + if (cap = this.rules.del.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.del(this.output(cap[1])); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.text(escape(this.smartypants(cap[0]))); + continue; + } + + if (src) { + throw new Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return out; +}; + +InlineLexer.escapes = function(text) { + return text ? text.replace(InlineLexer.rules._escapes, '$1') : text; +} + +/** + * Compile Link + */ + +InlineLexer.prototype.outputLink = function(cap, link) { + var href = link.href, + title = link.title ? escape(link.title) : null; + + return cap[0].charAt(0) !== '!' + ? this.renderer.link(href, title, this.output(cap[1])) + : this.renderer.image(href, title, escape(cap[1])); +}; + +/** + * Smartypants Transformations + */ + +InlineLexer.prototype.smartypants = function(text) { + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); +}; + +/** + * Mangle Links + */ + +InlineLexer.prototype.mangle = function(text) { + if (!this.options.mangle) return text; + var out = '', + l = text.length, + i = 0, + ch; + + for (; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; +}; + +/** + * Renderer + */ + +function Renderer(options) { + this.options = options || marked.defaults; +} + +Renderer.prototype.code = function(code, lang, escaped) { + if (this.options.highlight) { + var out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '<pre><code>' + + (escaped ? code : escape(code, true)) + + '</code></pre>'; + } + + return '<pre><code class="' + + this.options.langPrefix + + escape(lang, true) + + '">' + + (escaped ? code : escape(code, true)) + + '</code></pre>\n'; +}; + +Renderer.prototype.blockquote = function(quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; +}; + +Renderer.prototype.html = function(html) { + return html; +}; + +Renderer.prototype.heading = function(text, level, raw) { + if (this.options.headerIds) { + return '<h' + + level + + ' id="' + + this.options.headerPrefix + + raw.toLowerCase().replace(/[^\w]+/g, '-') + + '">' + + text + + '</h' + + level + + '>\n'; + } + // ignore IDs + return '<h' + level + '>' + text + '</h' + level + '>\n'; +}; + +Renderer.prototype.hr = function() { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; +}; + +Renderer.prototype.list = function(body, ordered, start) { + var type = ordered ? 'ol' : 'ul', + startatt = (ordered && start !== 1) ? (' start="' + start + '"') : ''; + return '<' + type + startatt + '>\n' + body + '</' + type + '>\n'; +}; + +Renderer.prototype.listitem = function(text) { + return '<li>' + text + '</li>\n'; +}; + +Renderer.prototype.checkbox = function(checked) { + return '<input ' + + (checked ? 'checked="" ' : '') + + 'disabled="" type="checkbox"' + + (this.options.xhtml ? ' /' : '') + + '> '; +} + +Renderer.prototype.paragraph = function(text) { + return '<p>' + text + '</p>\n'; +}; + +Renderer.prototype.table = function(header, body) { + if (body) body = '<tbody>' + body + '</tbody>'; + + return '<table>\n' + + '<thead>\n' + + header + + '</thead>\n' + + body + + '</table>\n'; +}; + +Renderer.prototype.tablerow = function(content) { + return '<tr>\n' + content + '</tr>\n'; +}; + +Renderer.prototype.tablecell = function(content, flags) { + var type = flags.header ? 'th' : 'td'; + var tag = flags.align + ? '<' + type + ' align="' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; +}; + +// span level renderer +Renderer.prototype.strong = function(text) { + return '<strong>' + text + '</strong>'; +}; + +Renderer.prototype.em = function(text) { + return '<em>' + text + '</em>'; +}; + +Renderer.prototype.codespan = function(text) { + return '<code>' + text + '</code>'; +}; + +Renderer.prototype.br = function() { + return this.options.xhtml ? '<br/>' : '<br>'; +}; + +Renderer.prototype.del = function(text) { + return '<del>' + text + '</del>'; +}; + +Renderer.prototype.link = function(href, title, text) { + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)) + .replace(/[^\w:]/g, '') + .toLowerCase(); + } catch (e) { + return text; + } + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { + return text; + } + } + if (this.options.baseUrl && !originIndependentUrl.test(href)) { + href = resolveUrl(this.options.baseUrl, href); + } + try { + href = encodeURI(href).replace(/%25/g, '%'); + } catch (e) { + return text; + } + var out = '<a href="' + escape(href) + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += '>' + text + '</a>'; + return out; +}; + +Renderer.prototype.image = function(href, title, text) { + if (this.options.baseUrl && !originIndependentUrl.test(href)) { + href = resolveUrl(this.options.baseUrl, href); + } + var out = '<img src="' + href + '" alt="' + text + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += this.options.xhtml ? '/>' : '>'; + return out; +}; + +Renderer.prototype.text = function(text) { + return text; +}; + +/** + * TextRenderer + * returns only the textual part of the token + */ + +function TextRenderer() {} + +// no need for block level renderers + +TextRenderer.prototype.strong = +TextRenderer.prototype.em = +TextRenderer.prototype.codespan = +TextRenderer.prototype.del = +TextRenderer.prototype.text = function (text) { + return text; +} + +TextRenderer.prototype.link = +TextRenderer.prototype.image = function(href, title, text) { + return '' + text; +} + +TextRenderer.prototype.br = function() { + return ''; +} + +/** + * Parsing & Compiling + */ + +function Parser(options) { + this.tokens = []; + this.token = null; + this.options = options || marked.defaults; + this.options.renderer = this.options.renderer || new Renderer(); + this.renderer = this.options.renderer; + this.renderer.options = this.options; +} + +/** + * Static Parse Method + */ + +Parser.parse = function(src, options) { + var parser = new Parser(options); + return parser.parse(src); +}; + +/** + * Parse Loop + */ + +Parser.prototype.parse = function(src) { + this.inline = new InlineLexer(src.links, this.options); + // use an InlineLexer with a TextRenderer to extract pure text + this.inlineText = new InlineLexer( + src.links, + merge({}, this.options, {renderer: new TextRenderer()}) + ); + this.tokens = src.reverse(); + + var out = ''; + while (this.next()) { + out += this.tok(); + } + + return out; +}; + +/** + * Next Token + */ + +Parser.prototype.next = function() { + return this.token = this.tokens.pop(); +}; + +/** + * Preview Next Token + */ + +Parser.prototype.peek = function() { + return this.tokens[this.tokens.length - 1] || 0; +}; + +/** + * Parse Text Tokens + */ + +Parser.prototype.parseText = function() { + var body = this.token.text; + + while (this.peek().type === 'text') { + body += '\n' + this.next().text; + } + + return this.inline.output(body); +}; + +/** + * Parse Current Token + */ + +Parser.prototype.tok = function() { + switch (this.token.type) { + case 'space': { + return ''; + } + case 'hr': { + return this.renderer.hr(); + } + case 'heading': { + return this.renderer.heading( + this.inline.output(this.token.text), + this.token.depth, + unescape(this.inlineText.output(this.token.text))); + } + case 'code': { + return this.renderer.code(this.token.text, + this.token.lang, + this.token.escaped); + } + case 'table': { + var header = '', + body = '', + i, + row, + cell, + j; + + // header + cell = ''; + for (i = 0; i < this.token.header.length; i++) { + cell += this.renderer.tablecell( + this.inline.output(this.token.header[i]), + { header: true, align: this.token.align[i] } + ); + } + header += this.renderer.tablerow(cell); + + for (i = 0; i < this.token.cells.length; i++) { + row = this.token.cells[i]; + + cell = ''; + for (j = 0; j < row.length; j++) { + cell += this.renderer.tablecell( + this.inline.output(row[j]), + { header: false, align: this.token.align[j] } + ); + } + + body += this.renderer.tablerow(cell); + } + return this.renderer.table(header, body); + } + case 'blockquote_start': { + body = ''; + + while (this.next().type !== 'blockquote_end') { + body += this.tok(); + } + + return this.renderer.blockquote(body); + } + case 'list_start': { + body = ''; + var ordered = this.token.ordered, + start = this.token.start; + + while (this.next().type !== 'list_end') { + body += this.tok(); + } + + return this.renderer.list(body, ordered, start); + } + case 'list_item_start': { + body = ''; + + if (this.token.task) { + body += this.renderer.checkbox(this.token.checked); + } + + while (this.next().type !== 'list_item_end') { + body += this.token.type === 'text' + ? this.parseText() + : this.tok(); + } + + return this.renderer.listitem(body); + } + case 'loose_item_start': { + body = ''; + + while (this.next().type !== 'list_item_end') { + body += this.tok(); + } + + return this.renderer.listitem(body); + } + case 'html': { + // TODO parse inline content if parameter markdown=1 + return this.renderer.html(this.token.text); + } + case 'paragraph': { + return this.renderer.paragraph(this.inline.output(this.token.text)); + } + case 'text': { + return this.renderer.paragraph(this.parseText()); + } + } +}; + +/** + * Helpers + */ + +function escape(html, encode) { + return html + .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); +} + +function unescape(html) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, function(_, n) { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); +} + +function edit(regex, opt) { + regex = regex.source || regex; + opt = opt || ''; + return { + replace: function(name, val) { + val = val.source || val; + val = val.replace(/(^|[^\[])\^/g, '$1'); + regex = regex.replace(name, val); + return this; + }, + getRegex: function() { + return new RegExp(regex, opt); + } + }; +} + +function resolveUrl(base, href) { + if (!baseUrls[' ' + base]) { + // we can ignore everything in base after the last slash of its path component, + // but we might need to add _that_ + // https://tools.ietf.org/html/rfc3986#section-3 + if (/^[^:]+:\/*[^/]*$/.test(base)) { + baseUrls[' ' + base] = base + '/'; + } else { + baseUrls[' ' + base] = base.replace(/[^/]*$/, ''); + } + } + base = baseUrls[' ' + base]; + + if (href.slice(0, 2) === '//') { + return base.replace(/:[\s\S]*/, ':') + href; + } else if (href.charAt(0) === '/') { + return base.replace(/(:\/*[^/]*)[\s\S]*/, '$1') + href; + } else { + return base + href; + } +} +var baseUrls = {}; +var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i; + +function noop() {} +noop.exec = noop; + +function merge(obj) { + var i = 1, + target, + key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; +} + +function splitCells(tableRow, count) { + var cells = tableRow.replace(/([^\\])\|/g, '$1 |').split(/ +\| */), + i = 0; + + if (cells.length > count) { + cells.splice(count); + } else { + while (cells.length < count) cells.push(''); + } + + for (; i < cells.length; i++) { + cells[i] = cells[i].replace(/\\\|/g, '|'); + } + return cells; +} + +/** + * Marked + */ + +function marked(src, opt, callback) { + // throw error in case of non string input + if (typeof src === 'undefined' || src === null) { + throw new Error('marked(): input parameter is undefined or null'); + } + if (typeof src !== 'string') { + throw new Error('marked(): input parameter is of type ' + + Object.prototype.toString.call(src) + ', string expected'); + } + + if (callback || typeof opt === 'function') { + if (!callback) { + callback = opt; + opt = null; + } + + opt = merge({}, marked.defaults, opt || {}); + + var highlight = opt.highlight, + tokens, + pending, + i = 0; + + try { + tokens = Lexer.lex(src, opt) + } catch (e) { + return callback(e); + } + + pending = tokens.length; + + var done = function(err) { + if (err) { + opt.highlight = highlight; + return callback(err); + } + + var out; + + try { + out = Parser.parse(tokens, opt); + } catch (e) { + err = e; + } + + opt.highlight = highlight; + + return err + ? callback(err) + : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!pending) return done(); + + for (; i < tokens.length; i++) { + (function(token) { + if (token.type !== 'code') { + return --pending || done(); + } + return highlight(token.text, token.lang, function(err, code) { + if (err) return done(err); + if (code == null || code === token.text) { + return --pending || done(); + } + token.text = code; + token.escaped = true; + --pending || done(); + }); + })(tokens[i]); + } + + return; + } + try { + if (opt) opt = merge({}, marked.defaults, opt); + return Parser.parse(Lexer.lex(src, opt), opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + if ((opt || marked.defaults).silent) { + return '<p>An error occurred:</p><pre>' + + escape(e.message + '', true) + + '</pre>'; + } + throw e; + } +} + +/** + * Options + */ + +marked.options = +marked.setOptions = function(opt) { + merge(marked.defaults, opt); + return marked; +}; + +marked.getDefaults = function () { + return { + baseUrl: null, + breaks: false, + gfm: true, + headerIds: true, + headerPrefix: '', + highlight: null, + langPrefix: 'language-', + mangle: true, + pedantic: false, + renderer: new Renderer(), + sanitize: false, + sanitizer: null, + silent: false, + smartLists: false, + smartypants: false, + tables: true, + xhtml: false + }; +} + +marked.defaults = marked.getDefaults(); + +/** + * Expose + */ + +marked.Parser = Parser; +marked.parser = Parser.parse; + +marked.Renderer = Renderer; +marked.TextRenderer = TextRenderer; + +marked.Lexer = Lexer; +marked.lexer = Lexer.lex; + +marked.InlineLexer = InlineLexer; +marked.inlineLexer = InlineLexer.output; + +marked.parse = marked; + +if (typeof module !== 'undefined' && typeof exports === 'object') { + module.exports = marked; +} else if (typeof define === 'function' && define.amd) { + define(function() { return marked; }); +} else { + root.marked = marked; +} +})(this || (typeof window !== 'undefined' ? window : global)); diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json b/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json new file mode 100644 index 000000000..de5458eff --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json @@ -0,0 +1,35 @@ +[ + { + "Id": "markdowneditor-marked", + "Name": "Marked (WebEngine Markdown Editor example)", + "QDocModule": "qtwebengine", + "QtUsage": "Marked is used in the WebEngine MarkDown Editor example", + "QtParts": [ "examples" ], + "Files": "marked.js", + "Description": "A full-featured markdown parser and compiler, written in JavaScript. Built for speed.", + "Homepage": "https://github.com/chjj/marked", + "Version": "0.4.0", + "DownloadLocation": "https://github.com/markedjs/marked/blob/0.4.0/lib/marked.js", + "Copyright": "Copyright (c) 2011-2018, Christopher Jeffrey", + "License": "MIT License", + "LicenseId": "MIT", + "LicenseFile": "MARKED-LICENSE.txt" + }, + { + "Id": "markdowneditor-markdowncss", + "Name": "Markdown.css (WebEngine Markdown Editor example)", + "QDocModule": "qtwebengine", + "QtUsage": "markdown.css is used in the WebEngine MarkDown Editor example", + "QtParts": [ "examples" ], + "Files": "markdown.css", + "Description": "Markdown.css is better default styling for your Markdown files.", + "Homepage": "https://kevinburke.bitbucket.io/markdowncss/", + "Version": "188530e4b5d020d7e237fc6b26be13ebf4a8def3", + "DownloadLocation": "https://bitbucket.org/kevinburke/markdowncss/src/188530e4b5d020d7e237fc6b26be13ebf4a8def3/markdown.css", + "Copyright": "Copyright 2011 Kevin Burke + Copyright Twitter Inc.", + "License": "Apache License 2.0", + "LicenseId": "Apache-2.0", + "LicenseFile": "MARKDOWN-LICENSE.txt" + } +] diff --git a/examples/webenginewidgets/markdowneditor/resources/default.md b/examples/webenginewidgets/markdowneditor/resources/default.md new file mode 100644 index 000000000..d29cdfe60 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/default.md @@ -0,0 +1,12 @@ +## WebEngine Markdown Editor Example + +This example uses [QWebEngineView](https://doc.qt.io/qt-5/qwebengineview.html) +to preview text written using the [Markdown](https://en.wikipedia.org/wiki/Markdown) +syntax. + +### Acknowledgments + +The conversion from Markdown to HTML is done with the help of the +[marked JavaScript library](https://github.com/chjj/marked) by _Christopher Jeffrey_. +The [style sheet](https://kevinburke.bitbucket.io/markdowncss/) +was created by _Kevin Burke_. diff --git a/examples/webenginewidgets/markdowneditor/resources/index.html b/examples/webenginewidgets/markdowneditor/resources/index.html new file mode 100644 index 000000000..c8e30b49b --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/index.html @@ -0,0 +1,32 @@ +<!doctype html> +<html lang="en"> +<meta charset="utf-8"> +<head> + <link rel="stylesheet" type="text/css" href="3rdparty/markdown.css"> + <script src="3rdparty/marked.js"></script> + <script src="qrc:/qtwebchannel/qwebchannel.js"></script> +</head> +<body> + <div id="placeholder"></div> + <script> + 'use strict'; + + var placeholder = document.getElementById('placeholder'); + + var updateText = function(text) { + placeholder.innerHTML = marked.parse(text); + } + + new QWebChannel(qt.webChannelTransport, + function(channel) { + var content = channel.objects.content; + updateText(content.text); + content.textChanged.connect(updateText); + } + ); + </script> +</body> +</html> + + + diff --git a/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc b/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc new file mode 100644 index 000000000..bc738f1cf --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc @@ -0,0 +1,8 @@ +<RCC> + <qresource prefix="/"> + <file>default.md</file> + <file>index.html</file> + <file>3rdparty/markdown.css</file> + <file>3rdparty/marked.js</file> + </qresource> +</RCC> diff --git a/examples/webenginewidgets/markdowneditor/ui_mainwindow.py b/examples/webenginewidgets/markdowneditor/ui_mainwindow.py new file mode 100644 index 000000000..0be769119 --- /dev/null +++ b/examples/webenginewidgets/markdowneditor/ui_mainwindow.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'mainwindow.ui' +## +## Created by: Qt User Interface Compiler version 6.7.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient, + QCursor, QFont, QFontDatabase, QGradient, + QIcon, QImage, QKeySequence, QLinearGradient, + QPainter, QPalette, QPixmap, QRadialGradient, + QTransform) +from PySide6.QtWebEngineWidgets import QWebEngineView +from PySide6.QtWidgets import (QApplication, QHBoxLayout, QMainWindow, QMenu, + QMenuBar, QPlainTextEdit, QSizePolicy, QSplitter, + QStatusBar, QWidget) + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + if not MainWindow.objectName(): + MainWindow.setObjectName(u"MainWindow") + MainWindow.resize(800, 600) + self.actionOpen = QAction(MainWindow) + self.actionOpen.setObjectName(u"actionOpen") + self.actionSave = QAction(MainWindow) + self.actionSave.setObjectName(u"actionSave") + self.actionExit = QAction(MainWindow) + self.actionExit.setObjectName(u"actionExit") + self.actionSaveAs = QAction(MainWindow) + self.actionSaveAs.setObjectName(u"actionSaveAs") + self.actionNew = QAction(MainWindow) + self.actionNew.setObjectName(u"actionNew") + self.centralwidget = QWidget(MainWindow) + self.centralwidget.setObjectName(u"centralwidget") + self.horizontalLayout = QHBoxLayout(self.centralwidget) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.splitter = QSplitter(self.centralwidget) + self.splitter.setObjectName(u"splitter") + self.splitter.setOrientation(Qt.Horizontal) + self.editor = QPlainTextEdit(self.splitter) + self.editor.setObjectName(u"editor") + self.splitter.addWidget(self.editor) + self.preview = QWebEngineView(self.splitter) + self.preview.setObjectName(u"preview") + self.splitter.addWidget(self.preview) + + self.horizontalLayout.addWidget(self.splitter) + + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QMenuBar(MainWindow) + self.menubar.setObjectName(u"menubar") + self.menubar.setGeometry(QRect(0, 0, 800, 26)) + self.menu_File = QMenu(self.menubar) + self.menu_File.setObjectName(u"menu_File") + MainWindow.setMenuBar(self.menubar) + self.statusbar = QStatusBar(MainWindow) + self.statusbar.setObjectName(u"statusbar") + MainWindow.setStatusBar(self.statusbar) + + self.menubar.addAction(self.menu_File.menuAction()) + self.menu_File.addAction(self.actionNew) + self.menu_File.addAction(self.actionOpen) + self.menu_File.addAction(self.actionSave) + self.menu_File.addAction(self.actionSaveAs) + self.menu_File.addSeparator() + self.menu_File.addAction(self.actionExit) + + self.retranslateUi(MainWindow) + + QMetaObject.connectSlotsByName(MainWindow) + # setupUi + + def retranslateUi(self, MainWindow): + MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MarkDown Editor", None)) + self.actionOpen.setText(QCoreApplication.translate("MainWindow", u"&Open...", None)) +#if QT_CONFIG(tooltip) + self.actionOpen.setToolTip(QCoreApplication.translate("MainWindow", u"Open document", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(shortcut) + self.actionOpen.setShortcut(QCoreApplication.translate("MainWindow", u"Ctrl+O", None)) +#endif // QT_CONFIG(shortcut) + self.actionSave.setText(QCoreApplication.translate("MainWindow", u"&Save", None)) +#if QT_CONFIG(tooltip) + self.actionSave.setToolTip(QCoreApplication.translate("MainWindow", u"Save current document", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(shortcut) + self.actionSave.setShortcut(QCoreApplication.translate("MainWindow", u"Ctrl+S", None)) +#endif // QT_CONFIG(shortcut) + self.actionExit.setText(QCoreApplication.translate("MainWindow", u"E&xit", None)) +#if QT_CONFIG(tooltip) + self.actionExit.setToolTip(QCoreApplication.translate("MainWindow", u"Exit editor", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(shortcut) + self.actionExit.setShortcut(QCoreApplication.translate("MainWindow", u"Ctrl+Q", None)) +#endif // QT_CONFIG(shortcut) + self.actionSaveAs.setText(QCoreApplication.translate("MainWindow", u"Save &As...", None)) +#if QT_CONFIG(tooltip) + self.actionSaveAs.setToolTip(QCoreApplication.translate("MainWindow", u"Save document under different name", None)) +#endif // QT_CONFIG(tooltip) + self.actionNew.setText(QCoreApplication.translate("MainWindow", u"&New", None)) +#if QT_CONFIG(tooltip) + self.actionNew.setToolTip(QCoreApplication.translate("MainWindow", u"Create new document", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(shortcut) + self.actionNew.setShortcut(QCoreApplication.translate("MainWindow", u"Ctrl+N", None)) +#endif // QT_CONFIG(shortcut) + self.menu_File.setTitle(QCoreApplication.translate("MainWindow", u"&File", None)) + # retranslateUi + diff --git a/examples/webenginewidgets/notifications/doc/notifications.png b/examples/webenginewidgets/notifications/doc/notifications.png Binary files differnew file mode 100644 index 000000000..3540be8d1 --- /dev/null +++ b/examples/webenginewidgets/notifications/doc/notifications.png diff --git a/examples/webenginewidgets/notifications/doc/notifications.rst b/examples/webenginewidgets/notifications/doc/notifications.rst new file mode 100644 index 000000000..a06ebfbc5 --- /dev/null +++ b/examples/webenginewidgets/notifications/doc/notifications.rst @@ -0,0 +1,8 @@ +WebEngine Notifications Example +=============================== + +Python port of C++ `WebEngine Notifications <https://doc.qt.io/qt-6/qtwebengine-webenginewidgets-notifications-example.html>`_ + +.. image:: notifications.png + :width: 400 + :alt: Notifications Example Screenshot diff --git a/examples/webenginewidgets/notifications/main.py b/examples/webenginewidgets/notifications/main.py new file mode 100644 index 000000000..b59aead97 --- /dev/null +++ b/examples/webenginewidgets/notifications/main.py @@ -0,0 +1,57 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +"""PySide6 WebEngineWidgets Notifications Example""" + +import sys +from pathlib import Path + +from PySide6.QtCore import QUrl, QCoreApplication +from PySide6.QtWidgets import QApplication +from PySide6.QtWebEngineCore import QWebEnginePage +from PySide6.QtWebEngineWidgets import QWebEngineView +from PySide6.QtGui import QDesktopServices + +from notificationpopup import NotificationPopup + + +class WebEnginePage(QWebEnginePage): + def __init__(self, parent): + super().__init__(parent) + + def acceptNavigationRequest(self, url: QUrl, *_): + if url.scheme != "https": + return True + QDesktopServices.openUrl(url) + return False + + +if __name__ == '__main__': + + src_dir = Path(__file__).resolve().parent + QCoreApplication.setOrganizationName("QtProject") + app = QApplication(sys.argv) + view = QWebEngineView() + + # set custom page to open all page's links for https scheme in system browser + view.setPage(WebEnginePage(view)) + + def set_feature_permission(origin: QUrl, feature: QWebEnginePage.Feature): + if feature != QWebEnginePage.Notifications: + return + + view.page().setFeaturePermission(origin, feature, QWebEnginePage.PermissionGrantedByUser) + + view.page().featurePermissionRequested.connect(set_feature_permission) + profile = view.page().profile() + popup = NotificationPopup(view) + + def presentNotification(notification): + popup.present(notification) + + profile.setNotificationPresenter(presentNotification) + view.resize(640, 480) + view.show() + view.setUrl(QUrl.fromLocalFile(src_dir / "resources" / "index.html")) + + sys.exit(app.exec()) diff --git a/examples/webenginewidgets/notifications/notificationpopup.py b/examples/webenginewidgets/notifications/notificationpopup.py new file mode 100644 index 000000000..e68ce3d6f --- /dev/null +++ b/examples/webenginewidgets/notifications/notificationpopup.py @@ -0,0 +1,68 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtCore import Qt, QTimer, QPoint, Slot +from PySide6.QtWidgets import (QWidget, QHBoxLayout, QLabel, QVBoxLayout, QSpacerItem, QSizePolicy, + QPushButton) +from PySide6.QtWebEngineCore import QWebEngineNotification +from PySide6.QtGui import QPixmap, QMouseEvent + + +class NotificationPopup(QWidget): + def __init__(self, parent) -> None: + super().__init__(parent) + self.notification = None + self.m_icon, self.m_title, self.m_message = QLabel(), QLabel(), QLabel() + self.setWindowFlags(Qt.ToolTip) + + rootLayout = QHBoxLayout(self) + rootLayout.addWidget(self.m_icon) + + bodyLayout = QVBoxLayout() + rootLayout.addLayout(bodyLayout) + + titleLayout = QHBoxLayout() + bodyLayout.addLayout(titleLayout) + + titleLayout.addWidget(self.m_title) + titleLayout.addItem(QSpacerItem(0, 0, QSizePolicy.Expanding)) + + close = QPushButton("Close") + titleLayout.addWidget(close) + close.clicked.connect(self.onClosed) + + bodyLayout.addWidget(self.m_message) + self.adjustSize() + + def present(self, newNotification: QWebEngineNotification): + if self.notification: + self.notification.close() + + self.notification = newNotification + + self.m_title.setText("<b>" + self.notification.title() + "</b>") + self.m_message.setText(self.notification.message()) + self.m_icon.setPixmap(QPixmap.fromImage(self.notification.icon()) + .scaledToHeight(self.m_icon.height())) + + self.show() + self.notification.show() + + self.notification.closed.connect(self.onClosed) + QTimer.singleShot(10000, lambda: self.onClosed()) + + self.move(self.parentWidget().mapToGlobal(self.parentWidget().rect().bottomRight() + - QPoint(self.width() + 10, self.height() + 10))) + + @Slot() + def onClosed(self): + self.hide() + if self.notification: + self.notification.close() + self.notification = None + + def mouseReleaseEvent(self, event: QMouseEvent) -> None: + QWidget.mouseReleaseEvent(event) + if self.notification and event.button() == Qt.LeftButton: + self.notification.click() + self.onClosed() diff --git a/examples/webenginewidgets/notifications/notifications.pyproject b/examples/webenginewidgets/notifications/notifications.pyproject new file mode 100644 index 000000000..0a3d3c4c5 --- /dev/null +++ b/examples/webenginewidgets/notifications/notifications.pyproject @@ -0,0 +1,3 @@ +{ + "files": ["main.py", "notificationpopup.py"] +} diff --git a/examples/webenginewidgets/notifications/resources/icon.png b/examples/webenginewidgets/notifications/resources/icon.png Binary files differnew file mode 100644 index 000000000..4c3870c06 --- /dev/null +++ b/examples/webenginewidgets/notifications/resources/icon.png diff --git a/examples/webenginewidgets/notifications/resources/index.html b/examples/webenginewidgets/notifications/resources/index.html new file mode 100644 index 000000000..99dbac683 --- /dev/null +++ b/examples/webenginewidgets/notifications/resources/index.html @@ -0,0 +1,91 @@ +<!doctype html> +<html> +<head> +<title>Web Notifications Example</title> +<script> + var notificationsCreated = 0 + + function getPermission() { return document.Notification } + function resetPermission(permission = 'default') { + document.Notification = permission + document.getElementById('state').value = getPermission() + } + + function createNotification() { + let title = 'Notification #' + ++notificationsCreated + let options = { body: 'Visit doc.qt.io for more info!', icon: 'icon.png', } + + let notification = new Notification(title, options) + document.notification = notification + + notification.onerror = function(error) { + document.getElementById('act').value += ' with error' + document.notification = null + } + notification.onshow = function() { + document.getElementById('act').value += ', shown' + document.getElementById('close').style.display = 'inline' + } + notification.onclick = function() { + document.getElementById('act').value += ', clicked' + } + notification.onclose = function() { + if (document.notification && notification == document.notification) { + document.getElementById('act').value += ' and closed' + document.getElementById('close').style.display = 'none' + document.notification = null + } + } + + console.log('...notification created [Title: ' + title + ']') + document.getElementById('act').value = 'Notification was created' + } + + function onMakeNotification() { + if (getPermission() == 'granted') { + createNotification() + } else if (getPermission() == 'denied') { + setTimeout(function() { + if (window.confirm('Notifications are disabled!\n' + + 'Permission needs to be granted by user. Reset?')) + resetPermission() + }, 1) + } else { + Notification.requestPermission().then(function (permission) { + console.info('notifications request: ' + permission) + resetPermission(permission) + if (permission == 'granted') + createNotification() + }) + } + } + + function closeNotification() { if (document.notification) document.notification.close() } + + document.addEventListener('DOMContentLoaded', function() { + resetPermission(Notification.permission) }) +</script> +</head> +<body style='text-align:center;'> + <h3>Click the button to send a notification</h3> + + <button onclick='onMakeNotification()'>Notify!</button> + + <p> + <output id='act'></output> + <button id='close' style='display: none;' onclick='closeNotification()'>Close</button> + </p><br> + + <p> + <label for='state'>Permission:</label> + <output id='state'></output> + <button onclick='resetPermission()'>Reset</button> + </p><br> + + <h4>More info can be found on:</h4> + <ul style='list-style-type: none;'> + <li>W3 <a href='https://www.w3.org/TR/notifications'>Web Notifications</a> standard</li> + <li>Documentation for <a href='https://doc.qt.io'>Qt WebEngine</a> module</li> + </ul> +</body> +</html> diff --git a/examples/webenginewidgets/simplebrowser/browser.py b/examples/webenginewidgets/simplebrowser/browser.py new file mode 100644 index 000000000..a124ea084 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/browser.py @@ -0,0 +1,69 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtWebEngineCore import (qWebEngineChromiumVersion, + QWebEngineProfile, QWebEngineSettings) +from PySide6.QtCore import QObject, Qt, Slot + +from downloadmanagerwidget import DownloadManagerWidget +from browserwindow import BrowserWindow + + +class Browser(QObject): + + def __init__(self, parent=None): + super().__init__(parent) + self._windows = [] + self._download_manager_widget = DownloadManagerWidget() + self._profile = None + + # Quit application if the download manager window is the only + # remaining window + self._download_manager_widget.setAttribute(Qt.WA_QuitOnClose, False) + + dp = QWebEngineProfile.defaultProfile() + dp.downloadRequested.connect(self._download_manager_widget.download_requested) + + def create_hidden_window(self, offTheRecord=False): + if not offTheRecord and not self._profile: + name = "simplebrowser." + qWebEngineChromiumVersion() + self._profile = QWebEngineProfile(name) + s = self._profile.settings() + s.setAttribute(QWebEngineSettings.PluginsEnabled, True) + s.setAttribute(QWebEngineSettings.DnsPrefetchEnabled, True) + s.setAttribute(QWebEngineSettings.LocalContentCanAccessRemoteUrls, True) + s.setAttribute(QWebEngineSettings.LocalContentCanAccessFileUrls, False) + self._profile.downloadRequested.connect( + self._download_manager_widget.download_requested) + + profile = QWebEngineProfile.defaultProfile() if offTheRecord else self._profile + main_window = BrowserWindow(self, profile, False) + self._windows.append(main_window) + main_window.about_to_close.connect(self._remove_window) + return main_window + + def create_window(self, offTheRecord=False): + main_window = self.create_hidden_window(offTheRecord) + main_window.show() + return main_window + + def create_dev_tools_window(self): + profile = (self._profile if self._profile + else QWebEngineProfile.defaultProfile()) + main_window = BrowserWindow(self, profile, True) + self._windows.append(main_window) + main_window.about_to_close.connect(self._remove_window) + main_window.show() + return main_window + + def windows(self): + return self._windows + + def download_manager_widget(self): + return self._download_manager_widget + + @Slot() + def _remove_window(self): + w = self.sender() + if w in self._windows: + del self._windows[self._windows.index(w)] diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.py b/examples/webenginewidgets/simplebrowser/browserwindow.py new file mode 100644 index 000000000..43b811200 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/browserwindow.py @@ -0,0 +1,500 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import sys + +from PySide6.QtWebEngineCore import QWebEnginePage +from PySide6.QtWidgets import (QMainWindow, QFileDialog, + QInputDialog, QLineEdit, QMenu, QMessageBox, + QProgressBar, QToolBar, QVBoxLayout, QWidget) +from PySide6.QtGui import QAction, QGuiApplication, QIcon, QKeySequence +from PySide6.QtCore import QUrl, Qt, Slot, Signal + +from tabwidget import TabWidget + + +def remove_backspace(keys): + result = keys.copy() + # Chromium already handles navigate on backspace when appropriate. + for i, key in enumerate(result): + if (key[0].key() & Qt.Key_unknown) == Qt.Key_Backspace: + del result[i] + break + return result + + +class BrowserWindow(QMainWindow): + + about_to_close = Signal() + + def __init__(self, browser, profile, forDevTools): + super().__init__() + + self._progress_bar = None + self._history_back_action = None + self._history_forward_action = None + self._stop_action = None + self._reload_action = None + self._stop_reload_action = None + self._url_line_edit = None + self._fav_action = None + self._last_search = "" + self._toolbar = None + + self._browser = browser + self._profile = profile + self._tab_widget = TabWidget(profile, self) + + self._stop_icon = QIcon.fromTheme(QIcon.ThemeIcon.ProcessStop, + QIcon(":process-stop.png")) + self._reload_icon = QIcon.fromTheme(QIcon.ThemeIcon.ViewRefresh, + QIcon(":view-refresh.png")) + + self.setAttribute(Qt.WA_DeleteOnClose, True) + self.setFocusPolicy(Qt.ClickFocus) + + if not forDevTools: + self._progress_bar = QProgressBar(self) + + self._toolbar = self.create_tool_bar() + self.addToolBar(self._toolbar) + mb = self.menuBar() + mb.addMenu(self.create_file_menu(self._tab_widget)) + mb.addMenu(self.create_edit_menu()) + mb.addMenu(self.create_view_menu()) + mb.addMenu(self.create_window_menu(self._tab_widget)) + mb.addMenu(self.create_help_menu()) + + central_widget = QWidget(self) + layout = QVBoxLayout(central_widget) + layout.setSpacing(0) + layout.setContentsMargins(0, 0, 0, 0) + if not forDevTools: + self.addToolBarBreak() + + self._progress_bar.setMaximumHeight(1) + self._progress_bar.setTextVisible(False) + s = "QProgressBar {border: 0px} QProgressBar.chunk {background-color: #da4453}" + self._progress_bar.setStyleSheet(s) + + layout.addWidget(self._progress_bar) + + layout.addWidget(self._tab_widget) + self.setCentralWidget(central_widget) + + self._tab_widget.title_changed.connect(self.handle_web_view_title_changed) + if not forDevTools: + self._tab_widget.link_hovered.connect(self._show_status_message) + self._tab_widget.load_progress.connect(self.handle_web_view_load_progress) + self._tab_widget.web_action_enabled_changed.connect( + self.handle_web_action_enabled_changed) + self._tab_widget.url_changed.connect(self._url_changed) + self._tab_widget.fav_icon_changed.connect(self._fav_action.setIcon) + self._tab_widget.dev_tools_requested.connect(self.handle_dev_tools_requested) + self._url_line_edit.returnPressed.connect(self._address_return_pressed) + self._tab_widget.find_text_finished.connect(self.handle_find_text_finished) + + focus_url_line_edit_action = QAction(self) + self.addAction(focus_url_line_edit_action) + focus_url_line_edit_action.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_L)) + focus_url_line_edit_action.triggered.connect(self._focus_url_lineEdit) + + self.handle_web_view_title_changed("") + self._tab_widget.create_tab() + + @Slot(str) + def _show_status_message(self, m): + self.statusBar().showMessage(m) + + @Slot(QUrl) + def _url_changed(self, url): + self._url_line_edit.setText(url.toDisplayString()) + + @Slot() + def _address_return_pressed(self): + url = QUrl.fromUserInput(self._url_line_edit.text()) + self._tab_widget.set_url(url) + + @Slot() + def _focus_url_lineEdit(self): + self._url_line_edit.setFocus(Qt.ShortcutFocusReason) + + @Slot() + def _new_tab(self): + self._tab_widget.create_tab() + self._url_line_edit.setFocus() + + @Slot() + def _close_current_tab(self): + self._tab_widget.close_tab(self._tab_widget.currentIndex()) + + @Slot() + def _update_close_action_text(self): + last_win = len(self._browser.windows()) == 1 + self._close_action.setText("Quit" if last_win else "Close Window") + + def sizeHint(self): + desktop_rect = QGuiApplication.primaryScreen().geometry() + return desktop_rect.size() * 0.9 + + def create_file_menu(self, tabWidget): + file_menu = QMenu("File") + file_menu.addAction("&New Window", QKeySequence.New, + self.handle_new_window_triggered) + file_menu.addAction("New &Incognito Window", + self.handle_new_incognito_window_triggered) + + new_tab_action = QAction("New Tab", self) + new_tab_action.setShortcuts(QKeySequence.AddTab) + new_tab_action.triggered.connect(self._new_tab) + file_menu.addAction(new_tab_action) + + file_menu.addAction("&Open File...", QKeySequence.Open, + self.handle_file_open_triggered) + file_menu.addSeparator() + + close_tab_action = QAction("Close Tab", self) + close_tab_action.setShortcuts(QKeySequence.Close) + close_tab_action.triggered.connect(self._close_current_tab) + file_menu.addAction(close_tab_action) + + self._close_action = QAction("Quit", self) + self._close_action.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_Q)) + self._close_action.triggered.connect(self.close) + file_menu.addAction(self._close_action) + + file_menu.aboutToShow.connect(self._update_close_action_text) + return file_menu + + @Slot() + def _find_next(self): + tab = self.current_tab() + if tab and self._last_search: + tab.findText(self._last_search) + + @Slot() + def _find_previous(self): + tab = self.current_tab() + if tab and self._last_search: + tab.findText(self._last_search, QWebEnginePage.FindBackward) + + def create_edit_menu(self): + edit_menu = QMenu("Edit") + find_action = edit_menu.addAction("Find") + find_action.setShortcuts(QKeySequence.Find) + find_action.triggered.connect(self.handle_find_action_triggered) + + find_next_action = edit_menu.addAction("Find Next") + find_next_action.setShortcut(QKeySequence.FindNext) + find_next_action.triggered.connect(self._find_next) + + find_previous_action = edit_menu.addAction("Find Previous") + find_previous_action.setShortcut(QKeySequence.FindPrevious) + find_previous_action.triggered.connect(self._find_previous) + return edit_menu + + @Slot() + def _stop(self): + self._tab_widget.trigger_web_page_action(QWebEnginePage.Stop) + + @Slot() + def _reload(self): + self._tab_widget.trigger_web_page_action(QWebEnginePage.Reload) + + @Slot() + def _zoom_in(self): + tab = self.current_tab() + if tab: + tab.setZoomFactor(tab.zoomFactor() + 0.1) + + @Slot() + def _zoom_out(self): + tab = self.current_tab() + if tab: + tab.setZoomFactor(tab.zoomFactor() - 0.1) + + @Slot() + def _reset_zoom(self): + tab = self.current_tab() + if tab: + tab.setZoomFactor(1) + + @Slot() + def _toggle_toolbar(self): + if self._toolbar.isVisible(): + self._view_toolbar_action.setText("Show Toolbar") + self._toolbar.close() + else: + self._view_toolbar_action.setText("Hide Toolbar") + self._toolbar.show() + + @Slot() + def _toggle_statusbar(self): + sb = self.statusBar() + if sb.isVisible(): + self._view_statusbar_action.setText("Show Status Bar") + sb.close() + else: + self._view_statusbar_action.setText("Hide Status Bar") + sb.show() + + def create_view_menu(self): + view_menu = QMenu("View") + self._stop_action = view_menu.addAction("Stop") + shortcuts = [] + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_Period)) + shortcuts.append(QKeySequence(Qt.Key_Escape)) + self._stop_action.setShortcuts(shortcuts) + self._stop_action.triggered.connect(self._stop) + + self._reload_action = view_menu.addAction("Reload Page") + self._reload_action.setShortcuts(QKeySequence.Refresh) + self._reload_action.triggered.connect(self._reload) + + zoom_in = view_menu.addAction("Zoom In") + zoom_in.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_Plus)) + zoom_in.triggered.connect(self._zoom_in) + + zoom_out = view_menu.addAction("Zoom Out") + zoom_out.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_Minus)) + zoom_out.triggered.connect(self._zoom_out) + + reset_zoom = view_menu.addAction("Reset Zoom") + reset_zoom.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_0)) + reset_zoom.triggered.connect(self._reset_zoom) + + view_menu.addSeparator() + self._view_toolbar_action = QAction("Hide Toolbar", self) + self._view_toolbar_action.setShortcut("Ctrl+|") + self._view_toolbar_action.triggered.connect(self._toggle_toolbar) + view_menu.addAction(self._view_toolbar_action) + + self._view_statusbar_action = QAction("Hide Status Bar", self) + self._view_statusbar_action.setShortcut("Ctrl+/") + self._view_statusbar_action.triggered.connect(self._toggle_statusbar) + view_menu.addAction(self._view_statusbar_action) + return view_menu + + @Slot() + def _emit_dev_tools_requested(self): + tab = self.current_tab() + if tab: + tab.dev_tools_requested.emit(tab.page()) + + def create_window_menu(self, tabWidget): + menu = QMenu("Window") + self._next_tab_action = QAction("Show Next Tab", self) + shortcuts = [] + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_BraceRight)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_PageDown)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_BracketRight)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_Less)) + self._next_tab_action.setShortcuts(shortcuts) + self._next_tab_action.triggered.connect(tabWidget.next_tab) + + self._previous_tab_action = QAction("Show Previous Tab", self) + shortcuts.clear() + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_BraceLeft)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_PageUp)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_BracketLeft)) + shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_Greater)) + self._previous_tab_action.setShortcuts(shortcuts) + self._previous_tab_action.triggered.connect(tabWidget.previous_tab) + + self._inspector_action = QAction("Open inspector in window", self) + shortcuts.clear() + shortcuts.append(QKeySequence(Qt.CTRL | Qt.SHIFT | Qt.Key_I)) + self._inspector_action.setShortcuts(shortcuts) + self._inspector_action.triggered.connect(self._emit_dev_tools_requested) + self._window_menu = menu + menu.aboutToShow.connect(self._populate_window_menu) + return menu + + def _populate_window_menu(self): + menu = self._window_menu + menu.clear() + menu.addAction(self._next_tab_action) + menu.addAction(self._previous_tab_action) + menu.addSeparator() + menu.addAction(self._inspector_action) + menu.addSeparator() + windows = self._browser.windows() + index = 0 + title = self.window().windowTitle() + for window in windows: + action = menu.addAction(title, self.handle_show_window_triggered) + action.setData(index) + action.setCheckable(True) + if window == self: + action.setChecked(True) + index += 1 + + def create_help_menu(self): + help_menu = QMenu("Help") + help_menu.addAction("About Qt", qApp.aboutQt) # noqa: F821 + return help_menu + + @Slot() + def _back(self): + self._tab_widget.trigger_web_page_action(QWebEnginePage.Back) + + @Slot() + def _forward(self): + self._tab_widget.trigger_web_page_action(QWebEnginePage.Forward) + + @Slot() + def _stop_reload(self): + a = self._stop_reload_action.data() + self._tab_widget.trigger_web_page_action(QWebEnginePage.WebAction(a)) + + def create_tool_bar(self): + navigation_bar = QToolBar("Navigation") + navigation_bar.setMovable(False) + navigation_bar.toggleViewAction().setEnabled(False) + + self._history_back_action = QAction(self) + back_shortcuts = remove_backspace(QKeySequence.keyBindings(QKeySequence.Back)) + + # For some reason Qt doesn't bind the dedicated Back key to Back. + back_shortcuts.append(QKeySequence(Qt.Key_Back)) + self._history_back_action.setShortcuts(back_shortcuts) + self._history_back_action.setIconVisibleInMenu(False) + back_icon = QIcon.fromTheme(QIcon.ThemeIcon.GoPrevious, + QIcon(":go-previous.png")) + self._history_back_action.setIcon(back_icon) + self._history_back_action.setToolTip("Go back in history") + self._history_back_action.triggered.connect(self._back) + navigation_bar.addAction(self._history_back_action) + + self._history_forward_action = QAction(self) + fwd_shortcuts = remove_backspace(QKeySequence.keyBindings(QKeySequence.Forward)) + fwd_shortcuts.append(QKeySequence(Qt.Key_Forward)) + self._history_forward_action.setShortcuts(fwd_shortcuts) + self._history_forward_action.setIconVisibleInMenu(False) + next_icon = QIcon.fromTheme(QIcon.ThemeIcon.GoNext, + QIcon(":go-next.png")) + self._history_forward_action.setIcon(next_icon) + self._history_forward_action.setToolTip("Go forward in history") + self._history_forward_action.triggered.connect(self._forward) + navigation_bar.addAction(self._history_forward_action) + + self._stop_reload_action = QAction(self) + self._stop_reload_action.triggered.connect(self._stop_reload) + navigation_bar.addAction(self._stop_reload_action) + + self._url_line_edit = QLineEdit(self) + self._fav_action = QAction(self) + self._url_line_edit.addAction(self._fav_action, QLineEdit.LeadingPosition) + self._url_line_edit.setClearButtonEnabled(True) + navigation_bar.addWidget(self._url_line_edit) + + downloads_action = QAction(self) + downloads_action.setIcon(QIcon(":go-bottom.png")) + downloads_action.setToolTip("Show downloads") + navigation_bar.addAction(downloads_action) + dw = self._browser.download_manager_widget() + downloads_action.triggered.connect(dw.show) + + return navigation_bar + + def handle_web_action_enabled_changed(self, action, enabled): + if action == QWebEnginePage.Back: + self._history_back_action.setEnabled(enabled) + elif action == QWebEnginePage.Forward: + self._history_forward_action.setEnabled(enabled) + elif action == QWebEnginePage.Reload: + self._reload_action.setEnabled(enabled) + elif action == QWebEnginePage.Stop: + self._stop_action.setEnabled(enabled) + else: + print("Unhandled webActionChanged signal", file=sys.stderr) + + def handle_web_view_title_changed(self, title): + off_the_record = self._profile.isOffTheRecord() + suffix = ("Qt Simple Browser (Incognito)" if off_the_record + else "Qt Simple Browser") + if title: + self.setWindowTitle(f"{title} - {suffix}") + else: + self.setWindowTitle(suffix) + + def handle_new_window_triggered(self): + window = self._browser.create_window() + window._url_line_edit.setFocus() + + def handle_new_incognito_window_triggered(self): + window = self._browser.create_window(True) + window._url_line_edit.setFocus() + + def handle_file_open_triggered(self): + filter = "Web Resources (*.html *.htm *.svg *.png *.gif *.svgz);;All files (*.*)" + url, _ = QFileDialog.getOpenFileUrl(self, "Open Web Resource", "", filter) + if url: + self.current_tab().setUrl(url) + + def handle_find_action_triggered(self): + if not self.current_tab(): + return + search, ok = QInputDialog.getText(self, "Find", "Find:", + QLineEdit.Normal, self._last_search) + if ok and search: + self._last_search = search + self.current_tab().findText(self._last_search) + + def closeEvent(self, event): + count = self._tab_widget.count() + if count > 1: + m = f"Are you sure you want to close the window?\nThere are {count} tabs open." + ret = QMessageBox.warning(self, "Confirm close", m, + QMessageBox.Yes | QMessageBox.No, + QMessageBox.No) + if ret == QMessageBox.No: + event.ignore() + return + + event.accept() + self.about_to_close.emit() + self.deleteLater() + + def tab_widget(self): + return self._tab_widget + + def current_tab(self): + return self._tab_widget.current_web_view() + + def handle_web_view_load_progress(self, progress): + if 0 < progress and progress < 100: + self._stop_reload_action.setData(QWebEnginePage.Stop) + self._stop_reload_action.setIcon(self._stop_icon) + self._stop_reload_action.setToolTip("Stop loading the current page") + self._progress_bar.setValue(progress) + else: + self._stop_reload_action.setData(QWebEnginePage.Reload) + self._stop_reload_action.setIcon(self._reload_icon) + self._stop_reload_action.setToolTip("Reload the current page") + self._progress_bar.setValue(0) + + def handle_show_window_triggered(self): + action = self.sender() + if action: + offset = action.data() + window = self._browser.windows()[offset] + window.activateWindow() + window.current_tab().setFocus() + + def handle_dev_tools_requested(self, source): + page = self._browser.create_dev_tools_window().current_tab().page() + source.setDevToolsPage(page) + source.triggerAction(QWebEnginePage.InspectElement) + + def handle_find_text_finished(self, result): + sb = self.statusBar() + if result.numberOfMatches() == 0: + sb.showMessage(f'"{self._lastSearch}" not found.') + else: + active = result.activeMatch() + number = result.numberOfMatches() + sb.showMessage(f'"{self._last_search}" found: {active}/{number}') + + def browser(self): + return self._browser diff --git a/examples/webenginewidgets/simplebrowser/certificateerrordialog.ui b/examples/webenginewidgets/simplebrowser/certificateerrordialog.ui new file mode 100644 index 000000000..a97f25b6e --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/certificateerrordialog.ui @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CertificateErrorDialog</class> + <widget class="QDialog" name="CertificateErrorDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>370</width> + <height>141</height> + </rect> + </property> + <property name="windowTitle"> + <string>Dialog</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="leftMargin"> + <number>20</number> + </property> + <property name="rightMargin"> + <number>20</number> + </property> + <item> + <widget class="QLabel" name="m_iconLabel"> + <property name="text"> + <string>Icon</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="m_errorLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Error</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="m_infoLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>If you wish so, you may continue with an unverified certificate. Accepting an unverified certificate mean you may not be connected with the host you tried to connect to. + +Do you wish to override the security check and continue ? </string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>16</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::No|QDialogButtonBox::Yes</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>CertificateErrorDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>CertificateErrorDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/COPYING b/examples/webenginewidgets/simplebrowser/data/3rdparty/COPYING new file mode 100644 index 000000000..220881da6 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/COPYING @@ -0,0 +1 @@ +The icons in this repository are herefore released into the Public Domain. diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/dialog-error.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/dialog-error.png Binary files differnew file mode 100644 index 000000000..cdd95bade --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/dialog-error.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/edit-clear.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/edit-clear.png Binary files differnew file mode 100644 index 000000000..5542948bc --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/edit-clear.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/go-bottom.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-bottom.png Binary files differnew file mode 100644 index 000000000..bf973fedc --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-bottom.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/go-next.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-next.png Binary files differnew file mode 100644 index 000000000..a68e2db77 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-next.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/go-previous.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-previous.png Binary files differnew file mode 100644 index 000000000..c37bc0414 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/go-previous.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/process-stop.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/process-stop.png Binary files differnew file mode 100644 index 000000000..e7a8d1722 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/process-stop.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/qt_attribution.json b/examples/webenginewidgets/simplebrowser/data/3rdparty/qt_attribution.json new file mode 100644 index 000000000..d81f5bf23 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/qt_attribution.json @@ -0,0 +1,24 @@ +{ + "Id": "simplebrowser-tango", + "Name": "Tango Icon Library", + "QDocModule": "qtwebengine", + "QtUsage": "Used in WebEngine SimpleBrowser example.", + + "QtParts": [ "examples" ], + "Description": "Selected icons from the Tango Icon Library", + "Homepage": "http://tango.freedesktop.org/Tango_Icon_Library", + "Version": "0.8.90", + "DownloadLocation": "http://tango.freedesktop.org/releases/tango-icon-theme-0.8.90.tar.gz", + "LicenseId": "urn:dje:license:public-domain", + "License": "Public Domain", + "LicenseFile": "COPYING", + "Copyright": "Ulisse Perusin <uli.peru@gmail.com> +Steven Garrity <sgarrity@silverorange.com> +Lapo Calamandrei <calamandrei@gmail.com> +Ryan Collier <rcollier@novell.com> +Rodney Dawes <dobey@novell.com> +Andreas Nilsson <nisses.mail@home.se> +Tuomas Kuosmanen <tigert@tigert.com> +Garrett LeSage <garrett@novell.com> +Jakub Steiner <jimmac@novell.com>" +} diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/text-html.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/text-html.png Binary files differnew file mode 100644 index 000000000..a896697d7 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/text-html.png diff --git a/examples/webenginewidgets/simplebrowser/data/3rdparty/view-refresh.png b/examples/webenginewidgets/simplebrowser/data/3rdparty/view-refresh.png Binary files differnew file mode 100644 index 000000000..606ea9eba --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/3rdparty/view-refresh.png diff --git a/examples/webenginewidgets/simplebrowser/data/AppLogoColor.png b/examples/webenginewidgets/simplebrowser/data/AppLogoColor.png Binary files differnew file mode 100644 index 000000000..2a4971782 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/AppLogoColor.png diff --git a/examples/webenginewidgets/simplebrowser/data/ninja.png b/examples/webenginewidgets/simplebrowser/data/ninja.png Binary files differnew file mode 100644 index 000000000..e5d7b6fd7 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/ninja.png diff --git a/examples/webenginewidgets/simplebrowser/data/rc_simplebrowser.py b/examples/webenginewidgets/simplebrowser/data/rc_simplebrowser.py new file mode 100644 index 000000000..5d5a3736a --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/rc_simplebrowser.py @@ -0,0 +1,1391 @@ +# Resource object code (Python 3) +# Created by: object code +# Created by: The Resource Compiler for Qt version 6.5.0 +# WARNING! All changes made in this file will be lost! + +from PySide6 import QtCore + +qt_resource_data = b"\ +\x00\x00\x06\xdf\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x06\x96IDATX\x85\xe5\x97[l\x1cW\ +\x19\xc7\x7f3\xb3\xde\xab\xd7^{}\x8d\xe38I\xeb\ +]\xe7\x82\x1b\xa3\xdaN\xda\x105\x12\x17\x89\x0a\x19!\ +\x11\x10O\x01E\x02a\xc4\xe5\xa5\xe2\x01\xa1\xc0\x0b\xbc\ +\x80DE@\x88\x16\xfc\xd0\x82\x84J\xaa\x906\x94\xf4\ +B\xd2`\x92Z\xd8M\x1c\xdb\x91/\xc9:\xb1\x1dg\ +\xed\xb5\xd7;3;\xb3\xbbs\xe3!\xde\xcd\xda^\xbb\ +N%\x9e\xf8\xa4\xa39\xe7\xcc\xd9\xf3\xfd\xe6\xff}\xe7\ +\xb2\xf0\xffn\xc2\xfa\x8e3g\xce|\xc9\xe5r\xf5\x01\ +AI\x92\x10E\x11\xdb\xb6\xb1,\xabPL\xd3,<\ +\x8b\xeb[\xf5\x01\x8ai\x9a'\xfb\xfa\xfa\xce\x16\xfbs\ +m \x12\x84\x97O\x9d:\x15\x5c\xadc\x9a&.\x97\ +\x0b\xc7q\xd6\x8c+no\xb3\x1e\xec\xed\xed}\x19\xd8\ +\x1a\xc0\xb2\xac\x10@,\x16C\x10\x04,\xcb\x22\x10\x08\ +\x90\xcb\xe5\xf2\x80\x08\xc2#\xe1\x8a\xeb\xa5\xday\x90\xba\ +\xba:r\xb9\x5ch\xfd\xbb\x0d\x00\x8e\xe3\x14\x9c\xe4'\ +[_/\xf5\xdc\xcc\xf9G\xd9\x06\x00\xdb\xb6\xd78-\ +v455Ux\xbf\x1d\xa7\x92$\x11\x89D\xd6|\ +\xdc\xb6\x00\xf2*\xac\x07imm\xfd\xdf+`Y\xd6\ +\x9a\x09\x8bU\xf88\x0aD\xa3\xd1B{\xdb\x0a\x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 +\xaf\xfd\x8c\xd6\xde\x08\xd8\xbdS3\xec>\xb1\x09)\xac\ +.\x17B\xa4\x91\xb9,\x85\xd6\x1am\x0c\xda(Z:\ +N\xd3\x9e\xbc\xc0\xa3\x0f\xcd\x1d:*gl\xe1\xcfU\ +\x9b\xff\xca_.\x9f\xac\xfe\xdc=\xde\x13L\xaf3\xa0\ +\x8c\xc2W\x1e\xbe\xf6\x08\xb4\x87\xaf]|\x95Z\x07x\ +(<t\x18\x95\xf0P\xc2E\x91\xba\xde\xee^\xa0\xe6\ +\xd4v&N\xb8\xcd~i\xce\x92\x09\xc3\x9c\xac\xda\x99\ +E\xf6S\xd7D\xc0\x18\x9d\x02S\x1e\xber\xf1\xb5\x1b\ +\x82\x84.|\x02\xe1\xa1\x84\x8f\x16>\x0a\x97\xb8\xdf\xc2\ +\xc5d#\xe7;Nr\xae\xad\x8e\xdd\xc77\xe1Yq\ +\xf1\xea\xbcw\xb2sF\xe4m\x9b\xb9\xdcY\xda\xef\x16\ +h\xad\x08\xb4\x87@\x22\xa5\xc4\x16V\x8a\xaf\x94a\xff\ +\x05\xca\x04tx\x97hK\xb6\x90\xf0\xdb\xd1J\xa1\x95\ +Ish\xfe\xbb\x81;\xf2\xa6\xf3\xf2\xdc%\xb1m\x15\ +%\x1fS||V\xe5\xaa\xe0\x99\xab\x12\xf0\xb5K\xc2\ +k\xc3\x926\x8e\xe3\x10h\x83\x09\x14F\x05\x04\xc6\xc5\ +\xd5q<\x95\xc0\x08\x00\x83\xb4\x09g\x04R?\x1ac\ +\x0cFC\xa0=<\xed\xa2M \x80)\xfdR \xe1\ +\xb5\xd3\xd4V\x8f\x90`9\x12\xcb\x16X\xb6@\xda\x02\ +i\x09\xa4\x04\xe9\xa4\xde\x09\x83\xc0h\x83\x8e\xc0\x85\x01\ +#\xc0\x08\xee\x1e\xff\x04y\xb1\xc9l\xd9\xb1\xae\xb3\xb5\ +\xfd\xe2\xea\xcaU\xc1\x8a\xab\x11\xe86\x17\xd2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 \x09\x8c\xf2\xa1\xac\xa2\xdc=pd\xef\xc1\xfa\x1d\ +\xfe\xa2\xa6\xc3\xfc\x97A4\x8a.\xf4|,\xf7\xe7c\ +\xd2\xbe\x02\x1cdA\x91}!/w\x9c\xdft\xfel\ +\xc9\xa1\xf5\xea\xbdx\x9c\x80\xcb-\x8cH\xfb\xbd\x01\xf7\ +\xa5@\xa6ERF\xb3\xd0\xf5\xaa677-\xdf\xb3\ +Z}E\xf7\x01\x8bT\x1b\xb4A\xeb\x97\xfd\x0f\xcc\x13\ +\x1e)\xc9\x8aX\x89\x00\x00\x00\x00IEND\xaeB\ +`\x82\ +\x00\x00\x04\xef\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x04\xa6IDATX\x85\xed\x97]\x88UU\ +\x14\xc7\x7f{\x9fs\xef\x5c?\x82RqP\xfb\x18\xc3\ +\xac\x87\x14\xcb\xaf\xcaJK\xc8\x87\x12\xc6@\xa3D\x83\ +\x0a\x83\xa0\x82B{\xe9a\xc2zP{\xec\xc1\x08\x09\ +#$\x13\x95\x88P\xc8\xaf\xc1\x994t*1\xa7\xd4\ +1u\x1amrR\x9bf\xee\xd79g\xaf\xd5\xc3\xb9\ +\xf7:\xe3\xdc\x9b\xf7\x12C/m\xd8\xac}\xf69\xe7\ +\xbf~g\xed}\xd6:\x07\xfeo\xffq3\xd5\x5c4\ +o\xb5\xd5Z\x85[7HU\xda~\xb5\x82\xef\xad\xfa\ +\x14'\x11A\x94\xc5i\x84\x93\xb8\x8bF\xf1\xb1\x8b-\ +\x186\xed\xdc\x00d\xab\xd2\xad\x1a ty\x8e]\xd8\ +O\x7f\xee\x0a\xa1\xe4\x09%O\xe4r\x84. (\xd8\ +|\x94a\xd1=/U+\x09\x80\xad\xf6BU%\x92\ +\x00\x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xdd\xf4\xf5\xf7\xb2y\xeb\x87\x12\x06\ +\xe1B\xfc\xe8X\xa5\xfb\xb2)\xf2mMd\xae\x9f\x1f\ +\x92\x8aSi\x9b\xc6\x90+\x8f\x17O\x89hj\xfbW\ +\x9f\xf1\xf2\xf3\xaf\xf1\xc5\xd7[\x5c\x10\xe6=\xeb\xb3\x0b\ +l\x9cm\xca\xa4\x9cT\x9a\x14TS\x0b\x807\x9e\xdb\ +\x90*\xea\x18\x0b\xd6\xc4\xd6X\xc0*\xc6\x98\xd8\x02/\ +4\xae\xf6\xe2\xc8h\x0a\x15\xa4P%E\x04u\xe0D\ +\x10Q>\xd8\xf2N\xd9\xc8\x94\x05\x88$d\xdf\x85\x8d\ +x\xd6\xc3X\xc5\xfa\x03K\xb1\xc3\xa9\xc3\x89\xa0\x02.\ +\x8a\x8b\x95D\x82\x08H\xe4P\x0c\xea\xb4T\x90\x96L\ +[]\xd6yE\x80|\x94a^\xfd\xcak\x13\xa6\x18\ +\x05\x83)F\xc3\x98\xd2\x12\x19S,F\xf1q\x1c\x81\ +xNE\x11)\xad\x89\x0f\x0c\xfal*\x0b\xb0q\xdb\ +\xbb\x15\x89\xffe\xb3\xc4\xd8%\xa2J\x7f/\x16H\x10\ +\x03z\x03\xec\xc0^\x14+\x0a* \x80\xbb\xaeG\x05\ +\x1b\x14\xc6\x83\xb6\xe8\x8d~\x9fL\xc1\xd1@\x08;`\ +\xbexMQT\x0a\xe3\xa2\xe3\xa80W\xf1{\xbd\xaa\ +\xff\xb7*\xef\xad\xfd\x8b\x14\xf8\x1b\xa76\x84\xbb\x5c\xf4\ +\x09<\x00\x00\x00\x00IEND\xaeB`\x82\ +\x00\x00\x07\xe8\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x07\x9fIDATX\x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xe3\x9f\xef\x0e\x5c?\xd5\ +Y\x10\xf3\x0a\xe7\xaf\x86\xf7\x14L*\x96\x1f\xea\xb8\xcf\ +j\xbe~\x84w;\x018\x00l\xcf\x18\x9f\xf1\x98\xec\ +\x01\x98\xde\x22\xb41\xf6X\x16\x82\xba\xf9\xc0N~a\ +AX`l#\xa3\xbc\xaf\xd7\xdf\xf6\xac\xf3B\x19\xf9\ +\xeb\xa4\x7fL\x0a?\x87\x8a\xb1\xd9\x8e\x17.\x14S!\ +F\x01\xb8\x00=\x19HA\xf8^\xaf\x9d\xeeUK\xe4\ +\x85\x0b\x10\xdc\x03\xe0\x15/\x00x!\xbc\xc2N\xfe\xde\ +\x04\x9b\xd1\xbb\xde$k\xbc\xa3 \xee\x85\x98\xf8\x0f\xe4\ +>\xf6_\x84=\xc2\x88m2sv\x00\x00\x00\x00I\ +END\xaeB`\x82\ +\x00\x00\x07\x87\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x07>IDATX\x85\x9d\x97ilT\xd7\ +\x15\xc7\x7fo\x1bw\xc66\x06\xef@\x10I\xb0\x0dF\ +\xd8\xc6\xae\xb1\xc3\x14\x09\xc5U\x95\x0f\xa9\x1aAEi\ ++5!J\xd5\xaa\x12k\x11\x04\x15U\x15\xadZ\xe1\ +\x88\x86\x90\x14\x1a)\xf9\x80\x95D\x09\xf9\x12U\xaaT\ +\xb58\xa8iTZ\x88\xa1j\x95Pd\xeca\x16\xdb\ +\xe3M\xf60\xdb\x9b7o\xeb\x87yo\xc6c\x8fk\ +\xb7W:z\xdb\x99\xfb\xfb\xdfs\xce]F`\x15\xed\ +\x97\xf0}\x01\xdeZ\x8d\xaf\xdb$\xf8\xcd\xcbpd%\ +?a%\x87W\xe0\x07U\xb5\xb5\xaf}\xf7\xd4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\x22\x94\ +Ey\x12\xe5\x89@|\x81\xe7\x8b\x7f\xd6\x94@z\x02\ +\xa9\x04R\x81T\x05\xad\xefST\x0b#\x8db\x19\xdb\ +c\xbe\xee\xbf\x92\xa9\xfd\xfe\xa7}\x89+W\xaf\xea'\ +\x17\xae\xe7\xb6\xb2Y\xa1\xd1\xc0\x81\xf2$\xca\x17(_\ +\xa2|\x89\xf4C\xc79\xe7A\xea\x82\xda)\x88xA\ +\xd4GjC\x09\xc8S-\xbam\xde\x12\x96\x1c\xb3\x87\ +[o$\xba\xee^Z\xf5J\xe9o\xdd\x07\x89\xa7\xff\ +D\xe59YY\xd1\x00\x8e\xb0\x06\x824\x04\xdaau\ +X\x13\xc6\x15\xd8\x0e\xc5\x8eF \x87\x0bG\x89\xf7v\ +\xe8U\xba\xbemOO_\xa2v\xd5Sk#\x9dC\ +\xbfr~\xf0\x97\x80\x84\x17\xd4\xc1{\x1f4\xff\x9b\x99\ +|\x8ci\x14\xbb\x90\x9d\x03l\xef5\x86N|h\xb6\ +e7vn\xfeb\xa0\xa5a\xcd\xaa\xfa\xc8\xed\xe5\xe5\ +\x9c\xee?\x84P&\x97\xe3\xe3\xbbu\x14\xd0\xa1d\xf3\ +$\x93\xf7m\xf3\xec\xe7BR\x0cS$\x1a\xd0\xa7>\ +\xd7\x9fv\x9e\xee\xd9\xf4\xe57-\x03\x83q\xe7\xaa\xca\ +\xeb\x99\xe6\xdf\x12\x0c\xa6\x00I`\x08H\x179\xd5y\ +b\xc2\xb5\x1cF{M\xb8\x11\xbe]\xfc\x8c\xbb \x15\ +\x07/\xa7\xce\xac\x88\xa8\xb2\xb2G\x16<\xa3JT)\ +GcG\xb8\x18\xb3\xef\x17\x9d\xb8\x98D6$W\xd0\ +\x86\xa3\xd5\x80\x0b\x0d\xd8<\xd1\x80w\xeeg\xdd>p\ +\x89\xe5\xce\x1e\xfd\xac\xab;^\xb5\xba\xb6>\x92\x17\x81\ +\xe1\xf0\x16Gp\x98\xd0M\x97\xc2\x7f\xbd\xa7\x86\x1d\x9b\ +p\xb3\x01t2A\xeab\xcc\xb6\x96.\xb81\xbd\xe3\ +\x8f\xf6\x07\x93C\x03\xde\xc5\x98\xddYt\xf2t\x9eL\ +\xee\xd9T\x04\x11\x12\xf7\x00\x7f\xf16\xf5r\xf8\x18\xf1\ +\xc3\xb5\xdcu5\x85)\x8c\x05\x7f\x03\x8dcF\xa6\x8c\ +\x98\x19\x1a\x00\x00\x00\x00IEND\xaeB`\x82\ +\x00\x00\x06\x92\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x06IIDATX\x85\xb5\xd5}l]u\ +\x1d\xc7\xf1\xf79\xf7\xdc\xc7\xf6\xde\xdbvm\xd7\xadv\ +\xed\xba\x95\x87\xb5\x85\xd9\xb1\xb1\x8d=\xb0\x11\x10\xcc\x88\ +\x89\x93\xb1dVS6j\xe2\x031\xe8bD\xd1\x09\ +F\x0d\xa0\x18\xd82\x15\x12\xca@c\xda1\x13\x94\x02\ +\xdbD]]\xd9D\xd9CW\xba\xa7\x92>\xdc\xc7\xde\ +\xb6\xf7\xe1\xdc\xc7\xf3\xe8\x1f\xde\xe2\x9d\x94tv\xeb7\ +\xf9\xe6\xe4wrr\xce\xeb\xf79\xbfs~\x02\x05\xf5\ +\xdc}\xd8)\xb3\xbcd\xc2}\x98h\x02f7\xaa\xf1\ +\xedG\xba\x880G%\x14\x0e\x9e\xdf!\xfd\xa4\xe6\x86\ +[\x1em\xb9\xe7k\xf6\x5c&\x81o\xe0\x98v\xf6\xf8\ +\xeb#\xba\xaa7=\xdaEf.\x00\xd2\x95\x1c\xf3K\ +\xb7\xdc\xd9f?r\xe0\xbb(\xaaFIE\x8d\xb4\xb0\ +\xbeqa\xe0\xc3\xfeV\xd0\x7f3\x17\x00\xb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dIHDR\x00\ +\x00\x00\x90\x00\x00\x00\x90\x08\x06\x00\x00\x00\xe7F\xe2\xb8\ +\x00\x00\x00\x19tEXtSoftware\ +\x00Adobe ImageRead\ +yq\xc9e<\x00\x00\x03(iTXtXML\ +:com.adobe.xmp\x00\x00\ +\x00\x00\x00<?xpacket beg\ +in=\x22\xef\xbb\xbf\x22 id=\x22W5M\ +0MpCehiHzreSzNTc\ +zkc9d\x22?> <x:xmpm\ +eta xmlns:x=\x22ado\ +be:ns:meta/\x22 x:x\ +mptk=\x22Adobe XMP \ +Core 5.6-c067 79\ +.157747, 2015/03\ +/30-23:40:42 \ + \x22> <rdf:RDF \ +xmlns:rdf=\x22http:\ +//www.w3.org/199\ +9/02/22-rdf-synt\ +ax-ns#\x22> <rdf:De\ +scription rdf:ab\ +out=\x22\x22 xmlns:xmp\ +=\x22http://ns.adob\ +e.com/xap/1.0/\x22 \ +xmlns:xmpMM=\x22htt\ +p://ns.adobe.com\ +/xap/1.0/mm/\x22 xm\ +lns:stRef=\x22http:\ +//ns.adobe.com/x\ +ap/1.0/sType/Res\ +ourceRef#\x22 xmp:C\ +reatorTool=\x22Adob\ +e Photoshop CC 2\ +015 (Macintosh)\x22\ + xmpMM:InstanceI\ +D=\x22xmp.iid:A7137\ +DD0390811E5A111E\ +32F6F5F6555\x22 xmp\ +MM:DocumentID=\x22x\ +mp.did:A7137DD13\ +90811E5A111E32F6\ +F5F6555\x22> <xmpMM\ +:DerivedFrom stR\ +ef:instanceID=\x22x\ +mp.iid:A7137DCE3\ +90811E5A111E32F6\ +F5F6555\x22 stRef:d\ +ocumentID=\x22xmp.d\ +id:A7137DCF39081\ +1E5A111E32F6F5F6\ +555\x22/> </rdf:Des\ +cription> </rdf:\ +RDF> </x:xmpmeta\ +> <?xpacket end=\ +\x22r\x22?>\x03\xa0\x95\x84\x00\x00\x14OIDA\ +Tx\xda\xec\x9d\x09t\x94U\x96\x80o\xedK\x92J\ +\x08\xa9$$\x10@$\xec\x10\x10\x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+\x9d2\xf3\x00\xb5\x83\x09\xe7\x92~\x0a7\xb3\xeb\xe3\xc2\ +\xad\x862\x151\xdb8\xde\xc5\x867\xfe\xfd5\xdes\ +8\x1c\xa0\xc00i\xfd\x10M\x86\x9b[I\xee!%\ +\xd6\xb7\xce\xe1Mxx\x891n\xf1\xc5\xabD\xf7\xfb\ +/\xf4K\x18IX\x80D\x80\xc2\x9b\xe6\xf0\x5c\x0bn\ +n\x1b\x027\xd7\xe1\xee \x05\xadVj'\x7f|3\ +)hM\xae\x90r\x8a\x14<&\x8c{\xa0\xce\xfao\ +\xc2NX\xe92\x00u\x00W\xaa\x7fT\x97\xde\xa6\xe8\ +D\x5c \xba <(\xd0\xd0\xa6T\x10H\x9a\xbbj\ +\xdb\xdd\x02\x88\x0b\x97p\xe5\xff\x04\x18\x00\xc3:\x8dd\ +\xf2\x87\x09m\x00\x00\x00\x00IEND\xaeB`\x82\ +\ +\x00\x00\x06\x87\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x19tEXtSoftware\ +\x00Adobe ImageRead\ +yq\xc9e<\x00\x00\x03#iTXtXML\ +:com.adobe.xmp\x00\x00\ +\x00\x00\x00<?xpacket beg\ +in=\x22\xef\xbb\xbf\x22 id=\x22W5M\ +0MpCehiHzreSzNTc\ +zkc9d\x22?> <x:xmpm\ +eta xmlns:x=\x22ado\ +be:ns:meta/\x22 x:x\ +mptk=\x22Adobe XMP \ +Core 5.6-c140 79\ +.160451, 2017/05\ +/06-01:08:21 \ + \x22> <rdf:RDF \ +xmlns:rdf=\x22http:\ +//www.w3.org/199\ +9/02/22-rdf-synt\ +ax-ns#\x22> <rdf:De\ +scription rdf:ab\ +out=\x22\x22 xmlns:xmp\ +=\x22http://ns.adob\ +e.com/xap/1.0/\x22 \ +xmlns:xmpMM=\x22htt\ +p://ns.adobe.com\ +/xap/1.0/mm/\x22 xm\ +lns:stRef=\x22http:\ +//ns.adobe.com/x\ +ap/1.0/sType/Res\ +ourceRef#\x22 xmp:C\ +reatorTool=\x22Adob\ +e Photoshop CC (\ +Macintosh)\x22 xmpM\ +M:InstanceID=\x22xm\ +p.iid:7F517578FC\ +EF11E793C7AB30FF\ +B47C13\x22 xmpMM:Do\ +cumentID=\x22xmp.di\ +d:7F517579FCEF11\ +E793C7AB30FFB47C\ +13\x22> <xmpMM:Deri\ +vedFrom stRef:in\ +stanceID=\x22xmp.ii\ +d:7F517576FCEF11\ +E793C7AB30FFB47C\ +13\x22 stRef:docume\ +ntID=\x22xmp.did:7F\ +517577FCEF11E793\ +C7AB30FFB47C13\x22/\ +> </rdf:Descript\ +ion> </rdf:RDF> \ +</x:xmpmeta> <?x\ +packet end=\x22r\x22?>\ +@\xb2\x97\xa1\x00\x00\x02\xfaIDATx\xda\xacW\ +Ak\x1aA\x14~\xabV*z\x08\xd4@\x0d\x05i\ +\xa99\x05J\x14$ \xb94\xc5KI\xbd\x19\x08H\ +\xb1`1\xc6\x1e\xfa\x07z\xb0\x90\xdc,R\x1b\xa8=\ +Ti+\x18\xf1RA/\xa5\xa5\x16\xa1\x98DC\x0e\ +\x0d\x89\x05/\xb6\x87b\xa5\xa0\xa2P\xa2}\xb3]\xb7\ +\x094\xee\xcc\xee>\xf8|\xeb\xec{\xf3}\xfbfv\ +f\x96\x03F\x0b\x87\xc3W\xd0=D\xdcA\x5c\x17\x9a\ +\xbf\x22\xde\x22\x9e\xc4\xe3\xf1&K\x7f\x1c#\xb9\x1f\xdd\ +3\x84\xe1\x9c\x90>b\x1dE\xbc\xa4\xedS\xcb@\xbe\ +\x8e\xee9\xe2\xc2\x840r\xcf\xe3t:[\x95Je\ +G\xb5\x0a \xb9\x1d\xddg\x09\xf2\xd3\xf6\x1b\xb1\x80\x95\ +\xa8J\x05j(;\x8c1\x90\x8f+\x11S\xa5\x02\xf8\ +\xf4\x0et\xbb \xcf\x9cX\x85\x1d\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 +)!'\x22\xfec?\x11\x11\xc4S\x142\xe2\x04\xf2\ +\x94\xf0\xd4\xcc\xa6\xd1h\xf8\x92\x93=\x82_\x00\x06\x03\ +\x88\xc5b\xd0lJ~\x1e\x90j\xdc%{\xc1=\xb9\ +\xe4Z\xad\x16|>\x1f8\x1c\x0eq'L$\x124\ +\xe4 p~$\x02\x82r\xc8\xf5z=\xf8\xfd~\x98\ +\x9b\x9b\x13\xcf\x04\xc9d\x12\xea\xf5:K7A\x9d\x9c\ +\xc9f0\x18 \x10\x08\x80\xcd\xf6\xef\xad\xccd2\x80\ +\xb3\x9e\xb5\xaby\x1d\xcb\xd7\x111\x93\xc9\x04\xc1`\x10\ +\xacV\xab\xd8V(\x14\xa0\x5c.\xcb\x1aE\x1dK\xf4\ +\xd4\xd4\x14\x84B!\xb0X,b[\xa9T\x02\x5cx\ +d\x1f\x9b\xa9\x05LOO\xf3\xe4f\xb3Yl\xab\xd5\ +j\x90\xcb\xe5@\x89Q\x09\x98\x99\x99\x81\xb5\xb55\xbe\ +\x02c;::\x82T*\x05\xc3\xe1P\x91\x80?\x02\ +\x0c\x00\xae\x14\xfd~;\x03\x1c1\x00\x00\x00\x00IE\ +ND\xaeB`\x82\ +\x00\x00\x06m\ +\x89\ +PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ +\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\ +\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\ +\x00\x00\x06$IDATX\x85\xc5\x97]l\x1cW\ +\x15\x80\xbf{g\xf6\xd7\xeb\xdd\xecn\xd7v\x8a\x93\xaa\ +\x09N\xec@\xab\xa4\x15\x85\x22\x81\x08/\xfd\xaf\xa1\xa1\ +\x91\xa8\xaa*o}\x02\xa9\x02\xc1\x03\x0fHH\xbc!\ +\xc4\x8f\xfaP\xde\xc2\x03Q\xd3\xa2\x22\xa52\xa9x\xa8\ +\x10T\x94\x86\xa8\xad\xed\xc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xd3\xebt\xde\ +\xf7p\xde\xa4\xf3\x9fQ\xddM\x09\xd2t\xbe\xdb\xc2L\ +\xa4\x839\x15H\x02\x88\xd3\xf9_a\x02\xa3\x1e\xe0\x02\ +M:)\x0f%t\xbc\xd9\xef\xfcN\x00\xd1\xe7\xb1\xc0\ +a\x0aH\x06\x8e\xe3\x81\xde\x06\xfc\x08@\x1bh\x05\x8e\ +\xdd@7\xe04:\xfe\x03\xe7\x9a\x10E\xb3\x99\xaa\x5c\ +\x00\x00\x00\x00IEND\xaeB`\x82\ +" + +qt_resource_name = b"\ +\x00\x0d\ +\x0e\xa1\xb1G\ +\x00t\ +\x00e\x00x\x00t\x00-\x00h\x00t\x00m\x00l\x00.\x00p\x00n\x00g\ +\x00\x0b\ +\x0c+\x1f\xc7\ +\x00g\ +\x00o\x00-\x00n\x00e\x00x\x00t\x00.\x00p\x00n\x00g\ +\x00\x0d\ +\x07\x1b{\x87\ +\x00g\ +\x00o\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00.\x00p\x00n\x00g\ +\x00\x10\ +\x08\x15\x13g\ +\x00v\ +\x00i\x00e\x00w\x00-\x00r\x00e\x00f\x00r\x00e\x00s\x00h\x00.\x00p\x00n\x00g\ +\x00\x10\ +\x08\xea\xfbg\ +\x00p\ +\x00r\x00o\x00c\x00e\x00s\x00s\x00-\x00s\x00t\x00o\x00p\x00.\x00p\x00n\x00g\ +\x00\x0f\ +\x0e6v\xc7\ +\x00g\ +\x00o\x00-\x00p\x00r\x00e\x00v\x00i\x00o\x00u\x00s\x00.\x00p\x00n\x00g\ +\x00\x0e\ +\x0d\x8b9\xe7\ +\x00e\ +\x00d\x00i\x00t\x00-\x00c\x00l\x00e\x00a\x00r\x00.\x00p\x00n\x00g\ +\x00\x10\ +\x05\xcb%G\ +\x00A\ +\x00p\x00p\x00L\x00o\x00g\x00o\x00C\x00o\x00l\x00o\x00r\x00.\x00p\x00n\x00g\ +\x00\x09\ +\x05\x04\xbdG\ +\x00n\ +\x00i\x00n\x00j\x00a\x00.\x00p\x00n\x00g\ +\x00\x10\ +\x0f\xcb\x90g\ +\x00d\ +\x00i\x00a\x00l\x00o\x00g\x00-\x00e\x00r\x00r\x00o\x00r\x00.\x00p\x00n\x00g\ +" + +qt_resource_struct = b"\ +\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0a\x00\x00\x00\x01\ +\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x01\x14\x00\x00\x00\x00\x00\x01\x00\x00CC\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00\xee\x00\x00\x00\x00\x00\x01\x00\x00+^\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00<\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xaa\ +\x00\x00\x01\x83\x17\xd5\xbe\xb7\ +\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x10\x9d\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00\x82\x00\x00\x00\x00\x00\x01\x00\x00\x18\x89\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00 \x00\x00\x00\x00\x00\x01\x00\x00\x06\xe3\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00\xcc\x00\x00\x00\x00\x00\x01\x00\x00$\xc8\ +\x00\x00\x01\x83\x17\xd5\xbe\xb7\ +\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x01\x00\x00 \x14\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01\x83\x17\xd5\xbe\xbb\ +\x00\x00\x01,\x00\x00\x00\x00\x00\x01\x00\x00I\xce\ +\x00\x00\x01\x83\x17\xd5\xbe\xb7\ +" + +def qInitResources(): + QtCore.qRegisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +def qCleanupResources(): + QtCore.qUnregisterResourceData(0x03, qt_resource_struct, qt_resource_name, qt_resource_data) + +qInitResources() diff --git a/examples/webenginewidgets/simplebrowser/data/simplebrowser.qrc b/examples/webenginewidgets/simplebrowser/data/simplebrowser.qrc new file mode 100644 index 000000000..eda8e3f3d --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/data/simplebrowser.qrc @@ -0,0 +1,16 @@ +<RCC> + <qresource prefix="/"> + <file>AppLogoColor.png</file> + <file>ninja.png</file> + </qresource> + <qresource prefix="/"> + <file alias="dialog-error.png">3rdparty/dialog-error.png</file> + <file alias="edit-clear.png">3rdparty/edit-clear.png</file> + <file alias="go-bottom.png">3rdparty/go-bottom.png</file> + <file alias="go-next.png">3rdparty/go-next.png</file> + <file alias="go-previous.png">3rdparty/go-previous.png</file> + <file alias="process-stop.png">3rdparty/process-stop.png</file> + <file alias="text-html.png">3rdparty/text-html.png</file> + <file alias="view-refresh.png">3rdparty/view-refresh.png</file> + </qresource> +</RCC> diff --git a/examples/webenginewidgets/simplebrowser/doc/simplebrowser.rst b/examples/webenginewidgets/simplebrowser/doc/simplebrowser.rst index 83dd109c5..abe707670 100644 --- a/examples/webenginewidgets/simplebrowser/doc/simplebrowser.rst +++ b/examples/webenginewidgets/simplebrowser/doc/simplebrowser.rst @@ -1,8 +1,177 @@ -Simple Browser Example -====================== +Simple Browser +============== -A simple browser based on Qt WebEngine Widgets. +Simple Browser demonstrates how to use the Qt WebEngine Widgets classes to +develop a small Web browser application that contains the following elements: -.. image:: simplebrowser.png - :width: 400 +- Menu bar for opening stored pages and managing windows and tabs. +- Navigation bar for entering a URL and for moving backward and + forward in the web page browsing history. +- Multi-tab area for displaying web content within tabs. +- Status bar for displaying hovered links. +- A simple download manager. + +The web content can be opened in new tabs or separate windows. HTTP and +proxy authentication can be used for accessing web pages. + +Class Hierarchy ++++++++++++++++ + +We will implement the following main classes: + +- ``Browser`` is a class managing the application windows. +- ``BrowserWindow`` is a ``QMainWindow`` showing the menu, a navigation + bar, ``TabWidget``, and a status bar. +- ``TabWidget`` is a ``QTabWidget`` and contains one or multiple + browser tabs. +- ``WebView`` is a ``QWebEngineView``, provides a view for ``WebPage``, + and is added as a tab in ``TabWidget``. +- ``WebPage`` is a ``QWebEnginePage`` that represents website content. + +Additionally, we will implement some auxiliary classes: + +- ``WebPopupWindow`` is a ``QWidget`` for showing popup windows. +- ``DownloadManagerWidget`` is a ``QWidget`` implementing the downloads + list. + +Creating the Browser Main Window +++++++++++++++++++++++++++++++++ + +This example supports multiple main windows that are owned by a ``Browser`` +object. This class also owns the ``DownloadManagerWidget`` and could be used +for further functionality, such as bookmarks and history managers. + +In ``main.cpp``, we create the first ``BrowserWindow`` instance and add it +to the ``Browser`` object. If no arguments are passed on the command line, +we open the Qt Homepage. + +To suppress flicker when switching the window to OpenGL rendering, we call +show after the first browser tab has been added. + +Creating Tabs ++++++++++++++ + +The ``BrowserWindow`` constructor initializes all the necessary user interface +related objects. The centralWidget of ``BrowserWindow`` contains an instance of +``TabWidget``. The ``TabWidget`` contains one or several ``WebView`` instances +as tabs, and delegates it's signals and slots to the currently selected one. + +In ``TabWidget.setup_view()``, we make sure that the ``TabWidget`` always +forwards the signals of the currently selected ``WebView``. + +Implementing WebView Functionality +++++++++++++++++++++++++++++++++++ + +The class ``WebView`` is derived from ``QWebEngineView`` to support the +following functionality: + +- Displaying error messages in case the render process dies +- Handling ``createWindow()`` requests +- Adding custom menu items to context menus + +Managing WebWindows +------------------- + +The loaded page might want to create windows of the type +``QWebEnginePage.WebWindowType``, for example, when a JavaScript program requests +to open a document in a new window or dialog. This is handled by overriding +``QWebView.createWindow()``. + +In case of ``QWebEnginePage.WebDialog``, we create an instance of a custom +``WebPopupWindow`` class. + +Adding Context Menu Items +------------------------- + +We add a menu item to the context menu, so that users can right-click to have +an inspector opened in a new window. We override +``QWebEngineView.contextMenuEvent()`` and use +``QWebEnginePage.createStandardContextMenu()`` to create a default ``QMenu`` +with a default list of ``QWebEnginePage.WebAction`` actions. + +Implementing WebPage and WebView Functionality ++++++++++++++++++++++++++++++++++++++++++++++++ + +We implement ``WebPage`` as a subclass of ``QWebEnginePage`` and ``WebView`` as +as subclass of ``QWebEngineView`` to enable HTTP, proxy authentication, as well +as ignoring SSL certificate errors when accessing web pages. + +In all the cases above, we display the appropriate dialog to the user. In +case of authentication, we need to set the correct credential values on the +QAuthenticator object. + +The ``handleProxyAuthenticationRequired`` signal handler implements the very same +steps for the authentication of HTTP proxies. + +In case of SSL errors, we just need to return a boolean value indicating +whether the certificate should be ignored. + +Opening a Web Page +++++++++++++++++++ + +This section describes the workflow for opening a new page. When the user +enters a URL in the navigation bar and presses Enter, the +``QLineEdit.:returnPressed()`` signal is emitted and the new URL is then handed +over to ``TabWidget.set_url()``. + +The call is forwarded to the currently selected tab. + +The ``set_url()`` method of ``WebView`` just forwards the url to the associated +``WebPage``, which in turn starts the downloading of the page's content in the +background. + +Implementing Private Browsing ++++++++++++++++++++++++++++++ + +*Private browsing*, *incognito mode*, or *off-the-record* mode is a feature of +many browsers where normally persistent data, such as cookies, the HTTP cache, +or browsing history, is kept only in memory, leaving no trace on disk. In this +example we will implement private browsing on the window level with tabs in one +window all in either normal or private mode. Alternatively we could implement +private browsing on the tab-level, with some tabs in a window in normal mode, +others in private mode. + +Implementing private browsing is quite easy using Qt WebEngine. All one has to +do is to create a new ``QWebEngineProfile`` and use it in the +``QWebEnginePage`` instead of the default profile. In the example, this new +profile is owned by the ``Browser`` object. + +The required profile for *private browsing* is created together with its first +window. The default constructor for ``QWebEngineProfile`` already puts it in +*off-the-record* mode. + +All that is left to do is to pass the appropriate profile down to the +appropriate ``QWebEnginePage`` objects. The ``Browser`` object will hand to +each new ``BrowserWindow`` either the global default profile or one shared +*off-the-record* profile instance. + +The ``BrowserWindow`` and ``TabWidget`` objects will then ensure that all +``QWebEnginePage`` objects contained in a window will use this profile. + +Managing Downloads +++++++++++++++++++ + +Downloads are associated with a ``QWebEngineProfile``. Whenever a download is +triggered on a web page the ``QWebEngineProfile.downloadRequested`` signal is +emitted with a ``QWebEngineDownloadRequest``, which in this example is +forwarded to ``DownloadManagerWidget.download_requested()``. + +This method prompts the user for a file name (with a pre-filled suggestion) and +starts the download (unless the user cancels the ``Save As`` dialog). + +The ``QWebEngineDownloadRequest`` object will periodically emit the +``QWebEngineDownloadRequest.receivedBytesChanged()`` signal to notify potential +observers of the download progress and the +``QWebEngineDownloadRequest.stateChanged()`` signal when the download is +finished or when an error occurs. + +Files and Attributions +++++++++++++++++++++++ + +The example uses icons from the `Tango Icon Library`_. + +.. image:: simplebrowser.webp + :width: 800 :alt: Simple Browser Screenshot + +.. _`Tango Icon Library`: http://tango.freedesktop.org/Tango_Icon_Library diff --git a/examples/webenginewidgets/simplebrowser/doc/simplebrowser.webp b/examples/webenginewidgets/simplebrowser/doc/simplebrowser.webp Binary files differnew file mode 100644 index 000000000..0edc72c0b --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/doc/simplebrowser.webp diff --git a/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.py b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.py new file mode 100644 index 000000000..7096b8b57 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.py @@ -0,0 +1,51 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtWebEngineCore import QWebEngineDownloadRequest +from PySide6.QtWidgets import QWidget, QFileDialog +from PySide6.QtCore import QDir, QFileInfo, Qt + +from downloadwidget import DownloadWidget +from ui_downloadmanagerwidget import Ui_DownloadManagerWidget + + +# Displays a list of downloads. +class DownloadManagerWidget(QWidget): + + def __init__(self, parent=None): + super().__init__(parent) + self._ui = Ui_DownloadManagerWidget() + self._num_downloads = 0 + self._ui.setupUi(self) + + def download_requested(self, download): + assert (download and download.state() == QWebEngineDownloadRequest.DownloadRequested) + + proposal_dir = download.downloadDirectory() + proposal_name = download.downloadFileName() + proposal = QDir(proposal_dir).filePath(proposal_name) + path, _ = QFileDialog.getSaveFileName(self, "Save as", proposal) + if not path: + return + + fi = QFileInfo(path) + download.setDownloadDirectory(fi.path()) + download.setDownloadFileName(fi.fileName()) + download.accept() + self.add(DownloadWidget(download)) + + self.show() + + def add(self, downloadWidget): + downloadWidget.remove_clicked.connect(self.remove) + self._ui.m_itemsLayout.insertWidget(0, downloadWidget, 0, Qt.AlignTop) + if self._num_downloads == 0: + self._ui.m_zeroItemsLabel.hide() + self._num_downloads += 1 + + def remove(self, downloadWidget): + self._ui.m_itemsLayout.removeWidget(downloadWidget) + downloadWidget.deleteLater() + self._num_downloads -= 1 + if self._num_downloads == 0: + self._ui.m_zeroItemsLabel.show() diff --git a/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.ui b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.ui new file mode 100644 index 000000000..b7544ac16 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.ui @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DownloadManagerWidget</class> + <widget class="QWidget" name="DownloadManagerWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>212</height> + </rect> + </property> + <property name="windowTitle"> + <string>Downloads</string> + </property> + <property name="styleSheet"> + <string notr="true">#DownloadManagerWidget { + background: palette(button) +}</string> + </property> + <layout class="QVBoxLayout" name="m_topLevelLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetNoConstraint</enum> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QScrollArea" name="m_scrollArea"> + <property name="styleSheet"> + <string notr="true">#m_scrollArea { + margin: 2px; + border: none; +}</string> + </property> + <property name="verticalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOn</enum> + </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAlwaysOff</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <widget class="QWidget" name="m_items"> + <property name="styleSheet"> + <string notr="true">#m_items {background: palette(mid)}</string> + </property> + <layout class="QVBoxLayout" name="m_itemsLayout"> + <property name="spacing"> + <number>2</number> + </property> + <property name="leftMargin"> + <number>3</number> + </property> + <property name="topMargin"> + <number>3</number> + </property> + <property name="rightMargin"> + <number>3</number> + </property> + <property name="bottomMargin"> + <number>3</number> + </property> + <item> + <widget class="QLabel" name="m_zeroItemsLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true">color: palette(shadow)</string> + </property> + <property name="text"> + <string>No downloads</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/examples/webenginewidgets/simplebrowser/downloadwidget.py b/examples/webenginewidgets/simplebrowser/downloadwidget.py new file mode 100644 index 000000000..3b4973cb8 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/downloadwidget.py @@ -0,0 +1,109 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from ui_downloadwidget import Ui_DownloadWidget + +from PySide6.QtWebEngineCore import QWebEngineDownloadRequest +from PySide6.QtWidgets import QFrame, QWidget +from PySide6.QtGui import QIcon +from PySide6.QtCore import QElapsedTimer, Signal, Slot + + +def with_unit(bytes): + if bytes < (1 << 10): + return f"{bytes} B" + if bytes < (1 << 20): + s = bytes / (1 << 10) + return f"{int(s)} KiB" + if bytes < (1 << 30): + s = bytes / (1 << 20) + return f"{int(s)} MiB" + s = bytes / (1 << 30) + return f"{int(s)} GiB" + + +class DownloadWidget(QFrame): + """Displays one ongoing or finished download (QWebEngineDownloadRequest).""" + + # This signal is emitted when the user indicates that they want to remove + # this download from the downloads list. + remove_clicked = Signal(QWidget) + + def __init__(self, download, parent=None): + super().__init__(parent) + self._download = download + self._time_added = QElapsedTimer() + self._time_added.start() + self._cancel_icon = QIcon.fromTheme(QIcon.ThemeIcon.ProcessStop, + QIcon(":process-stop.png")) + self._remove_icon = QIcon.fromTheme(QIcon.ThemeIcon.EditClear, + QIcon(":edit-clear.png")) + + self._ui = Ui_DownloadWidget() + self._ui.setupUi(self) + self._ui.m_dstName.setText(self._download.downloadFileName()) + self._ui.m_srcUrl.setText(self._download.url().toDisplayString()) + + self._ui.m_cancelButton.clicked.connect(self._canceled) + + self._download.totalBytesChanged.connect(self.update_widget) + self._download.receivedBytesChanged.connect(self.update_widget) + + self._download.stateChanged.connect(self.update_widget) + + self.update_widget() + + @Slot() + def _canceled(self): + state = self._download.state() + if state == QWebEngineDownloadRequest.DownloadInProgress: + self._download.cancel() + else: + self.remove_clicked.emit(self) + + def update_widget(self): + total_bytes_v = self._download.totalBytes() + total_bytes = with_unit(total_bytes_v) + received_bytes_v = self._download.receivedBytes() + received_bytes = with_unit(received_bytes_v) + elapsed = self._time_added.elapsed() + bytes_per_second_v = received_bytes_v / elapsed * 1000 if elapsed else 0 + bytes_per_second = with_unit(bytes_per_second_v) + + state = self._download.state() + + progress_bar = self._ui.m_progressBar + if state == QWebEngineDownloadRequest.DownloadInProgress: + if total_bytes_v > 0: + progress = round(100 * received_bytes_v / total_bytes_v) + progress_bar.setValue(progress) + progress_bar.setDisabled(False) + fmt = f"%p% - {received_bytes} of {total_bytes} downloaded - {bytes_per_second}/s" + progress_bar.setFormat(fmt) + else: + progress_bar.setValue(0) + progress_bar.setDisabled(False) + fmt = f"unknown size - {received_bytes} downloaded - {bytes_per_second}/s" + progress_bar.setFormat(fmt) + elif state == QWebEngineDownloadRequest.DownloadCompleted: + progress_bar.setValue(100) + progress_bar.setDisabled(True) + fmt = f"completed - {received_bytes} downloaded - {bytes_per_second}/s" + progress_bar.setFormat(fmt) + elif state == QWebEngineDownloadRequest.DownloadCancelled: + progress_bar.setValue(0) + progress_bar.setDisabled(True) + fmt = f"cancelled - {received_bytes} downloaded - {bytes_per_second}/s" + progress_bar.setFormat(fmt) + elif state == QWebEngineDownloadRequest.DownloadInterrupted: + progress_bar.setValue(0) + progress_bar.setDisabled(True) + fmt = "interrupted: " + self._download.interruptReasonString() + progress_bar.setFormat(fmt) + + if state == QWebEngineDownloadRequest.DownloadInProgress: + self._ui.m_cancelButton.setIcon(self._cancel_icon) + self._ui.m_cancelButton.setToolTip("Stop downloading") + else: + self._ui.m_cancelButton.setIcon(self._remove_icon) + self._ui.m_cancelButton.setToolTip("Remove from list") diff --git a/examples/webenginewidgets/simplebrowser/downloadwidget.ui b/examples/webenginewidgets/simplebrowser/downloadwidget.ui new file mode 100644 index 000000000..47f621486 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/downloadwidget.ui @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DownloadWidget</class> + <widget class="QFrame" name="DownloadWidget"> + <property name="styleSheet"> + <string notr="true">#DownloadWidget { + background: palette(button); + border: 1px solid palette(dark); + margin: 0px; +}</string> + </property> + <layout class="QGridLayout" name="m_topLevelLayout"> + <property name="sizeConstraint"> + <enum>QLayout::SetMinAndMaxSize</enum> + </property> + <item row="0" column="0"> + <widget class="QLabel" name="m_dstName"> + <property name="styleSheet"> + <string notr="true">font-weight: bold +</string> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QPushButton" name="m_cancelButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"/> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { + margin: 1px; + border: none; +} +QPushButton:pressed { + margin: none; + border: 1px solid palette(shadow); + background: palette(midlight); +}</string> + </property> + <property name="flat"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="0" colspan="2"> + <widget class="QLabel" name="m_srcUrl"> + <property name="maximumSize"> + <size> + <width>350</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item row="2" column="0" colspan="2"> + <widget class="QProgressBar" name="m_progressBar"> + <property name="styleSheet"> + <string notr="true">font-size: 12px</string> + </property> + <property name="value"> + <number>24</number> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/examples/webenginewidgets/simplebrowser/main.py b/examples/webenginewidgets/simplebrowser/main.py new file mode 100644 index 000000000..781ec29eb --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/main.py @@ -0,0 +1,45 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +"""PySide6 port of the Qt WebEngineWidgets Simple Browser example from Qt v6.x""" + +import sys +from argparse import ArgumentParser, RawTextHelpFormatter + +from PySide6.QtWebEngineCore import QWebEngineProfile, QWebEngineSettings +from PySide6.QtWidgets import QApplication +from PySide6.QtGui import QIcon +from PySide6.QtCore import QCoreApplication, QLoggingCategory, QUrl + +from browser import Browser + +import data.rc_simplebrowser # noqa: F401 + +if __name__ == "__main__": + parser = ArgumentParser(description="Qt Widgets Web Browser", + formatter_class=RawTextHelpFormatter) + parser.add_argument("--single-process", "-s", action="store_true", + help="Run in single process mode (trouble shooting)") + parser.add_argument("url", type=str, nargs="?", help="URL") + args = parser.parse_args() + + QCoreApplication.setOrganizationName("QtExamples") + + app_args = sys.argv + if args.single_process: + app_args.extend(["--webEngineArgs", "--single-process"]) + app = QApplication(app_args) + app.setWindowIcon(QIcon(":AppLogoColor.png")) + QLoggingCategory.setFilterRules("qt.webenginecontext.debug=true") + + s = QWebEngineProfile.defaultProfile().settings() + s.setAttribute(QWebEngineSettings.PluginsEnabled, True) + s.setAttribute(QWebEngineSettings.DnsPrefetchEnabled, True) + + browser = Browser() + window = browser.create_hidden_window() + + url = QUrl.fromUserInput(args.url) if args.url else QUrl("https://www.qt.io") + window.tab_widget().set_url(url) + window.show() + sys.exit(app.exec()) diff --git a/examples/webenginewidgets/simplebrowser/passworddialog.ui b/examples/webenginewidgets/simplebrowser/passworddialog.ui new file mode 100644 index 000000000..bbf5004f5 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/passworddialog.ui @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PasswordDialog</class> + <widget class="QDialog" name="PasswordDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>399</width> + <height>148</height> + </rect> + </property> + <property name="windowTitle"> + <string>Authentication Required</string> + </property> + <layout class="QGridLayout" name="gridLayout" columnstretch="0,0" columnminimumwidth="0,0"> + <item row="0" column="0"> + <widget class="QLabel" name="m_iconLabel"> + <property name="text"> + <string>Icon</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QLabel" name="m_infoLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Info</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="userLabel"> + <property name="text"> + <string>Username:</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLineEdit" name="m_userNameLineEdit"/> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="passwordLabel"> + <property name="text"> + <string>Password:</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QLineEdit" name="m_passwordLineEdit"> + <property name="echoMode"> + <enum>QLineEdit::Password</enum> + </property> + </widget> + </item> + <item row="3" column="0" colspan="2"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + <zorder>userLabel</zorder> + <zorder>m_userNameLineEdit</zorder> + <zorder>passwordLabel</zorder> + <zorder>m_passwordLineEdit</zorder> + <zorder>buttonBox</zorder> + <zorder>m_iconLabel</zorder> + <zorder>m_infoLabel</zorder> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>PasswordDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>PasswordDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.pyproject b/examples/webenginewidgets/simplebrowser/simplebrowser.pyproject index 6bc12af6b..eceac291e 100644 --- a/examples/webenginewidgets/simplebrowser/simplebrowser.pyproject +++ b/examples/webenginewidgets/simplebrowser/simplebrowser.pyproject @@ -1,3 +1,7 @@ { - "files": ["simplebrowser.py"] + "files": ["main.py", "browser.py", "browserwindow.py", "certificateerrordialog.ui", + "data/simplebrowser.qrc", "downloadmanagerwidget.py", + "downloadmanagerwidget.ui", "downloadwidget.py", + "downloadwidget.ui", "passworddialog.ui", "tabwidget.py", + "webpage.py", "webpopupwindow.py", "webview.py"] } diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.py b/examples/webenginewidgets/simplebrowser/tabwidget.py new file mode 100644 index 000000000..bda321ac1 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/tabwidget.py @@ -0,0 +1,241 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from functools import partial + +from PySide6.QtWebEngineCore import (QWebEngineFindTextResult, QWebEnginePage) +from PySide6.QtWidgets import QLabel, QMenu, QTabBar, QTabWidget +from PySide6.QtGui import QCursor, QIcon, QKeySequence, QPixmap +from PySide6.QtCore import QUrl, Qt, Signal, Slot + +from webpage import WebPage +from webview import WebView + + +class TabWidget(QTabWidget): + link_hovered = Signal(str) + load_progress = Signal(int) + title_changed = Signal(str) + url_changed = Signal(QUrl) + fav_icon_changed = Signal(QIcon) + web_action_enabled_changed = Signal(QWebEnginePage.WebAction, bool) + dev_tools_requested = Signal(QWebEnginePage) + find_text_finished = Signal(QWebEngineFindTextResult) + + def __init__(self, profile, parent): + super().__init__(parent) + self._profile = profile + tab_bar = self.tabBar() + tab_bar.setTabsClosable(True) + tab_bar.setSelectionBehaviorOnRemove(QTabBar.SelectPreviousTab) + tab_bar.setMovable(True) + tab_bar.setContextMenuPolicy(Qt.CustomContextMenu) + tab_bar.customContextMenuRequested.connect(self.handle_context_menu_requested) + tab_bar.tabCloseRequested.connect(self.close_tab) + tab_bar.tabBarDoubleClicked.connect(self._tabbar_double_clicked) + self.setDocumentMode(True) + self.setElideMode(Qt.ElideRight) + + self.currentChanged.connect(self.handle_current_changed) + + if profile.isOffTheRecord(): + icon = QLabel(self) + pixmap = QPixmap(":ninja.png") + icon.setPixmap(pixmap.scaledToHeight(tab_bar.height())) + w = icon.pixmap().width() + self.setStyleSheet(f"QTabWidget.tab-bar {{ left: {w}px; }}") + + @Slot(int) + def _tabbar_double_clicked(self, index): + if index == -1: + self.create_tab() + + def handle_current_changed(self, index): + if index != -1: + view = self.web_view(index) + if view.url(): + view.setFocus() + self.title_changed.emit(view.title()) + self.load_progress.emit(view.load_progress()) + self.url_changed.emit(view.url()) + self.fav_icon_changed.emit(view.fav_icon()) + e = view.is_web_action_enabled(QWebEnginePage.Back) + self.web_action_enabled_changed.emit(QWebEnginePage.Back, e) + e = view.is_web_action_enabled(QWebEnginePage.Forward) + self.web_action_enabled_changed.emit(QWebEnginePage.Forward, e) + e = view.is_web_action_enabled(QWebEnginePage.Stop) + self.web_action_enabled_changed.emit(QWebEnginePage.Stop, e) + e = view.is_web_action_enabled(QWebEnginePage.Reload) + self.web_action_enabled_changed.emit(QWebEnginePage.Reload, e) + else: + self.title_changed.emit("") + self.load_progress.emit(0) + self.url_changed.emit(QUrl()) + self.fav_icon_changed.emit(QIcon()) + self.web_action_enabled_changed.emit(QWebEnginePage.Back, False) + self.web_action_enabled_changed.emit(QWebEnginePage.Forward, False) + self.web_action_enabled_changed.emit(QWebEnginePage.Stop, False) + self.web_action_enabled_changed.emit(QWebEnginePage.Reload, True) + + def handle_context_menu_requested(self, pos): + menu = QMenu() + menu.addAction("New &Tab", QKeySequence.AddTab, self.create_tab) + index = self.tabBar().tabAt(pos) + if index != -1: + action = menu.addAction("Clone Tab") + action.triggered.connect(partial(self.clone_tab, index)) + menu.addSeparator() + action = menu.addAction("Close Tab") + action.setShortcut(QKeySequence.Close) + action.triggered.connect(partial(self.close_tab, index)) + action = menu.addAction("Close Other Tabs") + action.triggered.connect(partial(self.close_other_tabs, index)) + menu.addSeparator() + action = menu.addAction("Reload Tab") + action.setShortcut(QKeySequence.Refresh) + action.triggered.connect(partial(self.reload_tab, index)) + else: + menu.addSeparator() + + menu.addAction("Reload All Tabs", self.reload_all_tabs) + menu.exec(QCursor.pos()) + + def current_web_view(self): + return self.web_view(self.currentIndex()) + + def web_view(self, index): + return self.widget(index) + + def _title_changed(self, web_view, title): + index = self.indexOf(web_view) + if index != -1: + self.setTabText(index, title) + self.setTabToolTip(index, title) + + if self.currentIndex() == index: + self.title_changed.emit(title) + + def _url_changed(self, web_view, url): + index = self.indexOf(web_view) + if index != -1: + self.tabBar().setTabData(index, url) + if self.currentIndex() == index: + self.url_changed.emit(url) + + def _load_progress(self, web_view, progress): + if self.currentIndex() == self.indexOf(web_view): + self.load_progress.emit(progress) + + def _fav_icon_changed(self, web_view, icon): + index = self.indexOf(web_view) + if index != -1: + self.setTabIcon(index, icon) + if self.currentIndex() == index: + self.fav_icon_changed.emit(icon) + + def _link_hovered(self, web_view, url): + if self.currentIndex() == self.indexOf(web_view): + self.link_hovered.emit(url) + + def _webaction_enabled_changed(self, webView, action, enabled): + if self.currentIndex() == self.indexOf(webView): + self.web_action_enabled_changed.emit(action, enabled) + + def _window_close_requested(self, webView): + index = self.indexOf(webView) + if webView.page().inspectedPage(): + self.window().close() + elif index >= 0: + self.close_tab(index) + + def _find_text_finished(self, webView, result): + if self.currentIndex() == self.indexOf(webView): + self.find_text_finished.emit(result) + + def setup_view(self, webView): + web_page = webView.page() + webView.titleChanged.connect(partial(self._title_changed, webView)) + webView.urlChanged.connect(partial(self._url_changed, webView)) + webView.loadProgress.connect(partial(self._load_progress, webView)) + web_page.linkHovered.connect(partial(self._link_hovered, webView)) + webView.fav_icon_changed.connect(partial(self._fav_icon_changed, webView)) + webView.web_action_enabled_changed.connect(partial(self._webaction_enabled_changed, + webView)) + web_page.windowCloseRequested.connect(partial(self._window_close_requested, + webView)) + webView.dev_tools_requested.connect(self.dev_tools_requested) + web_page.findTextFinished.connect(partial(self._find_text_finished, + webView)) + + def create_tab(self): + web_view = self.create_background_tab() + self.setCurrentWidget(web_view) + return web_view + + def create_background_tab(self): + web_view = WebView() + web_page = WebPage(self._profile, web_view) + web_view.set_page(web_page) + self.setup_view(web_view) + index = self.addTab(web_view, "(Untitled)") + self.setTabIcon(index, web_view.fav_icon()) + # Workaround for QTBUG-61770 + web_view.resize(self.currentWidget().size()) + web_view.show() + return web_view + + def reload_all_tabs(self): + for i in range(0, self.count()): + self.web_view(i).reload() + + def close_other_tabs(self, index): + for i in range(index, self.count() - 1, -1): + self.close_tab(i) + for i in range(-1, index - 1, -1): + self.close_tab(i) + + def close_tab(self, index): + view = self.web_view(index) + if view: + has_focus = view.hasFocus() + self.removeTab(index) + if has_focus and self.count() > 0: + self.current_web_view().setFocus() + if self.count() == 0: + self.create_tab() + view.deleteLater() + + def clone_tab(self, index): + view = self.web_view(index) + if view: + tab = self.create_tab() + tab.setUrl(view.url()) + + def set_url(self, url): + view = self.current_web_view() + if view: + view.setUrl(url) + view.setFocus() + + def trigger_web_page_action(self, action): + web_view = self.current_web_view() + if web_view: + web_view.triggerPageAction(action) + web_view.setFocus() + + def next_tab(self): + next = self.currentIndex() + 1 + if next == self.count(): + next = 0 + self.setCurrentIndex(next) + + def previous_tab(self): + next = self.currentIndex() - 1 + if next < 0: + next = self.count() - 1 + self.setCurrentIndex(next) + + def reload_tab(self, index): + view = self.web_view(index) + if view: + view.reload() diff --git a/examples/webenginewidgets/simplebrowser/ui_certificateerrordialog.py b/examples/webenginewidgets/simplebrowser/ui_certificateerrordialog.py new file mode 100644 index 000000000..a963f0ac0 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/ui_certificateerrordialog.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'certificateerrordialog.ui' +## +## Created by: Qt User Interface Compiler version 6.7.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox, + QLabel, QSizePolicy, QSpacerItem, QVBoxLayout, + QWidget) + +class Ui_CertificateErrorDialog(object): + def setupUi(self, CertificateErrorDialog): + if not CertificateErrorDialog.objectName(): + CertificateErrorDialog.setObjectName(u"CertificateErrorDialog") + CertificateErrorDialog.resize(370, 141) + self.verticalLayout = QVBoxLayout(CertificateErrorDialog) + self.verticalLayout.setObjectName(u"verticalLayout") + self.verticalLayout.setContentsMargins(20, -1, 20, -1) + self.m_iconLabel = QLabel(CertificateErrorDialog) + self.m_iconLabel.setObjectName(u"m_iconLabel") + self.m_iconLabel.setAlignment(Qt.AlignCenter) + + self.verticalLayout.addWidget(self.m_iconLabel) + + self.m_errorLabel = QLabel(CertificateErrorDialog) + self.m_errorLabel.setObjectName(u"m_errorLabel") + sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.m_errorLabel.sizePolicy().hasHeightForWidth()) + self.m_errorLabel.setSizePolicy(sizePolicy) + self.m_errorLabel.setAlignment(Qt.AlignCenter) + self.m_errorLabel.setWordWrap(True) + + self.verticalLayout.addWidget(self.m_errorLabel) + + self.m_infoLabel = QLabel(CertificateErrorDialog) + self.m_infoLabel.setObjectName(u"m_infoLabel") + sizePolicy1 = QSizePolicy(QSizePolicy.Policy.MinimumExpanding, QSizePolicy.Policy.MinimumExpanding) + sizePolicy1.setHorizontalStretch(0) + sizePolicy1.setVerticalStretch(0) + sizePolicy1.setHeightForWidth(self.m_infoLabel.sizePolicy().hasHeightForWidth()) + self.m_infoLabel.setSizePolicy(sizePolicy1) + self.m_infoLabel.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter) + self.m_infoLabel.setWordWrap(True) + + self.verticalLayout.addWidget(self.m_infoLabel) + + self.verticalSpacer = QSpacerItem(20, 16, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) + + self.verticalLayout.addItem(self.verticalSpacer) + + self.buttonBox = QDialogButtonBox(CertificateErrorDialog) + self.buttonBox.setObjectName(u"buttonBox") + self.buttonBox.setOrientation(Qt.Horizontal) + self.buttonBox.setStandardButtons(QDialogButtonBox.No|QDialogButtonBox.Yes) + + self.verticalLayout.addWidget(self.buttonBox) + + + self.retranslateUi(CertificateErrorDialog) + self.buttonBox.accepted.connect(CertificateErrorDialog.accept) + self.buttonBox.rejected.connect(CertificateErrorDialog.reject) + + QMetaObject.connectSlotsByName(CertificateErrorDialog) + # setupUi + + def retranslateUi(self, CertificateErrorDialog): + CertificateErrorDialog.setWindowTitle(QCoreApplication.translate("CertificateErrorDialog", u"Dialog", None)) + self.m_iconLabel.setText(QCoreApplication.translate("CertificateErrorDialog", u"Icon", None)) + self.m_errorLabel.setText(QCoreApplication.translate("CertificateErrorDialog", u"Error", None)) + self.m_infoLabel.setText(QCoreApplication.translate("CertificateErrorDialog", u"If you wish so, you may continue with an unverified certificate. Accepting an unverified certificate mean you may not be connected with the host you tried to connect to.\n" +"\n" +"Do you wish to override the security check and continue ? ", None)) + # retranslateUi + diff --git a/examples/webenginewidgets/simplebrowser/ui_downloadmanagerwidget.py b/examples/webenginewidgets/simplebrowser/ui_downloadmanagerwidget.py new file mode 100644 index 000000000..f0f61aa75 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/ui_downloadmanagerwidget.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'downloadmanagerwidget.ui' +## +## Created by: Qt User Interface Compiler version 6.7.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QLabel, QLayout, QScrollArea, + QSizePolicy, QVBoxLayout, QWidget) + +class Ui_DownloadManagerWidget(object): + def setupUi(self, DownloadManagerWidget): + if not DownloadManagerWidget.objectName(): + DownloadManagerWidget.setObjectName(u"DownloadManagerWidget") + DownloadManagerWidget.resize(400, 212) + DownloadManagerWidget.setStyleSheet(u"#DownloadManagerWidget {\n" +" background: palette(button)\n" +"}") + self.m_topLevelLayout = QVBoxLayout(DownloadManagerWidget) + self.m_topLevelLayout.setObjectName(u"m_topLevelLayout") + self.m_topLevelLayout.setSizeConstraint(QLayout.SetNoConstraint) + self.m_topLevelLayout.setContentsMargins(0, 0, 0, 0) + self.m_scrollArea = QScrollArea(DownloadManagerWidget) + self.m_scrollArea.setObjectName(u"m_scrollArea") + self.m_scrollArea.setStyleSheet(u"#m_scrollArea {\n" +" margin: 2px;\n" +" border: none;\n" +"}") + self.m_scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) + self.m_scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) + self.m_scrollArea.setWidgetResizable(True) + self.m_scrollArea.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) + self.m_items = QWidget() + self.m_items.setObjectName(u"m_items") + self.m_items.setStyleSheet(u"#m_items {background: palette(mid)}") + self.m_itemsLayout = QVBoxLayout(self.m_items) + self.m_itemsLayout.setSpacing(2) + self.m_itemsLayout.setObjectName(u"m_itemsLayout") + self.m_itemsLayout.setContentsMargins(3, 3, 3, 3) + self.m_zeroItemsLabel = QLabel(self.m_items) + self.m_zeroItemsLabel.setObjectName(u"m_zeroItemsLabel") + sizePolicy = QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.m_zeroItemsLabel.sizePolicy().hasHeightForWidth()) + self.m_zeroItemsLabel.setSizePolicy(sizePolicy) + self.m_zeroItemsLabel.setStyleSheet(u"color: palette(shadow)") + self.m_zeroItemsLabel.setAlignment(Qt.AlignCenter) + + self.m_itemsLayout.addWidget(self.m_zeroItemsLabel) + + self.m_scrollArea.setWidget(self.m_items) + + self.m_topLevelLayout.addWidget(self.m_scrollArea) + + + self.retranslateUi(DownloadManagerWidget) + + QMetaObject.connectSlotsByName(DownloadManagerWidget) + # setupUi + + def retranslateUi(self, DownloadManagerWidget): + DownloadManagerWidget.setWindowTitle(QCoreApplication.translate("DownloadManagerWidget", u"Downloads", None)) + self.m_zeroItemsLabel.setText(QCoreApplication.translate("DownloadManagerWidget", u"No downloads", None)) + # retranslateUi + diff --git a/examples/webenginewidgets/simplebrowser/ui_downloadwidget.py b/examples/webenginewidgets/simplebrowser/ui_downloadwidget.py new file mode 100644 index 000000000..58c32fdf8 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/ui_downloadwidget.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'downloadwidget.ui' +## +## Created by: Qt User Interface Compiler version 6.7.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel, + QLayout, QProgressBar, QPushButton, QSizePolicy, + QWidget) + +class Ui_DownloadWidget(object): + def setupUi(self, DownloadWidget): + if not DownloadWidget.objectName(): + DownloadWidget.setObjectName(u"DownloadWidget") + DownloadWidget.setStyleSheet(u"#DownloadWidget {\n" +" background: palette(button);\n" +" border: 1px solid palette(dark);\n" +" margin: 0px;\n" +"}") + self.m_topLevelLayout = QGridLayout(DownloadWidget) + self.m_topLevelLayout.setObjectName(u"m_topLevelLayout") + self.m_topLevelLayout.setSizeConstraint(QLayout.SetMinAndMaxSize) + self.m_dstName = QLabel(DownloadWidget) + self.m_dstName.setObjectName(u"m_dstName") + self.m_dstName.setStyleSheet(u"font-weight: bold\n" +"") + + self.m_topLevelLayout.addWidget(self.m_dstName, 0, 0, 1, 1) + + self.m_cancelButton = QPushButton(DownloadWidget) + self.m_cancelButton.setObjectName(u"m_cancelButton") + sizePolicy = QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.m_cancelButton.sizePolicy().hasHeightForWidth()) + self.m_cancelButton.setSizePolicy(sizePolicy) + self.m_cancelButton.setStyleSheet(u"QPushButton {\n" +" margin: 1px;\n" +" border: none;\n" +"}\n" +"QPushButton:pressed {\n" +" margin: none;\n" +" border: 1px solid palette(shadow);\n" +" background: palette(midlight);\n" +"}") + self.m_cancelButton.setFlat(False) + + self.m_topLevelLayout.addWidget(self.m_cancelButton, 0, 1, 1, 1) + + self.m_srcUrl = QLabel(DownloadWidget) + self.m_srcUrl.setObjectName(u"m_srcUrl") + self.m_srcUrl.setMaximumSize(QSize(350, 16777215)) + self.m_srcUrl.setStyleSheet(u"") + + self.m_topLevelLayout.addWidget(self.m_srcUrl, 1, 0, 1, 2) + + self.m_progressBar = QProgressBar(DownloadWidget) + self.m_progressBar.setObjectName(u"m_progressBar") + self.m_progressBar.setStyleSheet(u"font-size: 12px") + self.m_progressBar.setValue(24) + + self.m_topLevelLayout.addWidget(self.m_progressBar, 2, 0, 1, 2) + + + self.retranslateUi(DownloadWidget) + + QMetaObject.connectSlotsByName(DownloadWidget) + # setupUi + + def retranslateUi(self, DownloadWidget): + self.m_dstName.setText(QCoreApplication.translate("DownloadWidget", u"TextLabel", None)) + self.m_srcUrl.setText(QCoreApplication.translate("DownloadWidget", u"TextLabel", None)) + pass + # retranslateUi + diff --git a/examples/webenginewidgets/simplebrowser/ui_passworddialog.py b/examples/webenginewidgets/simplebrowser/ui_passworddialog.py new file mode 100644 index 000000000..11e0c4a2e --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/ui_passworddialog.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'passworddialog.ui' +## +## Created by: Qt User Interface Compiler version 6.7.0 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QAbstractButton, QApplication, QDialog, QDialogButtonBox, + QGridLayout, QLabel, QLineEdit, QSizePolicy, + QWidget) + +class Ui_PasswordDialog(object): + def setupUi(self, PasswordDialog): + if not PasswordDialog.objectName(): + PasswordDialog.setObjectName(u"PasswordDialog") + PasswordDialog.resize(399, 148) + self.gridLayout = QGridLayout(PasswordDialog) + self.gridLayout.setObjectName(u"gridLayout") + self.m_iconLabel = QLabel(PasswordDialog) + self.m_iconLabel.setObjectName(u"m_iconLabel") + self.m_iconLabel.setAlignment(Qt.AlignCenter) + + self.gridLayout.addWidget(self.m_iconLabel, 0, 0, 1, 1) + + self.m_infoLabel = QLabel(PasswordDialog) + self.m_infoLabel.setObjectName(u"m_infoLabel") + sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.m_infoLabel.sizePolicy().hasHeightForWidth()) + self.m_infoLabel.setSizePolicy(sizePolicy) + self.m_infoLabel.setWordWrap(True) + + self.gridLayout.addWidget(self.m_infoLabel, 0, 1, 1, 1) + + self.userLabel = QLabel(PasswordDialog) + self.userLabel.setObjectName(u"userLabel") + + self.gridLayout.addWidget(self.userLabel, 1, 0, 1, 1) + + self.m_userNameLineEdit = QLineEdit(PasswordDialog) + self.m_userNameLineEdit.setObjectName(u"m_userNameLineEdit") + + self.gridLayout.addWidget(self.m_userNameLineEdit, 1, 1, 1, 1) + + self.passwordLabel = QLabel(PasswordDialog) + self.passwordLabel.setObjectName(u"passwordLabel") + + self.gridLayout.addWidget(self.passwordLabel, 2, 0, 1, 1) + + self.m_passwordLineEdit = QLineEdit(PasswordDialog) + self.m_passwordLineEdit.setObjectName(u"m_passwordLineEdit") + self.m_passwordLineEdit.setEchoMode(QLineEdit.Password) + + self.gridLayout.addWidget(self.m_passwordLineEdit, 2, 1, 1, 1) + + self.buttonBox = QDialogButtonBox(PasswordDialog) + self.buttonBox.setObjectName(u"buttonBox") + self.buttonBox.setOrientation(Qt.Horizontal) + self.buttonBox.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Ok) + + self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 2) + + self.userLabel.raise_() + self.m_userNameLineEdit.raise_() + self.passwordLabel.raise_() + self.m_passwordLineEdit.raise_() + self.buttonBox.raise_() + self.m_iconLabel.raise_() + self.m_infoLabel.raise_() + + self.retranslateUi(PasswordDialog) + self.buttonBox.accepted.connect(PasswordDialog.accept) + self.buttonBox.rejected.connect(PasswordDialog.reject) + + QMetaObject.connectSlotsByName(PasswordDialog) + # setupUi + + def retranslateUi(self, PasswordDialog): + PasswordDialog.setWindowTitle(QCoreApplication.translate("PasswordDialog", u"Authentication Required", None)) + self.m_iconLabel.setText(QCoreApplication.translate("PasswordDialog", u"Icon", None)) + self.m_infoLabel.setText(QCoreApplication.translate("PasswordDialog", u"Info", None)) + self.userLabel.setText(QCoreApplication.translate("PasswordDialog", u"Username:", None)) + self.passwordLabel.setText(QCoreApplication.translate("PasswordDialog", u"Password:", None)) + # retranslateUi + diff --git a/examples/webenginewidgets/simplebrowser/webpage.py b/examples/webenginewidgets/simplebrowser/webpage.py new file mode 100644 index 000000000..2f2800a17 --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/webpage.py @@ -0,0 +1,29 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from functools import partial + +from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineCertificateError +from PySide6.QtCore import QTimer, Signal + + +class WebPage(QWebEnginePage): + + create_certificate_error_dialog = Signal(QWebEngineCertificateError) + + def __init__(self, profile, parent): + super().__init__(profile, parent) + + self.selectClientCertificate.connect(self.handle_select_client_certificate) + self.certificateError.connect(self.handle_certificate_error) + + def _emit_create_certificate_error_dialog(self, error): + self.create_certificate_error_dialog.emit(error) + + def handle_certificate_error(self, error): + error.defer() + QTimer.singleShot(0, partial(self._emit_create_certificate_error_dialog, error)) + + def handle_select_client_certificate(self, selection): + # Just select one. + selection.select(selection.certificates()[0]) diff --git a/examples/webenginewidgets/simplebrowser/webpopupwindow.py b/examples/webenginewidgets/simplebrowser/webpopupwindow.py new file mode 100644 index 000000000..fac27a61a --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/webpopupwindow.py @@ -0,0 +1,53 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from PySide6.QtWidgets import QLineEdit, QSizePolicy, QWidget, QVBoxLayout +from PySide6.QtGui import QAction +from PySide6.QtCore import QUrl, Qt, Slot + +from webpage import WebPage + + +class WebPopupWindow(QWidget): + + def __init__(self, view, profile, parent=None): + super().__init__(parent, Qt.Window) + self.m_urlLineEdit = QLineEdit(self) + self._url_line_edit = QLineEdit() + self._fav_action = QAction(self) + self._view = view + + self.setAttribute(Qt.WA_DeleteOnClose) + self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Minimum) + + layout = QVBoxLayout(self) + layout.setContentsMargins(0, 0, 0, 0) + layout.addWidget(self._url_line_edit) + layout.addWidget(self._view) + + self._view.setPage(WebPage(profile, self._view)) + self._view.setFocus() + + self._url_line_edit.setReadOnly(True) + self._url_line_edit.addAction(self._fav_action, QLineEdit.LeadingPosition) + + self._view.titleChanged.connect(self.setWindowTitle) + self._view.urlChanged.connect(self._url_changed) + self._view.fav_icon_changed.connect(self._fav_action.setIcon) + p = self._view.page() + p.geometryChangeRequested.connect(self.handle_geometry_change_requested) + p.windowCloseRequested.connect(self.close) + + @Slot(QUrl) + def _url_changed(self, url): + self._url_line_edit.setText(url.toDisplayString()) + + def view(self): + return self._view + + def handle_geometry_change_requested(self, newGeometry): + window = self.windowHandle() + if window: + self.setGeometry(newGeometry.marginsRemoved(window.frameMargins())) + self.show() + self._view.setFocus() diff --git a/examples/webenginewidgets/simplebrowser/webview.py b/examples/webenginewidgets/simplebrowser/webview.py new file mode 100644 index 000000000..e1282c1dd --- /dev/null +++ b/examples/webenginewidgets/simplebrowser/webview.py @@ -0,0 +1,294 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +from functools import partial + +from PySide6.QtWebEngineCore import (QWebEngineFileSystemAccessRequest, + QWebEnginePage) +from PySide6.QtWebEngineWidgets import QWebEngineView + +from PySide6.QtWidgets import QDialog, QMessageBox, QStyle +from PySide6.QtGui import QIcon +from PySide6.QtNetwork import QAuthenticator +from PySide6.QtCore import QTimer, Signal, Slot + +from webpage import WebPage +from webpopupwindow import WebPopupWindow +from ui_passworddialog import Ui_PasswordDialog +from ui_certificateerrordialog import Ui_CertificateErrorDialog + + +def question_for_feature(feature): + if feature == QWebEnginePage.Geolocation: + return "Allow %1 to access your location information?" + if feature == QWebEnginePage.MediaAudioCapture: + return "Allow %1 to access your microphone?" + if feature == QWebEnginePage.MediaVideoCapture: + return "Allow %1 to access your webcam?" + if feature == QWebEnginePage.MediaAudioVideoCapture: + return "Allow %1 to access your microphone and webcam?" + if feature == QWebEnginePage.MouseLock: + return "Allow %1 to lock your mouse cursor?" + if feature == QWebEnginePage.DesktopVideoCapture: + return "Allow %1 to capture video of your desktop?" + if feature == QWebEnginePage.DesktopAudioVideoCapture: + return "Allow %1 to capture audio and video of your desktop?" + if feature == QWebEnginePage.Notifications: + return "Allow %1 to show notification on your desktop?" + return "" + + +class WebView(QWebEngineView): + + web_action_enabled_changed = Signal(QWebEnginePage.WebAction, bool) + fav_icon_changed = Signal(QIcon) + dev_tools_requested = Signal(QWebEnginePage) + + def __init__(self, parent=None): + super().__init__(parent) + + self._load_progress = 100 + self.loadStarted.connect(self._load_started) + self.loadProgress.connect(self._slot_load_progress) + self.loadFinished.connect(self._load_finished) + self.iconChanged.connect(self._emit_faviconchanged) + self.renderProcessTerminated.connect(self._render_process_terminated) + + self._error_icon = QIcon(":dialog-error.png") + self._loading_icon = QIcon.fromTheme(QIcon.ThemeIcon.ViewRefresh, + QIcon(":view-refresh.png")) + self._default_icon = QIcon(":text-html.png") + + @Slot() + def _load_started(self): + self._load_progress = 0 + self.fav_icon_changed.emit(self.fav_icon()) + + @Slot(int) + def _slot_load_progress(self, progress): + self._load_progress = progress + + @Slot() + def _emit_faviconchanged(self): + self.fav_icon_changed.emit(self.fav_icon()) + + @Slot(bool) + def _load_finished(self, success): + self._load_progress = 100 if success else -1 + self._emit_faviconchanged() + + @Slot(QWebEnginePage.RenderProcessTerminationStatus, int) + def _render_process_terminated(self, termStatus, statusCode): + status = "" + if termStatus == QWebEnginePage.NormalTerminationStatus: + status = "Render process normal exit" + elif termStatus == QWebEnginePage.AbnormalTerminationStatus: + status = "Render process abnormal exit" + elif termStatus == QWebEnginePage.CrashedTerminationStatus: + status = "Render process crashed" + elif termStatus == QWebEnginePage.KilledTerminationStatus: + status = "Render process killed" + + m = f"Render process exited with code: {statusCode:#x}\nDo you want to reload the page?" + btn = QMessageBox.question(self.window(), status, m) + if btn == QMessageBox.Yes: + QTimer.singleShot(0, self.reload) + + def set_page(self, page): + old_page = self.page() + if old_page and isinstance(old_page, WebPage): + old_page.createCertificateErrorDialog.disconnect(self.handle_certificate_error) + old_page.authenticationRequired.disconnect(self.handle_authentication_required) + old_page.featurePermissionRequested.disconnect(self.handle_feature_permission_requested) + old_page.proxyAuthenticationRequired.disconnect( + self.handle_proxy_authentication_required) + old_page.registerProtocolHandlerRequested.disconnect( + self.handle_register_protocol_handler_requested) + old_page.fileSystemAccessRequested.disconnect(self.handle_file_system_access_requested) + + self.create_web_action_trigger(page, QWebEnginePage.Forward) + self.create_web_action_trigger(page, QWebEnginePage.Back) + self.create_web_action_trigger(page, QWebEnginePage.Reload) + self.create_web_action_trigger(page, QWebEnginePage.Stop) + super().setPage(page) + page.create_certificate_error_dialog.connect(self.handle_certificate_error) + page.authenticationRequired.connect(self.handle_authentication_required) + page.featurePermissionRequested.connect(self.handle_feature_permission_requested) + page.proxyAuthenticationRequired.connect(self.handle_proxy_authentication_required) + page.registerProtocolHandlerRequested.connect( + self.handle_register_protocol_handler_requested) + page.fileSystemAccessRequested.connect(self.handle_file_system_access_requested) + + def load_progress(self): + return self._load_progress + + def _emit_webactionenabledchanged(self, action, webAction): + self.web_action_enabled_changed.emit(webAction, action.isEnabled()) + + def create_web_action_trigger(self, page, webAction): + action = page.action(webAction) + action.changed.connect(partial(self._emit_webactionenabledchanged, action, webAction)) + + def is_web_action_enabled(self, webAction): + return self.page().action(webAction).isEnabled() + + def fav_icon(self): + fav_icon = self.icon() + if not fav_icon.isNull(): + return fav_icon + if self._load_progress < 0: + return self._error_icon + if self._load_progress < 100: + return self._loading_icon + return self._default_icon + + def createWindow(self, type): + main_window = self.window() + if not main_window: + return None + + if type == QWebEnginePage.WebBrowserTab: + return main_window.tab_widget().create_tab() + + if type == QWebEnginePage.WebBrowserBackgroundTab: + return main_window.tab_widget().create_background_tab() + + if type == QWebEnginePage.WebBrowserWindow: + return main_window.browser().createWindow().current_tab() + + if type == QWebEnginePage.WebDialog: + view = WebView() + WebPopupWindow(view, self.page().profile(), self.window()) + view.dev_tools_requested.connect(self.dev_tools_requested) + return view + + return None + + @Slot() + def _emit_devtools_requested(self): + self.dev_tools_requested.emit(self.page()) + + def contextMenuEvent(self, event): + menu = self.createStandardContextMenu() + actions = menu.actions() + inspect_action = self.page().action(QWebEnginePage.InspectElement) + if inspect_action in actions: + inspect_action.setText("Inspect element") + else: + vs = self.page().action(QWebEnginePage.ViewSource) + if vs not in actions: + menu.addSeparator() + + action = menu.addAction("Open inspector in new window") + action.triggered.connect(self._emit_devtools_requested) + + menu.popup(event.globalPos()) + + def handle_certificate_error(self, error): + w = self.window() + dialog = QDialog(w) + dialog.setModal(True) + + certificate_dialog = Ui_CertificateErrorDialog() + certificate_dialog.setupUi(dialog) + certificate_dialog.m_iconLabel.setText("") + icon = QIcon(w.style().standardIcon(QStyle.SP_MessageBoxWarning, 0, w)) + certificate_dialog.m_iconLabel.setPixmap(icon.pixmap(32, 32)) + certificate_dialog.m_errorLabel.setText(error.description()) + dialog.setWindowTitle("Certificate Error") + + if dialog.exec() == QDialog.Accepted: + error.acceptCertificate() + else: + error.rejectCertificate() + + def handle_authentication_required(self, requestUrl, auth): + w = self.window() + dialog = QDialog(w) + dialog.setModal(True) + + password_dialog = Ui_PasswordDialog() + password_dialog.setupUi(dialog) + + password_dialog.m_iconLabel.setText("") + icon = QIcon(w.style().standardIcon(QStyle.SP_MessageBoxQuestion, 0, w)) + password_dialog.m_iconLabel.setPixmap(icon.pixmap(32, 32)) + + url_str = requestUrl.toString().toHtmlEscaped() + realm = auth.realm() + m = f'Enter username and password for "{realm}" at {url_str}' + password_dialog.m_infoLabel.setText(m) + password_dialog.m_infoLabel.setWordWrap(True) + + if dialog.exec() == QDialog.Accepted: + auth.setUser(password_dialog.m_userNameLineEdit.text()) + auth.setPassword(password_dialog.m_passwordLineEdit.text()) + else: + # Set authenticator null if dialog is cancelled + auth = QAuthenticator() + + def handle_feature_permission_requested(self, securityOrigin, feature): + title = "Permission Request" + host = securityOrigin.host() + question = question_for_feature(feature).replace("%1", host) + w = self.window() + page = self.page() + if question and QMessageBox.question(w, title, question) == QMessageBox.Yes: + page.setFeaturePermission(securityOrigin, feature, + QWebEnginePage.PermissionGrantedByUser) + else: + page.setFeaturePermission(securityOrigin, feature, + QWebEnginePage.PermissionDeniedByUser) + + def handle_proxy_authentication_required(self, url, auth, proxyHost): + w = self.window() + dialog = QDialog(w) + dialog.setModal(True) + + password_dialog = Ui_PasswordDialog() + password_dialog.setupUi(dialog) + + password_dialog.m_iconLabel.setText("") + + icon = QIcon(w.style().standardIcon(QStyle.SP_MessageBoxQuestion, 0, w)) + password_dialog.m_iconLabel.setPixmap(icon.pixmap(32, 32)) + + proxy = proxyHost.toHtmlEscaped() + password_dialog.m_infoLabel.setText(f'Connect to proxy "{proxy}" using:') + password_dialog.m_infoLabel.setWordWrap(True) + + if dialog.exec() == QDialog.Accepted: + auth.setUser(password_dialog.m_userNameLineEdit.text()) + auth.setPassword(password_dialog.m_passwordLineEdit.text()) + else: + # Set authenticator null if dialog is cancelled + auth = QAuthenticator() + + def handle_register_protocol_handler_requested(self, request): + host = request.origin().host() + m = f"Allow {host} to open all {request.scheme()} links?" + answer = QMessageBox.question(self.window(), "Permission Request", m) + if answer == QMessageBox.Yes: + request.accept() + else: + request.reject() + + def handle_file_system_access_requested(self, request): + access_type = "" + type = request.accessFlags() + if type == QWebEngineFileSystemAccessRequest.Read: + access_type = "read" + elif type == QWebEngineFileSystemAccessRequest.Write: + access_type = "write" + elif type == (QWebEngineFileSystemAccessRequest.Read + | QWebEngineFileSystemAccessRequest.Write): + access_type = "read and write" + host = request.origin().host() + path = request.filePath().toString() + t = "File system access request" + m = f"Give {host} {access_type} access to {path}?" + answer = QMessageBox.question(self.window(), t, m) + if answer == QMessageBox.Yes: + request.accept() + else: + request.reject() diff --git a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py b/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py deleted file mode 100644 index 7a76e8a7c..000000000 --- a/examples/webenginewidgets/tabbedbrowser/bookmarkwidget.py +++ /dev/null @@ -1,276 +0,0 @@ -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -import json -import os -import warnings - -from PySide6 import QtCore -from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl -from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel -from PySide6.QtWidgets import QMenu, QMessageBox, QTreeView - -_url_role = Qt.UserRole + 1 - -# Default bookmarks as an array of arrays which is the form -# used to read from/write to a .json bookmarks file -_default_bookmarks = [ - ['Tool Bar'], - ['http://qt.io', 'Qt', ':/qt-project.org/qmessagebox/images/qtlogo-64.png'], - ['https://download.qt.io/snapshots/ci/pyside/', 'Downloads'], - ['https://doc.qt.io/qtforpython/', 'Documentation'], - ['https://bugreports.qt.io/projects/PYSIDE/', 'Bug Reports'], - ['https://www.python.org/', 'Python', None], - ['https://wiki.qt.io/PySide6', 'Qt for Python', None], - ['Other Bookmarks'] -] - - -def _config_dir(): - location = QStandardPaths.writableLocation(QStandardPaths.ConfigLocation) - return f'{location}/QtForPythonBrowser' - - -_bookmark_file = 'bookmarks.json' - - -def _create_folder_item(title): - result = QStandardItem(title) - result.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable) - return result - - -def _create_item(url, title, icon): - result = QStandardItem(title) - result.setFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable) - result.setData(url, _url_role) - if icon is not None: - result.setIcon(icon) - return result - - -# Create the model from an array of arrays -def _create_model(parent, serialized_bookmarks): - result = QStandardItemModel(0, 1, parent) - last_folder_item = None - for entry in serialized_bookmarks: - if len(entry) == 1: - last_folder_item = _create_folder_item(entry[0]) - result.appendRow(last_folder_item) - else: - url = QUrl.fromUserInput(entry[0]) - title = entry[1] - icon = QIcon(entry[2]) if len(entry) > 2 and entry[2] else None - last_folder_item.appendRow(_create_item(url, title, icon)) - return result - - -# Serialize model into an array of arrays, writing out the icons -# into .png files under directory in the process -def _serialize_model(model, directory): - result = [] - folder_count = model.rowCount() - for f in range(0, folder_count): - folder_item = model.item(f) - result.append([folder_item.text()]) - item_count = folder_item.rowCount() - for i in range(0, item_count): - item = folder_item.child(i) - entry = [item.data(_url_role).toString(), item.text()] - icon = item.icon() - if not icon.isNull(): - icon_sizes = icon.availableSizes() - largest_size = icon_sizes[len(icon_sizes) - 1] - w = largest_size.width() - icon_file_name = f'{directory}/icon{f:02}_{i:02}_{w}.png' - icon.pixmap(largest_size).save(icon_file_name, 'PNG') - entry.append(icon_file_name) - result.append(entry) - return result - - -# Bookmarks as a tree view to be used in a dock widget with -# functionality to persist and populate tool bars and menus. -class BookmarkWidget(QTreeView): - """Provides a tree view to manage the bookmarks.""" - - open_bookmark = QtCore.Signal(QUrl) - open_bookmark_in_new_tab = QtCore.Signal(QUrl) - changed = QtCore.Signal() - - def __init__(self): - super().__init__() - self.setRootIsDecorated(False) - self.setUniformRowHeights(True) - self.setHeaderHidden(True) - self._model = _create_model(self, self._read_bookmarks()) - self.setModel(self._model) - self.expandAll() - self.activated.connect(self._activated) - self._model.rowsInserted.connect(self._changed) - self._model.rowsRemoved.connect(self._changed) - self._model.dataChanged.connect(self._changed) - self._modified = False - - def _changed(self): - self._modified = True - self.changed.emit() - - def _activated(self, index): - item = self._model.itemFromIndex(index) - self.open_bookmark.emit(item.data(_url_role)) - - def _action_activated(self, index): - action = self.sender() - self.open_bookmark.emit(action.data()) - - def _tool_bar_item(self): - return self._model.item(0, 0) - - def _other_item(self): - return self._model.item(1, 0) - - def add_bookmark(self, url, title, icon): - self._other_item().appendRow(_create_item(url, title, icon)) - - def add_tool_bar_bookmark(self, url, title, icon): - self._tool_bar_item().appendRow(_create_item(url, title, icon)) - - # Synchronize the bookmarks under parent_item to a target_object - # like QMenu/QToolBar, which has a list of actions. Update - # the existing actions, append new ones if needed or hide - # superfluous ones - def _populate_actions(self, parent_item, target_object, first_action): - existing_actions = target_object.actions() - existing_action_count = len(existing_actions) - a = first_action - row_count = parent_item.rowCount() - for r in range(0, row_count): - item = parent_item.child(r) - title = item.text() - icon = item.icon() - url = item.data(_url_role) - if a < existing_action_count: - action = existing_actions[a] - if (title != action.toolTip()): - action.setText(BookmarkWidget.short_title(title)) - action.setIcon(icon) - action.setToolTip(title) - action.setData(url) - action.setVisible(True) - else: - short_title = BookmarkWidget.short_title(title) - action = target_object.addAction(icon, short_title) - action.setToolTip(title) - action.setData(url) - action.triggered.connect(self._action_activated) - a = a + 1 - while a < existing_action_count: - existing_actions[a].setVisible(False) - a = a + 1 - - def populate_tool_bar(self, tool_bar): - self._populate_actions(self._tool_bar_item(), tool_bar, 0) - - def populate_other(self, menu, first_action): - self._populate_actions(self._other_item(), menu, first_action) - - def _current_item(self): - index = self.currentIndex() - if index.isValid(): - item = self._model.itemFromIndex(index) - if item.parent(): # exclude top level items - return item - return None - - def context_menu_event(self, event): - context_menu = QMenu() - open_in_new_tab_action = context_menu.addAction("Open in New Tab") - remove_action = context_menu.addAction("Remove...") - current_item = self._current_item() - open_in_new_tab_action.setEnabled(current_item is not None) - remove_action.setEnabled(current_item is not None) - chosen_action = context_menu.exec(event.globalPos()) - if chosen_action == open_in_new_tab_action: - self.open_bookmarkInNewTab.emit(current_item.data(_url_role)) - elif chosen_action == remove_action: - self._remove_item(current_item) - - def _remove_item(self, item): - message = f"Would you like to remove \"{item.text()}\"?" - button = QMessageBox.question(self, "Remove", message, - QMessageBox.Yes | QMessageBox.No) - if button == QMessageBox.Yes: - item.parent().removeRow(item.row()) - - def write_bookmarks(self): - if not self._modified: - return - dir_path = _config_dir() - native_dir_path = QDir.toNativeSeparators(dir_path) - directory = QFileInfo(dir_path) - if not directory.isDir(): - print(f'Creating {native_dir_path}...') - if not QDir(directory.absolutePath()).mkpath(directory.fileName()): - warnings.warn(f'Cannot create {native_dir_path}.', - RuntimeWarning) - return - serialized_model = _serialize_model(self._model, dir_path) - bookmark_file_name = os.path.join(native_dir_path, _bookmark_file) - print(f'Writing {bookmark_file_name}...') - with open(bookmark_file_name, 'w') as bookmark_file: - json.dump(serialized_model, bookmark_file, indent=4) - - def _read_bookmarks(self): - bookmark_file_name = os.path.join(QDir.toNativeSeparators(_config_dir()), - _bookmark_file) - if os.path.exists(bookmark_file_name): - print(f'Reading {bookmark_file_name}...') - return json.load(open(bookmark_file_name)) - return _default_bookmarks - - # Return a short title for a bookmark action, - # "Qt | Cross Platform.." -> "Qt" - @staticmethod - def short_title(t): - i = t.find(' | ') - if i == -1: - i = t.find(' - ') - return t[0:i] if i != -1 else t diff --git a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py b/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py deleted file mode 100644 index 5e87da074..000000000 --- a/examples/webenginewidgets/tabbedbrowser/browsertabwidget.py +++ /dev/null @@ -1,244 +0,0 @@ -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -from functools import partial - -from bookmarkwidget import BookmarkWidget -from webengineview import WebEngineView -from historywindow import HistoryWindow -from PySide6 import QtCore -from PySide6.QtCore import Qt, QUrl -from PySide6.QtWidgets import QMenu, QTabBar, QTabWidget -from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEnginePage - - -class BrowserTabWidget(QTabWidget): - """Enables having several tabs with QWebEngineView.""" - - url_changed = QtCore.Signal(QUrl) - enabled_changed = QtCore.Signal(QWebEnginePage.WebAction, bool) - download_requested = QtCore.Signal(QWebEngineDownloadRequest) - - def __init__(self, window_factory_function): - super().__init__() - self.setTabsClosable(True) - self._window_factory_function = window_factory_function - self._webengineviews = [] - self._history_windows = {} # map WebengineView to HistoryWindow - self.currentChanged.connect(self._current_changed) - self.tabCloseRequested.connect(self.handle_tab_close_request) - self._actions_enabled = {} - for web_action in WebEngineView.web_actions(): - self._actions_enabled[web_action] = False - - tab_bar = self.tabBar() - tab_bar.setSelectionBehaviorOnRemove(QTabBar.SelectPreviousTab) - tab_bar.setContextMenuPolicy(Qt.CustomContextMenu) - tab_bar.customContextMenuRequested.connect(self._handle_tab_context_menu) - - def add_browser_tab(self): - factory_func = partial(BrowserTabWidget.add_browser_tab, self) - web_engine_view = WebEngineView(factory_func, - self._window_factory_function) - index = self.count() - self._webengineviews.append(web_engine_view) - title = f'Tab {index + 1}' - self.addTab(web_engine_view, title) - page = web_engine_view.page() - page.titleChanged.connect(self._title_changed) - page.iconChanged.connect(self._icon_changed) - page.profile().downloadRequested.connect(self._download_requested) - web_engine_view.urlChanged.connect(self._url_changed) - web_engine_view.enabled_changed.connect(self._enabled_changed) - self.setCurrentIndex(index) - return web_engine_view - - def load(self, url): - index = self.currentIndex() - if index >= 0 and url.isValid(): - self._webengineviews[index].setUrl(url) - - def find(self, needle, flags): - index = self.currentIndex() - if index >= 0: - self._webengineviews[index].page().findText(needle, flags) - - def url(self): - index = self.currentIndex() - return self._webengineviews[index].url() if index >= 0 else QUrl() - - def _url_changed(self, url): - index = self.currentIndex() - if index >= 0 and self._webengineviews[index] == self.sender(): - self.url_changed.emit(url) - - def _title_changed(self, title): - index = self._index_of_page(self.sender()) - if (index >= 0): - self.setTabText(index, BookmarkWidget.short_title(title)) - - def _icon_changed(self, icon): - index = self._index_of_page(self.sender()) - if (index >= 0): - self.setTabIcon(index, icon) - - def _enabled_changed(self, web_action, enabled): - index = self.currentIndex() - if index >= 0 and self._webengineviews[index] == self.sender(): - self._check_emit_enabled_changed(web_action, enabled) - - def _check_emit_enabled_changed(self, web_action, enabled): - if enabled != self._actions_enabled[web_action]: - self._actions_enabled[web_action] = enabled - self.enabled_changed.emit(web_action, enabled) - - def _current_changed(self, index): - self._update_actions(index) - self.url_changed.emit(self.url()) - - def _update_actions(self, index): - if index >= 0 and index < len(self._webengineviews): - view = self._webengineviews[index] - for web_action in WebEngineView.web_actions(): - enabled = view.is_web_action_enabled(web_action) - self._check_emit_enabled_changed(web_action, enabled) - - def back(self): - self._trigger_action(QWebEnginePage.Back) - - def forward(self): - self._trigger_action(QWebEnginePage.Forward) - - def reload(self): - self._trigger_action(QWebEnginePage.Reload) - - def undo(self): - self._trigger_action(QWebEnginePage.Undo) - - def redo(self): - self._trigger_action(QWebEnginePage.Redo) - - def cut(self): - self._trigger_action(QWebEnginePage.Cut) - - def copy(self): - self._trigger_action(QWebEnginePage.Copy) - - def paste(self): - self._trigger_action(QWebEnginePage.Paste) - - def select_all(self): - self._trigger_action(QWebEnginePage.SelectAll) - - def show_history(self): - index = self.currentIndex() - if index >= 0: - webengineview = self._webengineviews[index] - history_window = self._history_windows.get(webengineview) - if not history_window: - history = webengineview.page().history() - history_window = HistoryWindow(history, self) - history_window.open_url.connect(self.load) - history_window.setWindowFlags(history_window.windowFlags() - | Qt.Window) - history_window.setWindowTitle('History') - self._history_windows[webengineview] = history_window - else: - history_window.refresh() - history_window.show() - history_window.raise_() - - def zoom_factor(self): - return self._webengineviews[0].zoomFactor() if self._webengineviews else 1.0 - - def set_zoom_factor(self, z): - for w in self._webengineviews: - w.setZoomFactor(z) - - def _handle_tab_context_menu(self, point): - index = self.tabBar().tabAt(point) - if index < 0: - return - tab_count = len(self._webengineviews) - context_menu = QMenu() - duplicate_tab_action = context_menu.addAction("Duplicate Tab") - close_other_tabs_action = context_menu.addAction("Close Other Tabs") - close_other_tabs_action.setEnabled(tab_count > 1) - close_tabs_to_the_right_action = context_menu.addAction("Close Tabs to the Right") - close_tabs_to_the_right_action.setEnabled(index < tab_count - 1) - close_tab_action = context_menu.addAction("&Close Tab") - chosen_action = context_menu.exec(self.tabBar().mapToGlobal(point)) - if chosen_action == duplicate_tab_action: - current_url = self.url() - self.add_browser_tab().load(current_url) - elif chosen_action == close_other_tabs_action: - for t in range(tab_count - 1, -1, -1): - if t != index: - self.handle_tab_close_request(t) - elif chosen_action == close_tabs_to_the_right_action: - for t in range(tab_count - 1, index, -1): - self.handle_tab_close_request(t) - elif chosen_action == close_tab_action: - self.handle_tab_close_request(index) - - def handle_tab_close_request(self, index): - if (index >= 0 and self.count() > 1): - webengineview = self._webengineviews[index] - if self._history_windows.get(webengineview): - del self._history_windows[webengineview] - self._webengineviews.remove(webengineview) - self.removeTab(index) - - def close_current_tab(self): - self.handle_tab_close_request(self.currentIndex()) - - def _trigger_action(self, action): - index = self.currentIndex() - if index >= 0: - self._webengineviews[index].page().triggerAction(action) - - def _index_of_page(self, web_page): - for p in range(0, len(self._webengineviews)): - if (self._webengineviews[p].page() == web_page): - return p - return -1 - - def _download_requested(self, item): - self.download_requested.emit(item) diff --git a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png Binary files differdeleted file mode 100644 index 27c3daa09..000000000 --- a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png +++ /dev/null diff --git a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst deleted file mode 100644 index d8f5deb8d..000000000 --- a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst +++ /dev/null @@ -1,58 +0,0 @@ -********************** -Web Browser Example -********************** - -The example demonstrates the power and simplicity offered by |project| to developers. -It uses several |pymodname| submodules to offer a fluid and modern-looking UI that -is apt for a web browser. The application offers the following features: - - * Tab-based browsing experience using QTabWidget. - * Download manager using a QProgressBar and QWebEngineDownloadItem. - * Bookmark manager using QTreeView. - -.. image:: tabbedbrowser.png - -The application's code is organized in several parts for ease of maintenance. For example, -:code:`DownloadWidget` provides a widget to track progress of a download item. In the following -sections, these different parts are discussed briefly to help you understand the Python code behind -them a little better. - -BookmarkWidget or :code:`bookmarkwidget.py` -=========================================== - -This widget docks to the left of the main window by default. It inherits QTreeView and -loads a default set of bookmarks using a QStandardItemModel. The model is populated at startup -from a JSON file, which is updated when you add or remove bookmarks from the tree view. - -.. automodule:: bookmarkwidget - :members: - -DownloadWidget or :code:`downloadwidget.py` -============================================= - -The widget tracks progress of the download item. It inherits QProgressBar to display -progress of the QWebEngineDownloadItem instance, and offers a context-menu with actions such as Launch, -Show in folder, Cancel, and Remove. - -.. automodule:: downloadwidget - :members: - -BrowserTabWidget or :code:`browsertabwidget.py` -=============================================== - -The widget includes a QWebEngineView to enable viewing web content. It docks to the right -of BookmarkWidget in the main window. - -.. automodule:: browsertabwidget - :members: - -MainWindow or :code:`main.py` -============================= - -This is the parent window that collates all the other widgets together to offer the complete package. - -.. automodule:: main - :members: - - -Try running the example to explore it further. diff --git a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py b/examples/webenginewidgets/tabbedbrowser/downloadwidget.py deleted file mode 100644 index aa1479eba..000000000 --- a/examples/webenginewidgets/tabbedbrowser/downloadwidget.py +++ /dev/null @@ -1,148 +0,0 @@ -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -import sys -from PySide6 import QtCore -from PySide6.QtCore import QDir, QFileInfo, QStandardPaths, Qt, QUrl -from PySide6.QtGui import QDesktopServices -from PySide6.QtWidgets import QMenu, QProgressBar, QStyleFactory -from PySide6.QtWebEngineCore import QWebEngineDownloadRequest - - -# A QProgressBar with context menu for displaying downloads in a QStatusBar. -class DownloadWidget(QProgressBar): - """Lets you track progress of a QWebEngineDownloadRequest.""" - finished = QtCore.Signal() - remove_requested = QtCore.Signal() - - def __init__(self, download_item): - super().__init__() - self._download_item = download_item - download_item.finished.connect(self._finished) - download_item.downloadProgress.connect(self._download_progress) - download_item.stateChanged.connect(self._update_tool_tip()) - path = download_item.path() - self.setMaximumWidth(300) - # Shorten 'PySide6-5.11.0a1-5.11.0-cp36-cp36m-linux_x86_64.whl'... - description = QFileInfo(path).fileName() - description_length = len(description) - if description_length > 30: - description_ini = description[0:10] - description_end = description[description_length - 10:] - description = f'{description_ini}...{description_end}' - self.setFormat(f'{description} %p%') - self.setOrientation(Qt.Horizontal) - self.setMinimum(0) - self.setValue(0) - self.setMaximum(100) - self._update_tool_tip() - # Force progress bar text to be shown on macoS by using 'fusion' style - if sys.platform == 'darwin': - self.setStyle(QStyleFactory.create('fusion')) - - @staticmethod - def open_file(file): - QDesktopServices.openUrl(QUrl.fromLocalFile(file)) - - @staticmethod - def open_download_directory(): - path = QStandardPaths.writableLocation(QStandardPaths.DownloadLocation) - DownloadWidget.open_file(path) - - def state(self): - return self._download_item.state() - - def _update_tool_tip(self): - path = self._download_item.path() - url_str = self._download_item.url().toString() - native_sep = QDir.toNativeSeparators(path) - tool_tip = f"{url_str}\n{native_sep}" - total_bytes = self._download_item.totalBytes() - if total_bytes > 0: - tool_tip += f"\n{total_bytes / 1024}K" - state = self.state() - if state == QWebEngineDownloadRequest.DownloadRequested: - tool_tip += "\n(requested)" - elif state == QWebEngineDownloadRequest.DownloadInProgress: - tool_tip += "\n(downloading)" - elif state == QWebEngineDownloadRequest.DownloadCompleted: - tool_tip += "\n(completed)" - elif state == QWebEngineDownloadRequest.DownloadCancelled: - tool_tip += "\n(cancelled)" - else: - tool_tip += "\n(interrupted)" - self.setToolTip(tool_tip) - - def _download_progress(self, bytes_received, bytes_total): - self.setValue(int(100 * bytes_received / bytes_total)) - - def _finished(self): - self._update_tool_tip() - self.finished.emit() - - def _launch(self): - DownloadWidget.open_file(self._download_item.path()) - - def mouseDoubleClickEvent(self, event): - if self.state() == QWebEngineDownloadRequest.DownloadCompleted: - self._launch() - - def contextMenuEvent(self, event): - state = self.state() - context_menu = QMenu() - launch_action = context_menu.addAction("Launch") - launch_action.setEnabled(state == QWebEngineDownloadRequest.DownloadCompleted) - show_in_folder_action = context_menu.addAction("Show in Folder") - show_in_folder_action.setEnabled(state == QWebEngineDownloadRequest.DownloadCompleted) - cancel_action = context_menu.addAction("Cancel") - cancel_action.setEnabled(state == QWebEngineDownloadRequest.DownloadInProgress) - remove_action = context_menu.addAction("Remove") - remove_action.setEnabled(state != QWebEngineDownloadRequest.DownloadInProgress) - - chosen_action = context_menu.exec(event.globalPos()) - if chosen_action == launch_action: - self._launch() - elif chosen_action == show_in_folder_action: - path = QFileInfo(self._download_item.path()).absolutePath() - DownloadWidget.open_file(path) - elif chosen_action == cancel_action: - self._download_item.cancel() - elif chosen_action == remove_action: - self.remove_requested.emit() diff --git a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py b/examples/webenginewidgets/tabbedbrowser/findtoolbar.py deleted file mode 100644 index c38f01afa..000000000 --- a/examples/webenginewidgets/tabbedbrowser/findtoolbar.py +++ /dev/null @@ -1,99 +0,0 @@ -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -from PySide6 import QtCore -from PySide6.QtCore import Qt -from PySide6.QtGui import QIcon, QKeySequence -from PySide6.QtWidgets import QCheckBox, QLineEdit, QToolBar, QToolButton -from PySide6.QtWebEngineCore import QWebEnginePage - - -# A Find tool bar (bottom area) -class FindToolBar(QToolBar): - - find = QtCore.Signal(str, QWebEnginePage.FindFlags) - - def __init__(self): - super().__init__() - self._line_edit = QLineEdit() - self._line_edit.setClearButtonEnabled(True) - self._line_edit.setPlaceholderText("Find...") - self._line_edit.setMaximumWidth(300) - self._line_edit.returnPressed.connect(self._find_next) - self.addWidget(self._line_edit) - - self._previous_button = QToolButton() - style_icons = ':/qt-project.org/styles/commonstyle/images/' - self._previous_button.setIcon(QIcon(style_icons + 'up-32.png')) - self._previous_button.clicked.connect(self._find_previous) - self.addWidget(self._previous_button) - - self._next_button = QToolButton() - self._next_button.setIcon(QIcon(style_icons + 'down-32.png')) - self._next_button.clicked.connect(self._find_next) - self.addWidget(self._next_button) - - self._case_sensitive_checkbox = QCheckBox('Case Sensitive') - self.addWidget(self._case_sensitive_checkbox) - - self._hideButton = QToolButton() - self._hideButton.setShortcut(QKeySequence(Qt.Key_Escape)) - self._hideButton.setIcon(QIcon(style_icons + 'closedock-16.png')) - self._hideButton.clicked.connect(self.hide) - self.addWidget(self._hideButton) - - def focus_find(self): - self._line_edit.setFocus() - - def _emit_find(self, backward): - needle = self._line_edit.text().strip() - if needle: - flags = QWebEnginePage.FindFlags() - if self._case_sensitive_checkbox.isChecked(): - flags |= QWebEnginePage.FindCaseSensitively - if backward: - flags |= QWebEnginePage.FindBackward - self.find.emit(needle, flags) - - def _find_next(self): - self._emit_find(False) - - def _find_previous(self): - self._emit_find(True) diff --git a/examples/webenginewidgets/tabbedbrowser/historywindow.py b/examples/webenginewidgets/tabbedbrowser/historywindow.py deleted file mode 100644 index bc2640e69..000000000 --- a/examples/webenginewidgets/tabbedbrowser/historywindow.py +++ /dev/null @@ -1,103 +0,0 @@ -############################################################################# -## -## Copyright (C) 2019 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -from PySide6.QtWidgets import QApplication, QTreeView - -from PySide6.QtCore import Signal, QAbstractTableModel, QModelIndex, Qt, QUrl - - -class HistoryModel(QAbstractTableModel): - - def __init__(self, history, parent=None): - super().__init__(parent) - self._history = history - - def headerData(self, section, orientation, role=Qt.DisplayRole): - if orientation == Qt.Horizontal and role == Qt.DisplayRole: - return 'Title' if section == 0 else 'Url' - return None - - def rowCount(self, index=QModelIndex()): - return self._history.count() - - def columnCount(self, index=QModelIndex()): - return 2 - - def item_at(self, model_index): - return self._history.itemAt(model_index.row()) - - def data(self, index, role=Qt.DisplayRole): - item = self.item_at(index) - column = index.column() - if role == Qt.DisplayRole: - return item.title() if column == 0 else item.url().toString() - return None - - def refresh(self): - self.beginResetModel() - self.endResetModel() - - -class HistoryWindow(QTreeView): - - open_url = Signal(QUrl) - - def __init__(self, history, parent): - super().__init__(parent) - - self._model = HistoryModel(history, self) - self.setModel(self._model) - self.activated.connect(self._activated) - - screen = QApplication.desktop().screenGeometry(parent) - self.resize(screen.width() / 3, screen.height() / 3) - self._adjustSize() - - def refresh(self): - self._model.refresh() - self._adjustSize() - - def _adjustSize(self): - if (self._model.rowCount() > 0): - self.resizeColumnToContents(0) - - def _activated(self, index): - item = self._model.item_at(index) - self.open_url.emit(item.url()) diff --git a/examples/webenginewidgets/tabbedbrowser/main.py b/examples/webenginewidgets/tabbedbrowser/main.py deleted file mode 100644 index 400a87540..000000000 --- a/examples/webenginewidgets/tabbedbrowser/main.py +++ /dev/null @@ -1,395 +0,0 @@ - -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -"""PySide6 WebEngineWidgets Example""" - -import sys -from bookmarkwidget import BookmarkWidget -from browsertabwidget import BrowserTabWidget -from downloadwidget import DownloadWidget -from findtoolbar import FindToolBar -from webengineview import WebEngineView -from PySide6 import QtCore -from PySide6.QtCore import Qt, QUrl -from PySide6.QtGui import QAction, QKeySequence, QIcon -from PySide6.QtWidgets import (QApplication, QDockWidget, QLabel, - QLineEdit, QMainWindow, QToolBar) -from PySide6.QtWebEngineCore import QWebEngineDownloadRequest, QWebEnginePage - -main_windows = [] - - -def create_main_window(): - """Creates a MainWindow using 75% of the available screen resolution.""" - main_win = MainWindow() - main_windows.append(main_win) - available_geometry = main_win.screen().availableGeometry() - main_win.resize(available_geometry.width() * 2 / 3, - available_geometry.height() * 2 / 3) - main_win.show() - return main_win - - -def create_main_window_with_browser(): - """Creates a MainWindow with a BrowserTabWidget.""" - main_win = create_main_window() - return main_win.add_browser_tab() - - -class MainWindow(QMainWindow): - """Provides the parent window that includes the BookmarkWidget, - BrowserTabWidget, and a DownloadWidget, to offer the complete - web browsing experience.""" - - def __init__(self): - super().__init__() - - self.setWindowTitle('PySide6 tabbed browser Example') - - self._tab_widget = BrowserTabWidget(create_main_window_with_browser) - self._tab_widget.enabled_changed.connect(self._enabled_changed) - self._tab_widget.download_requested.connect(self._download_requested) - self.setCentralWidget(self._tab_widget) - self.connect(self._tab_widget, QtCore.SIGNAL("url_changed(QUrl)"), - self.url_changed) - - self._bookmark_dock = QDockWidget() - self._bookmark_dock.setWindowTitle('Bookmarks') - self._bookmark_widget = BookmarkWidget() - self._bookmark_widget.open_bookmark.connect(self.load_url) - self._bookmark_widget.open_bookmark_in_new_tab.connect(self.load_url_in_new_tab) - self._bookmark_dock.setWidget(self._bookmark_widget) - self.addDockWidget(Qt.LeftDockWidgetArea, self._bookmark_dock) - - self._find_tool_bar = None - - self._actions = {} - self._create_menu() - - self._tool_bar = QToolBar() - self.addToolBar(self._tool_bar) - for action in self._actions.values(): - if not action.icon().isNull(): - self._tool_bar.addAction(action) - - self._addres_line_edit = QLineEdit() - self._addres_line_edit.setClearButtonEnabled(True) - self._addres_line_edit.returnPressed.connect(self.load) - self._tool_bar.addWidget(self._addres_line_edit) - self._zoom_label = QLabel() - self.statusBar().addPermanentWidget(self._zoom_label) - self._update_zoom_label() - - self._bookmarksToolBar = QToolBar() - self.addToolBar(Qt.TopToolBarArea, self._bookmarksToolBar) - self.insertToolBarBreak(self._bookmarksToolBar) - self._bookmark_widget.changed.connect(self._update_bookmarks) - self._update_bookmarks() - - def _update_bookmarks(self): - self._bookmark_widget.populate_tool_bar(self._bookmarksToolBar) - self._bookmark_widget.populate_other(self._bookmark_menu, 3) - - def _create_menu(self): - file_menu = self.menuBar().addMenu("&File") - exit_action = QAction(QIcon.fromTheme("application-exit"), "E&xit", - self, shortcut="Ctrl+Q", triggered=qApp.quit) - file_menu.addAction(exit_action) - - navigation_menu = self.menuBar().addMenu("&Navigation") - - style_icons = ':/qt-project.org/styles/commonstyle/images/' - back_action = QAction(QIcon.fromTheme("go-previous", - QIcon(style_icons + 'left-32.png')), - "Back", self, - shortcut=QKeySequence(QKeySequence.Back), - triggered=self._tab_widget.back) - self._actions[QWebEnginePage.Back] = back_action - back_action.setEnabled(False) - navigation_menu.addAction(back_action) - forward_action = QAction(QIcon.fromTheme("go-next", - QIcon(style_icons + 'right-32.png')), - "Forward", self, - shortcut=QKeySequence(QKeySequence.Forward), - triggered=self._tab_widget.forward) - forward_action.setEnabled(False) - self._actions[QWebEnginePage.Forward] = forward_action - - navigation_menu.addAction(forward_action) - reload_action = QAction(QIcon(style_icons + 'refresh-32.png'), - "Reload", self, - shortcut=QKeySequence(QKeySequence.Refresh), - triggered=self._tab_widget.reload) - self._actions[QWebEnginePage.Reload] = reload_action - reload_action.setEnabled(False) - navigation_menu.addAction(reload_action) - - navigation_menu.addSeparator() - - new_tab_action = QAction("New Tab", self, - shortcut='Ctrl+T', - triggered=self.add_browser_tab) - navigation_menu.addAction(new_tab_action) - - close_tab_action = QAction("Close Current Tab", self, - shortcut="Ctrl+W", - triggered=self._close_current_tab) - navigation_menu.addAction(close_tab_action) - - navigation_menu.addSeparator() - - history_action = QAction("History...", self, - triggered=self._tab_widget.show_history) - navigation_menu.addAction(history_action) - - edit_menu = self.menuBar().addMenu("&Edit") - - find_action = QAction("Find", self, - shortcut=QKeySequence(QKeySequence.Find), - triggered=self._show_find) - edit_menu.addAction(find_action) - - edit_menu.addSeparator() - undo_action = QAction("Undo", self, - shortcut=QKeySequence(QKeySequence.Undo), - triggered=self._tab_widget.undo) - self._actions[QWebEnginePage.Undo] = undo_action - undo_action.setEnabled(False) - edit_menu.addAction(undo_action) - - redo_action = QAction("Redo", self, - shortcut=QKeySequence(QKeySequence.Redo), - triggered=self._tab_widget.redo) - self._actions[QWebEnginePage.Redo] = redo_action - redo_action.setEnabled(False) - edit_menu.addAction(redo_action) - - edit_menu.addSeparator() - - cut_action = QAction("Cut", self, - shortcut=QKeySequence(QKeySequence.Cut), - triggered=self._tab_widget.cut) - self._actions[QWebEnginePage.Cut] = cut_action - cut_action.setEnabled(False) - edit_menu.addAction(cut_action) - - copy_action = QAction("Copy", self, - shortcut=QKeySequence(QKeySequence.Copy), - triggered=self._tab_widget.copy) - self._actions[QWebEnginePage.Copy] = copy_action - copy_action.setEnabled(False) - edit_menu.addAction(copy_action) - - paste_action = QAction("Paste", self, - shortcut=QKeySequence(QKeySequence.Paste), - triggered=self._tab_widget.paste) - self._actions[QWebEnginePage.Paste] = paste_action - paste_action.setEnabled(False) - edit_menu.addAction(paste_action) - - edit_menu.addSeparator() - - select_all_action = QAction("Select All", self, - shortcut=QKeySequence(QKeySequence.SelectAll), - triggered=self._tab_widget.select_all) - self._actions[QWebEnginePage.SelectAll] = select_all_action - select_all_action.setEnabled(False) - edit_menu.addAction(select_all_action) - - self._bookmark_menu = self.menuBar().addMenu("&Bookmarks") - add_bookmark_action = QAction("&Add Bookmark", self, - triggered=self._add_bookmark) - self._bookmark_menu.addAction(add_bookmark_action) - add_tool_bar_bookmark_action = QAction("&Add Bookmark to Tool Bar", self, - triggered=self._add_tool_bar_bookmark) - self._bookmark_menu.addAction(add_tool_bar_bookmark_action) - self._bookmark_menu.addSeparator() - - tools_menu = self.menuBar().addMenu("&Tools") - download_action = QAction("Open Downloads", self, - triggered=DownloadWidget.open_download_directory) - tools_menu.addAction(download_action) - - window_menu = self.menuBar().addMenu("&Window") - - window_menu.addAction(self._bookmark_dock.toggleViewAction()) - - window_menu.addSeparator() - - zoom_in_action = QAction(QIcon.fromTheme("zoom-in"), - "Zoom In", self, - shortcut=QKeySequence(QKeySequence.ZoomIn), - triggered=self._zoom_in) - window_menu.addAction(zoom_in_action) - zoom_out_action = QAction(QIcon.fromTheme("zoom-out"), - "Zoom Out", self, - shortcut=QKeySequence(QKeySequence.ZoomOut), - triggered=self._zoom_out) - window_menu.addAction(zoom_out_action) - - reset_zoom_action = QAction(QIcon.fromTheme("zoom-original"), - "Reset Zoom", self, - shortcut="Ctrl+0", - triggered=self._reset_zoom) - window_menu.addAction(reset_zoom_action) - - about_menu = self.menuBar().addMenu("&About") - about_action = QAction("About Qt", self, - shortcut=QKeySequence(QKeySequence.HelpContents), - triggered=qApp.aboutQt) - about_menu.addAction(about_action) - - def add_browser_tab(self): - return self._tab_widget.add_browser_tab() - - def _close_current_tab(self): - if self._tab_widget.count() > 1: - self._tab_widget.close_current_tab() - else: - self.close() - - def close_event(self, event): - main_windows.remove(self) - event.accept() - - def load(self): - url_string = self._addres_line_edit.text().strip() - if url_string: - self.load_url_string(url_string) - - def load_url_string(self, url_s): - url = QUrl.fromUserInput(url_s) - if (url.isValid()): - self.load_url(url) - - def load_url(self, url): - self._tab_widget.load(url) - - def load_url_in_new_tab(self, url): - self.add_browser_tab().load(url) - - def url_changed(self, url): - self._addres_line_edit.setText(url.toString()) - - def _enabled_changed(self, web_action, enabled): - action = self._actions[web_action] - if action: - action.setEnabled(enabled) - - def _add_bookmark(self): - index = self._tab_widget.currentIndex() - if index >= 0: - url = self._tab_widget.url() - title = self._tab_widget.tabText(index) - icon = self._tab_widget.tabIcon(index) - self._bookmark_widget.add_bookmark(url, title, icon) - - def _add_tool_bar_bookmark(self): - index = self._tab_widget.currentIndex() - if index >= 0: - url = self._tab_widget.url() - title = self._tab_widget.tabText(index) - icon = self._tab_widget.tabIcon(index) - self._bookmark_widget.add_tool_bar_bookmark(url, title, icon) - - def _zoom_in(self): - new_zoom = self._tab_widget.zoom_factor() * 1.5 - if (new_zoom <= WebEngineView.maximum_zoom_factor()): - self._tab_widget.set_zoom_factor(new_zoom) - self._update_zoom_label() - - def _zoom_out(self): - new_zoom = self._tab_widget.zoom_factor() / 1.5 - if (new_zoom >= WebEngineView.minimum_zoom_factor()): - self._tab_widget.set_zoom_factor(new_zoom) - self._update_zoom_label() - - def _reset_zoom(self): - self._tab_widget.set_zoom_factor(1) - self._update_zoom_label() - - def _update_zoom_label(self): - percent = int(self._tab_widget.zoom_factor() * 100) - self._zoom_label.setText(f"{percent}%") - - def _download_requested(self, item): - # Remove old downloads before opening a new one - for old_download in self.statusBar().children(): - if (type(old_download).__name__ == 'DownloadWidget' and - old_download.state() != QWebEngineDownloadItem.DownloadInProgress): - self.statusBar().removeWidget(old_download) - del old_download - - item.accept() - download_widget = DownloadWidget(item) - download_widget.remove_requested.connect(self._remove_download_requested, - Qt.QueuedConnection) - self.statusBar().addWidget(download_widget) - - def _remove_download_requested(self): - download_widget = self.sender() - self.statusBar().removeWidget(download_widget) - del download_widget - - def _show_find(self): - if self._find_tool_bar is None: - self._find_tool_bar = FindToolBar() - self._find_tool_bar.find.connect(self._tab_widget.find) - self.addToolBar(Qt.BottomToolBarArea, self._find_tool_bar) - else: - self._find_tool_bar.show() - self._find_tool_bar.focus_find() - - def write_bookmarks(self): - self._bookmark_widget.write_bookmarks() - - -if __name__ == '__main__': - app = QApplication(sys.argv) - main_win = create_main_window() - initial_urls = sys.argv[1:] - if not initial_urls: - initial_urls.append('http://qt.io') - for url in initial_urls: - main_win.load_url_in_new_tab(QUrl.fromUserInput(url)) - exit_code = app.exec() - main_win.write_bookmarks() - sys.exit(exit_code) diff --git a/examples/webenginewidgets/tabbedbrowser/tabbedbrowser.pyproject b/examples/webenginewidgets/tabbedbrowser/tabbedbrowser.pyproject deleted file mode 100644 index 1d26848b0..000000000 --- a/examples/webenginewidgets/tabbedbrowser/tabbedbrowser.pyproject +++ /dev/null @@ -1,5 +0,0 @@ -{ - "files": ["main.py", "bookmarkwidget.py", "browsertabwidget.py", - "downloadwidget.py", "findtoolbar.py", "historywindow.py", - "webengineview.py"] -} diff --git a/examples/webenginewidgets/tabbedbrowser/webengineview.py b/examples/webenginewidgets/tabbedbrowser/webengineview.py deleted file mode 100644 index 19a16e8d3..000000000 --- a/examples/webenginewidgets/tabbedbrowser/webengineview.py +++ /dev/null @@ -1,92 +0,0 @@ -############################################################################# -## -## Copyright (C) 2018 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# - -from PySide6.QtWebEngineCore import QWebEnginePage -from PySide6.QtWebEngineWidgets import QWebEngineView - -from PySide6 import QtCore - -_web_actions = [QWebEnginePage.Back, QWebEnginePage.Forward, - QWebEnginePage.Reload, - QWebEnginePage.Undo, QWebEnginePage.Redo, - QWebEnginePage.Cut, QWebEnginePage.Copy, - QWebEnginePage.Paste, QWebEnginePage.SelectAll] - - -class WebEngineView(QWebEngineView): - - enabled_changed = QtCore.Signal(QWebEnginePage.WebAction, bool) - - @staticmethod - def web_actions(): - return _web_actions - - @staticmethod - def minimum_zoom_factor(): - return 0.25 - - @staticmethod - def maximum_zoom_factor(): - return 5 - - def __init__(self, tab_factory_func, window_factory_func): - super().__init__() - self._tab_factory_func = tab_factory_func - self._window_factory_func = window_factory_func - page = self.page() - self._actions = {} - for web_action in WebEngineView.web_actions(): - action = page.action(web_action) - action.changed.connect(self._enabled_changed) - self._actions[action] = web_action - - def is_web_action_enabled(self, web_action): - return self.page().action(web_action).isEnabled() - - def createWindow(self, window_type): - if (window_type == QWebEnginePage.WebBrowserTab or - window_type == QWebEnginePage.WebBrowserBackgroundTab): - return self._tab_factory_func() - return self._window_factory_func() - - def _enabled_changed(self): - action = self.sender() - web_action = self._actions[action] - self.enabled_changed.emit(web_action, action.isEnabled()) diff --git a/examples/webenginewidgets/simplebrowser/doc/simplebrowser.png b/examples/webenginewidgets/widgetsnanobrowser/doc/widgetsnanobrowser.png Binary files differindex 3fa5a0046..3fa5a0046 100644 --- a/examples/webenginewidgets/simplebrowser/doc/simplebrowser.png +++ b/examples/webenginewidgets/widgetsnanobrowser/doc/widgetsnanobrowser.png diff --git a/examples/webenginewidgets/widgetsnanobrowser/doc/widgetsnanobrowser.rst b/examples/webenginewidgets/widgetsnanobrowser/doc/widgetsnanobrowser.rst new file mode 100644 index 000000000..d9358a230 --- /dev/null +++ b/examples/webenginewidgets/widgetsnanobrowser/doc/widgetsnanobrowser.rst @@ -0,0 +1,8 @@ +Qt Widgets Nano Browser Example +=============================== + +A minimal browser based on Qt WebEngine Widgets. + +.. image:: widgetsnanobrowser.png + :width: 400 + :alt: Minimal Browser Screenshot diff --git a/examples/webenginewidgets/simplebrowser/simplebrowser.py b/examples/webenginewidgets/widgetsnanobrowser/widgetsnanobrowser.py index e3f45356b..2db865996 100644 --- a/examples/webenginewidgets/simplebrowser/simplebrowser.py +++ b/examples/webenginewidgets/widgetsnanobrowser/widgetsnanobrowser.py @@ -1,51 +1,13 @@ - -############################################################################# -## -## Copyright (C) 2017 The Qt Company Ltd. -## Contact: http://www.qt.io/licensing/ -## -## This file is part of the Qt for Python examples of the Qt Toolkit. -## -## $QT_BEGIN_LICENSE:BSD$ -## You may use this file under the terms of the BSD license as follows: -## -## "Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are -## met: -## * Redistributions of source code must retain the above copyright -## notice, this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright -## notice, this list of conditions and the following disclaimer in -## the documentation and/or other materials provided with the -## distribution. -## * Neither the name of The Qt Company Ltd nor the names of its -## contributors may be used to endorse or promote products derived -## from this software without specific prior written permission. -## -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -## -## $QT_END_LICENSE$ -## -############################################################################# +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause """PySide6 WebEngineWidgets Example""" import sys -from PySide6.QtCore import QUrl +from PySide6.QtCore import QUrl, Slot from PySide6.QtGui import QIcon from PySide6.QtWidgets import (QApplication, QLineEdit, - QMainWindow, QPushButton, QToolBar) + QMainWindow, QPushButton, QToolBar) from PySide6.QtWebEngineCore import QWebEnginePage from PySide6.QtWebEngineWidgets import QWebEngineView @@ -80,17 +42,21 @@ class MainWindow(QMainWindow): self.webEngineView.page().titleChanged.connect(self.setWindowTitle) self.webEngineView.page().urlChanged.connect(self.urlChanged) + @Slot() def load(self): url = QUrl.fromUserInput(self.addressLineEdit.text()) if url.isValid(): self.webEngineView.load(url) + @Slot() def back(self): self.webEngineView.page().triggerAction(QWebEnginePage.Back) + @Slot() def forward(self): self.webEngineView.page().triggerAction(QWebEnginePage.Forward) + @Slot(QUrl) def urlChanged(self, url): self.addressLineEdit.setText(url.toString()) diff --git a/examples/webenginewidgets/widgetsnanobrowser/widgetsnanobrowser.pyproject b/examples/webenginewidgets/widgetsnanobrowser/widgetsnanobrowser.pyproject new file mode 100644 index 000000000..c054184df --- /dev/null +++ b/examples/webenginewidgets/widgetsnanobrowser/widgetsnanobrowser.pyproject @@ -0,0 +1,3 @@ +{ + "files": ["widgetsnanobrowser.py"] +} |