Change imports to pyside

(and rename slots and signals)
This commit is contained in:
Daniel Martin 2024-02-02 23:30:16 +13:00
parent 96afaf361f
commit 94b1aad379
249 changed files with 472 additions and 473 deletions

View File

@ -31,7 +31,7 @@ install:
# Update pip # Update pip
- python -m pip install --upgrade pip - python -m pip install --upgrade pip
# Install generic dependencies from pypi. # Install generic dependencies from pypi.
- python -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock psycopg2-binary websockets waitress six requests QtAwesome PyQt6 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc flask-cors pytest-qt pyenchant pysword qrcode flask - python -m pip install sqlalchemy alembic appdirs chardet beautifulsoup4 lxml Mako mysql-connector-python pytest mock psycopg2-binary websockets waitress six requests QtAwesome PySide6 pymediainfo PyMuPDF QDarkStyle python-vlc flask-cors pytest-qt pyenchant pysword qrcode flask
# Install Windows only dependencies # Install Windows only dependencies
- cmd: python -m pip install pyodbc pypiwin32 - cmd: python -m pip install pyodbc pypiwin32
- cmd: choco install vlc %CHOCO_VLC_ARG% --no-progress --limit-output - cmd: choco install vlc %CHOCO_VLC_ARG% --no-progress --limit-output

View File

@ -27,7 +27,7 @@ import re
from datetime import date from datetime import date
from zipfile import ZipFile from zipfile import ZipFile
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation
from openlp.core.common.httputils import download_file, get_web_page, get_openlp_user_agent from openlp.core.common.httputils import download_file, get_web_page, get_openlp_user_agent
@ -45,8 +45,8 @@ class RemoteVersionWorker(ThreadWorker):
A worker class to fetch the version of the web remote. This is run from within a thread so that it A worker class to fetch the version of the web remote. This is run from within a thread so that it
doesn't affect the loading time of OpenLP. doesn't affect the loading time of OpenLP.
""" """
new_version = QtCore.pyqtSignal(str) new_version = QtCore.Signal(str)
no_internet = QtCore.pyqtSignal() no_internet = QtCore.Signal()
def __init__(self, current_version): def __init__(self, current_version):
""" """

View File

@ -27,7 +27,7 @@ from qrcode.image.svg import SvgPathFillImage
from time import sleep from time import sleep
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.api.deploy import download_and_install, download_version_info, get_installed_version from openlp.core.api.deploy import download_and_install, download_version_info, get_installed_version
from openlp.core.common import get_network_interfaces from openlp.core.common import get_network_interfaces

View File

@ -19,7 +19,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # # along with this program. If not, see <https://www.gnu.org/licenses/>. #
########################################################################## ##########################################################################
from flask import jsonify, Blueprint from flask import jsonify, Blueprint
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.api.lib import old_auth, old_success_response from openlp.core.api.lib import old_auth, old_success_response
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -21,7 +21,7 @@
import logging import logging
from flask import jsonify, request, abort, Blueprint from flask import jsonify, request, abort, Blueprint
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.api.lib import login_required from openlp.core.api.lib import login_required
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -24,7 +24,7 @@ import json
import re import re
from flask import abort, request, Blueprint, jsonify, Response from flask import abort, request, Blueprint, jsonify, Response
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.api.lib import login_required, extract_request, old_success_response, old_auth from openlp.core.api.lib import login_required, extract_request, old_success_response, old_auth
from openlp.core.lib.plugin import PluginStatus from openlp.core.lib.plugin import PluginStatus

View File

@ -30,7 +30,7 @@ from dataclasses import asdict, dataclass
from typing import Optional, Union from typing import Optional, Union
import time import time
from PyQt6 import QtCore from PySide6 import QtCore
from websockets import serve from websockets import serve
from openlp.core.common.mixins import LogMixin, RegistryProperties from openlp.core.common.mixins import LogMixin, RegistryProperties
@ -207,7 +207,7 @@ class WebSocketServer(RegistryBase, RegistryProperties, QtCore.QObject, LogMixin
""" """
Wrapper round a server instance Wrapper round a server instance
""" """
_send_message_signal = QtCore.pyqtSignal(WebSocketMessage) _send_message_signal = QtCore.Signal(WebSocketMessage)
def __init__(self): def __init__(self):
""" """
@ -231,7 +231,7 @@ class WebSocketServer(RegistryBase, RegistryProperties, QtCore.QObject, LogMixin
# Only hooking poller signals after all UI is available # Only hooking poller signals after all UI is available
Registry().register_function('bootstrap_completion', self.try_poller_hook_signals) Registry().register_function('bootstrap_completion', self.try_poller_hook_signals)
@QtCore.pyqtSlot() @QtCore.Slot()
def handle_poller_signal(self): def handle_poller_signal(self):
if self.worker is not None: if self.worker is not None:
self.worker.add_state_to_queues(poller.get_state()) self.worker.add_state_to_queues(poller.get_state())

View File

@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License # # You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. # # along with this program. If not, see <https://www.gnu.org/licenses/>. #
########################################################################## ##########################################################################
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties
@ -27,7 +27,7 @@ class WebSocketPoller(QtCore.QObject, RegistryProperties):
Accessed by web sockets to get status type information from the application Accessed by web sockets to get status type information from the application
""" """
poller_changed = QtCore.pyqtSignal() poller_changed = QtCore.Signal()
def __init__(self): def __init__(self):
""" """
@ -67,9 +67,9 @@ class WebSocketPoller(QtCore.QObject, RegistryProperties):
except Exception: except Exception:
pass pass
@QtCore.pyqtSlot(list) @QtCore.Slot(list)
@QtCore.pyqtSlot(str) @QtCore.Slot(str)
@QtCore.pyqtSlot() @QtCore.Slot()
def on_signal_received(self): def on_signal_received(self):
self._state = self.create_state() self._state = self.create_state()
self.poller_changed.emit() self.poller_changed.emit()

View File

@ -35,7 +35,7 @@ from pathlib import Path
from shutil import copytree, move from shutil import copytree, move
from traceback import format_exception from traceback import format_exception
from PyQt6 import QtCore, QtWebEngineCore, QtWidgets # noqa from PySide6 import QtCore, QtWebEngineCore, QtWidgets # noqa
from openlp.core.api.deploy import check_for_remote_update from openlp.core.api.deploy import check_for_remote_update
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation
@ -423,7 +423,7 @@ def apply_dpi_adjustments_stage_application(hidpi_mode: HiDPIMode, application:
""" """
if hidpi_mode == HiDPIMode.Default and is_win() and application.devicePixelRatio() > 1.0: if hidpi_mode == HiDPIMode.Default and is_win() and application.devicePixelRatio() > 1.0:
# Increasing font size to match pixel ratio (Windows only) # Increasing font size to match pixel ratio (Windows only)
# TODO: Review on PyQt6 migration # TODO: Review on Qt6 migration
font = application.font() font = application.font()
font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio()) font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio())
application.setFont(font) application.setFont(font)
@ -472,14 +472,14 @@ def main():
qt_args.extend(['-platform', 'windows:darkmode=1']) qt_args.extend(['-platform', 'windows:darkmode=1'])
elif is_macosx() and getattr(sys, 'frozen', False) and not os.environ.get('QTWEBENGINEPROCESS_PATH'): elif is_macosx() and getattr(sys, 'frozen', False) and not os.environ.get('QTWEBENGINEPROCESS_PATH'):
# Work around an issue where PyInstaller is not setting this environment variable # Work around an issue where PyInstaller is not setting this environment variable
os.environ['QTWEBENGINEPROCESS_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / 'PyQt6' / 'Qt6' / os.environ['QTWEBENGINEPROCESS_PATH'] = str(AppLocation.get_directory(AppLocation.AppDir) / 'PySide6' / 'Qt6' /
'lib' / 'QtWebEngineCore.framework' / 'Versions' / '6' / 'lib' / 'QtWebEngineCore.framework' / 'Versions' / '6' /
'Helpers' / 'QtWebEngineProcess.app' / 'Contents' / 'MacOS' / 'Helpers' / 'QtWebEngineProcess.app' / 'Contents' / 'MacOS' /
'QtWebEngineProcess') 'QtWebEngineProcess')
no_custom_factor_rounding = not ('QT_SCALE_FACTOR_ROUNDING_POLICY' in os.environ no_custom_factor_rounding = not ('QT_SCALE_FACTOR_ROUNDING_POLICY' in os.environ
and bool(os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'].strip())) and bool(os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'].strip()))
if no_custom_factor_rounding: if no_custom_factor_rounding:
# TODO Won't be needed on PyQt6 # TODO Won't be needed on PySide6
os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = 'PassThrough' os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'] = 'PassThrough'
# Initialise the resources # Initialise the resources
qInitResources() qInitResources()
@ -505,7 +505,7 @@ def main():
# Doing HiDPI adjustments that need to be done after QCoreApplication instantiation. # Doing HiDPI adjustments that need to be done after QCoreApplication instantiation.
apply_dpi_adjustments_stage_application(hidpi_mode, application) apply_dpi_adjustments_stage_application(hidpi_mode, application)
if no_custom_factor_rounding and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'): if no_custom_factor_rounding and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'):
# TODO: Check won't be needed on PyQt6 # TODO: Check won't be needed on PySide6
application.setHighDpiScaleFactorRoundingPolicy(QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough) application.setHighDpiScaleFactorRoundingPolicy(QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)
if is_win() and application.devicePixelRatio() > 1.0: if is_win() and application.devicePixelRatio() > 1.0:
# Increasing font size to match pixel ratio (Windows only) # Increasing font size to match pixel ratio (Windows only)

View File

@ -31,9 +31,9 @@ import traceback
from ipaddress import IPv4Address, IPv6Address, AddressValueError from ipaddress import IPv4Address, IPv6Address, AddressValueError
from shutil import which from shutil import which
from PyQt6 import QtGui from PySide6 import QtGui
from PyQt6.QtCore import QCryptographicHash as QHash from PySide6.QtCore import QCryptographicHash as QHash
from PyQt6.QtNetwork import QAbstractSocket, QHostAddress, QNetworkInterface from PySide6.QtNetwork import QAbstractSocket, QHostAddress, QNetworkInterface
from chardet.universaldetector import UniversalDetector from chardet.universaldetector import UniversalDetector
log = logging.getLogger(__name__ + '.__init__') log = logging.getLogger(__name__ + '.__init__')
@ -284,7 +284,7 @@ def sha256_file_hash(filename):
def qmd5_hash(salt=None, data=None): def qmd5_hash(salt=None, data=None):
""" """
Returns the hashed output of MD5Sum on salt, data Returns the hashed output of MD5Sum on salt, data
using PyQt6.QCryptographicHash. Function returns a using PySide6.QCryptographicHash. Function returns a
QByteArray instead of a text string. QByteArray instead of a text string.
If you need a string instead, call with If you need a string instead, call with

View File

@ -24,7 +24,7 @@ by the shortcuts system.
""" """
import logging import logging
from PyQt6 import QtCore, QtGui from PySide6 import QtCore, QtGui
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -26,7 +26,7 @@ from contextlib import contextmanager
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate

View File

@ -30,7 +30,7 @@ from random import randint
from tempfile import gettempdir from tempfile import gettempdir
import requests import requests
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.common import trace_error_handler from openlp.core.common import trace_error_handler
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
@ -249,8 +249,8 @@ class DownloadWorker(ThreadWorker):
""" """
This worker allows a file to be downloaded in a thread This worker allows a file to be downloaded in a thread
""" """
download_failed = QtCore.pyqtSignal() download_failed = QtCore.Signal()
download_succeeded = QtCore.pyqtSignal(Path) download_succeeded = QtCore.Signal(Path)
def __init__(self, base_url, file_name): def __init__(self, base_url, file_name):
""" """
@ -283,7 +283,7 @@ class DownloadWorker(ThreadWorker):
time.sleep(1) time.sleep(1)
self.quit.emit() self.quit.emit()
@QtCore.pyqtSlot() @QtCore.Slot()
def cancel_download(self): def cancel_download(self):
""" """
A slot to allow the download to be cancelled from outside of the thread A slot to allow the download to be cancelled from outside of the thread

View File

@ -27,7 +27,7 @@ import logging
import re import re
from collections import namedtuple from collections import namedtuple
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common import Singleton from openlp.core.common import Singleton
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation

View File

@ -110,7 +110,7 @@ def is_xorg_platform():
:return: True if the Qt is running on X.org/XWayland display server (Linux/*nix), otherwise False. :return: True if the Qt is running on X.org/XWayland display server (Linux/*nix), otherwise False.
""" """
from PyQt6 import QtGui from PySide6 import QtGui
return QtGui.QGuiApplication.platformName() == 'xcb' return QtGui.QGuiApplication.platformName() == 'xcb'
@ -120,5 +120,5 @@ def is_wayland_platform():
:return: True if the OpenLP/Qt instance is running in a Wayland compositor, otherwise False :return: True if the OpenLP/Qt instance is running in a Wayland compositor, otherwise False
""" """
from PyQt6 import QtGui from PySide6 import QtGui
return QtGui.QGuiApplication.platformName() == 'wayland' return QtGui.QGuiApplication.platformName() == 'wayland'

View File

@ -29,7 +29,7 @@ from enum import IntEnum
from pathlib import Path from pathlib import Path
from tempfile import gettempdir from tempfile import gettempdir
from PyQt6 import QtCore, QtGui from PySide6 import QtCore, QtGui
from openlp.core.common import SlideLimits, ThemeLevel from openlp.core.common import SlideLimits, ThemeLevel
from openlp.core.common.enum import AlertLocation, BibleSearch, CustomSearch, HiDPIMode, ImageThemeMode, LayoutStyle, \ from openlp.core.common.enum import AlertLocation, BibleSearch, CustomSearch, HiDPIMode, ImageThemeMode, LayoutStyle, \

View File

@ -28,7 +28,7 @@ import math
import os import os
import re import re
from PyQt6 import QtWidgets, QtGui from PySide6 import QtWidgets, QtGui
from openlp.core.common import ThemeLevel from openlp.core.common import ThemeLevel
from openlp.core.common.enum import ServiceItemType from openlp.core.common.enum import ServiceItemType

View File

@ -26,7 +26,7 @@ import logging
import copy import copy
from functools import cmp_to_key from functools import cmp_to_key
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common import Singleton from openlp.core.common import Singleton
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate

View File

@ -25,7 +25,7 @@ Heavily inspired by https://stackoverflow.com/questions/33467776/qt-qwebengine-r
import logging import logging
import os.path import os.path
from PyQt6 import QtCore, QtWebEngineCore, QtWebEngineWidgets, QtWidgets from PySide6 import QtCore, QtWebEngineCore, QtWebEngineWidgets, QtWidgets
from typing import Tuple from typing import Tuple
from openlp.core.common import Singleton from openlp.core.common import Singleton
@ -68,7 +68,7 @@ class WebEngineView(QtWebEngineWidgets.QWebEngineView):
and set some attributtes. and set some attributtes.
""" """
_child = None # QtWidgets.QOpenGLWidget or QWidget? _child = None # QtWidgets.QOpenGLWidget or QWidget?
delegatePaint = QtCore.pyqtSignal() delegatePaint = QtCore.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -27,7 +27,7 @@ import os
import copy import copy
import re import re
from PyQt6 import QtCore, QtWebChannel, QtWidgets from PySide6 import QtCore, QtWebChannel, QtWidgets
from openlp.core.common.enum import ServiceItemType from openlp.core.common.enum import ServiceItemType
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
@ -49,7 +49,7 @@ class DisplayWatcher(QtCore.QObject):
""" """
This facilitates communication from the Display object in the browser back to the Python This facilitates communication from the Display object in the browser back to the Python
""" """
initialised = QtCore.pyqtSignal(bool) initialised = QtCore.Signal(bool)
def __init__(self, parent, window_title=None): def __init__(self, parent, window_title=None):
super().__init__() super().__init__()
@ -59,11 +59,11 @@ class DisplayWatcher(QtCore.QObject):
self._event_counter = 0 self._event_counter = 0
self._window_title = window_title self._window_title = window_title
@QtCore.pyqtSlot(result=str) @QtCore.Slot(result=str)
def getWindowTitle(self): def getWindowTitle(self):
return self._window_title return self._window_title
@QtCore.pyqtSlot(bool) @QtCore.Slot(bool)
def setInitialised(self, is_initialised): def setInitialised(self, is_initialised):
""" """
This method is called from the JS in the browser to set the _is_initialised attribute This method is called from the JS in the browser to set the _is_initialised attribute
@ -71,14 +71,14 @@ class DisplayWatcher(QtCore.QObject):
log.info('Display is initialised: {init}'.format(init=is_initialised)) log.info('Display is initialised: {init}'.format(init=is_initialised))
self.initialised.emit(is_initialised) self.initialised.emit(is_initialised)
@QtCore.pyqtSlot() @QtCore.Slot()
def pleaseRepaint(self): def pleaseRepaint(self):
""" """
Called from the js in the webengine view when it's requesting a repaint by Qt Called from the js in the webengine view when it's requesting a repaint by Qt
""" """
self._display_window.webview.update() self._display_window.webview.update()
@QtCore.pyqtSlot(str, 'QJsonObject') @QtCore.Slot(str, 'QJsonObject')
def dispatchEvent(self, event_name, event_data): def dispatchEvent(self, event_name, event_data):
""" """
Called from the js in the webengine view for event dispatches Called from the js in the webengine view for event dispatches
@ -562,13 +562,13 @@ class DisplayWindow(QtWidgets.QWidget, RegistryProperties, LogMixin):
""" """
self._run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings)) self._run_javascript('Display.alert("{text}", {settings});'.format(text=text, settings=settings))
@QtCore.pyqtSlot(result='QPixmap') @QtCore.Slot(result='QPixmap')
def _grab_screenshot_safe_signal(self): def _grab_screenshot_safe_signal(self):
return self.save_screenshot() return self.save_screenshot()
def grab_screenshot_safe(self): def grab_screenshot_safe(self):
# Using internal Qt's messaging/event system to invoke the function. # Using internal Qt's messaging/event system to invoke the function.
# Usually we would need to use PyQt's signals, but they aren't blocking. So we had to resort to this solution, # Usually we would need to use PySide's signals, but they aren't blocking. So we had to resort to this solution,
# which use a less-documented Qt mechanism to invoke the signal in a blocking way. # which use a less-documented Qt mechanism to invoke the signal in a blocking way.
return QtCore.QMetaObject.invokeMethod(self, '_grab_screenshot_safe_signal', return QtCore.QMetaObject.invokeMethod(self, '_grab_screenshot_safe_signal',
QtCore.Qt.ConnectionType.BlockingQueuedConnection, QtCore.Qt.ConnectionType.BlockingQueuedConnection,

View File

@ -28,7 +28,7 @@ import base64
from enum import IntEnum from enum import IntEnum
from pathlib import Path from pathlib import Path
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -33,7 +33,7 @@ import time
from datetime import datetime from datetime import datetime
from threading import Timer from threading import Timer
from PyQt6 import QtWidgets # noqa from PySide6 import QtWidgets # noqa
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate

View File

@ -23,7 +23,7 @@ Provides the generic functions for interfacing plugins with the Media Manager.
""" """
import re import re
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.common.mixins import LogMixin, RegistryProperties from openlp.core.common.mixins import LogMixin, RegistryProperties

View File

@ -23,7 +23,7 @@ Provide plugin management
""" """
import os import os
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.state import State, MessageType from openlp.core.state import State, MessageType
from openlp.core.common import extension_loader from openlp.core.common import extension_loader

View File

@ -30,7 +30,7 @@ from copy import deepcopy
from pathlib import Path from pathlib import Path
from shutil import copytree, copy, move from shutil import copytree, copy, move
from PyQt6 import QtGui from PySide6 import QtGui
from openlp.core.common import ThemeLevel, sha256_file_hash from openlp.core.common import ThemeLevel, sha256_file_hash
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation

View File

@ -22,7 +22,7 @@
The :mod:`~openlp.core.lib.settingstab` module contains the base SettingsTab class which plugins use for adding their The :mod:`~openlp.core.lib.settingstab` module contains the base SettingsTab class which plugins use for adding their
own tab to the settings dialog. own tab to the settings dialog.
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties

View File

@ -23,7 +23,7 @@ The :mod:`ui` module provides standard UI components for OpenLP.
""" """
import logging import logging
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.actions import ActionList from openlp.core.common.actions import ActionList
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.pages` module contains wizard pages used in OpenLP The :mod:`~openlp.core.pages` module contains wizard pages used in OpenLP
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
class GridLayoutPage(QtWidgets.QWizardPage): class GridLayoutPage(QtWidgets.QWizardPage):

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.pages.alignment` module contains the alignment page used in the theme wizard The :mod:`~openlp.core.pages.alignment` module contains the alignment page used in the theme wizard
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.theme import HorizontalType, VerticalType, TransitionType, TransitionSpeed, TransitionDirection from openlp.core.lib.theme import HorizontalType, VerticalType, TransitionType, TransitionSpeed, TransitionDirection

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.pages.areaposition` module contains the area position page used in the theme wizard The :mod:`~openlp.core.pages.areaposition` module contains the area position page used in the theme wizard
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.pages import GridLayoutPage from openlp.core.pages import GridLayoutPage

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.pages.background` module contains the background page used in the theme wizard The :mod:`~openlp.core.pages.background` module contains the background page used in the theme wizard
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common import get_images_filter from openlp.core.common import get_images_filter
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.pages.fontselect` module contains the font selection page used in the theme wizard The :mod:`~openlp.core.pages.fontselect` module contains the font selection page used in the theme wizard
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.pages import GridLayoutPage from openlp.core.pages import GridLayoutPage
@ -39,19 +39,19 @@ class FontSelectPage(GridLayoutPage):
LineSpacing = 'line_spacing' LineSpacing = 'line_spacing'
LetterSpacing = 'letter_spacing' LetterSpacing = 'letter_spacing'
font_name_changed = QtCore.pyqtSignal(str) font_name_changed = QtCore.Signal(str)
font_size_changed = QtCore.pyqtSignal(int) font_size_changed = QtCore.Signal(int)
font_color_changed = QtCore.pyqtSignal(str) font_color_changed = QtCore.Signal(str)
is_bold_changed = QtCore.pyqtSignal(bool) is_bold_changed = QtCore.Signal(bool)
is_italic_changed = QtCore.pyqtSignal(bool) is_italic_changed = QtCore.Signal(bool)
line_spacing_changed = QtCore.pyqtSignal(int) line_spacing_changed = QtCore.Signal(int)
letter_spacing_changed = QtCore.pyqtSignal(int) letter_spacing_changed = QtCore.Signal(int)
is_outline_enabled_changed = QtCore.pyqtSignal(bool) is_outline_enabled_changed = QtCore.Signal(bool)
outline_color_changed = QtCore.pyqtSignal(str) outline_color_changed = QtCore.Signal(str)
outline_size_changed = QtCore.pyqtSignal(int) outline_size_changed = QtCore.Signal(int)
is_shadow_enabled_changed = QtCore.pyqtSignal(bool) is_shadow_enabled_changed = QtCore.Signal(bool)
shadow_color_changed = QtCore.pyqtSignal(str) shadow_color_changed = QtCore.Signal(str)
shadow_size_changed = QtCore.pyqtSignal(int) shadow_size_changed = QtCore.Signal(int)
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent) super().__init__(parent)

View File

@ -24,7 +24,7 @@ database.
""" """
import logging import logging
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common import verify_ip_address, Singleton from openlp.core.common import verify_ip_address, Singleton
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
@ -223,7 +223,7 @@ class ProjectorEditForm(QtWidgets.QDialog, Ui_ProjectorEditForm):
location = Column(String(30)) location = Column(String(30))
notes = Column(String(200)) notes = Column(String(200))
""" """
updateProjectors = QtCore.pyqtSignal() updateProjectors = QtCore.Signal()
def __init__(self, parent=None, projectordb=None): def __init__(self, parent=None, projectordb=None):
self.parent = parent self.parent = parent
@ -265,7 +265,7 @@ class ProjectorEditForm(QtWidgets.QDialog, Ui_ProjectorEditForm):
reply = QtWidgets.QDialog.exec(self) reply = QtWidgets.QDialog.exec(self)
return reply return reply
@QtCore.pyqtSlot() @QtCore.Slot()
def accept_me(self): def accept_me(self):
""" """
Validate inputs before accepting. Validate inputs before accepting.
@ -343,14 +343,14 @@ class ProjectorEditForm(QtWidgets.QDialog, Ui_ProjectorEditForm):
self.projector = None self.projector = None
self.close() self.close()
@QtCore.pyqtSlot() @QtCore.Slot()
def help_me(self): def help_me(self):
""" """
Show a help message about the input fields. Show a help message about the input fields.
""" """
log.debug('help_me() signal received') log.debug('help_me() signal received')
@QtCore.pyqtSlot() @QtCore.Slot()
def cancel_me(self): def cancel_me(self):
""" """
Cancel button clicked - just close. Cancel button clicked - just close.

View File

@ -26,7 +26,7 @@ Provides the functions for the display/control of Projectors.
import logging import logging
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import LogMixin, RegistryProperties from openlp.core.common.mixins import LogMixin, RegistryProperties
@ -417,7 +417,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
Builds menu for 'Select Input' option, then calls the selected projector Builds menu for 'Select Input' option, then calls the selected projector
item to change input source. item to change input source.
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
self.get_settings() # In case the dialog interface setting was changed self.get_settings() # In case the dialog interface setting was changed
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow()) list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
@ -443,7 +443,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
Calls edit dialog to add a new projector to the database Calls edit dialog to add a new projector to the database
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
self.projector_form.exec() self.projector_form.exec()
@ -490,7 +490,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
Deletes a projector from the list and the database Deletes a projector from the list and the database
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow()) list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
if list_item is None: if list_item is None:
@ -567,7 +567,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
Calls edit dialog with selected projector to edit information Calls edit dialog with selected projector to edit information
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow()) list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
projector = list_item.data(QtCore.Qt.ItemDataRole.UserRole) projector = list_item.data(QtCore.Qt.ItemDataRole.UserRole)
@ -621,7 +621,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
Builds message box with projector status information Builds message box with projector status information
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
lwi = self.projector_list_widget.item(self.projector_list_widget.currentRow()) lwi = self.projector_list_widget.item(self.projector_list_widget.currentRow())
projector = lwi.data(QtCore.Qt.ItemDataRole.UserRole) projector = lwi.data(QtCore.Qt.ItemDataRole.UserRole)
@ -701,7 +701,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
Calls edit dialog as readonly with selected projector to show information Calls edit dialog as readonly with selected projector to show information
:param opt: Needed by PyQt6 :param opt: Needed by PySide6
""" """
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow()) list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
projector = list_item.data(QtCore.Qt.ItemDataRole.UserRole) projector = list_item.data(QtCore.Qt.ItemDataRole.UserRole)
@ -752,19 +752,19 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
for item in self.projector_list: for item in self.projector_list:
log.debug(f'New projector list - item: ({item.pjlink.ip}) {item.pjlink.name}') log.debug(f'New projector list - item: ({item.pjlink.ip}) {item.pjlink.name}')
@QtCore.pyqtSlot(str) @QtCore.Slot(str)
def add_projector_from_wizard(self, ip, opts=None): def add_projector_from_wizard(self, ip, opts=None):
""" """
Add a projector from the edit dialog Add a projector from the edit dialog
:param ip: IP address of new record item to find :param ip: IP address of new record item to find
:param opts: Needed by PyQt6 :param opts: Needed by PySide6
""" """
log.debug(f'add_projector_from_wizard(ip={ip})') log.debug(f'add_projector_from_wizard(ip={ip})')
item = self.projectordb.get_projector_by_ip(ip) item = self.projectordb.get_projector_by_ip(ip)
self.add_projector(item) self.add_projector(item)
@QtCore.pyqtSlot(object) @QtCore.Slot(object)
def edit_projector_from_wizard(self, projector): def edit_projector_from_wizard(self, projector):
""" """
Update projector from the wizard edit page Update projector from the wizard edit page
@ -809,7 +809,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
""" """
return self.projector_list return self.projector_list
@QtCore.pyqtSlot(str, int, str) @QtCore.Slot(str, int, str)
def update_status(self, ip, status=None, msg=None): def update_status(self, ip, status=None, msg=None):
""" """
Update the status information/icon for selected list item Update the status information/icon for selected list item
@ -846,7 +846,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
item.setVisible(False if hidden else True) item.setVisible(False if hidden else True)
item.setEnabled(True if enabled else False) item.setEnabled(True if enabled else False)
@QtCore.pyqtSlot() @QtCore.Slot()
def update_icons(self): def update_icons(self):
""" """
Update the icons when the selected projectors change Update the icons when the selected projectors change
@ -924,7 +924,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
self.get_toolbar_item('blank_projector_multiple', hidden=False, enabled=True) self.get_toolbar_item('blank_projector_multiple', hidden=False, enabled=True)
self.get_toolbar_item('show_projector_multiple', hidden=False, enabled=True) self.get_toolbar_item('show_projector_multiple', hidden=False, enabled=True)
@QtCore.pyqtSlot(str) @QtCore.Slot(str)
def authentication_error(self, name): def authentication_error(self, name):
""" """
Display warning dialog when attempting to connect with invalid pin Display warning dialog when attempting to connect with invalid pin
@ -938,7 +938,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
'<br /><br />Please verify your PIN setting ' '<br /><br />Please verify your PIN setting '
'for projector item "{name}"'.format(name=name)) 'for projector item "{name}"'.format(name=name))
@QtCore.pyqtSlot(str) @QtCore.Slot(str)
def no_authentication_error(self, name): def no_authentication_error(self, name):
""" """
Display warning dialog when pin saved for item but projector does not Display warning dialog when pin saved for item but projector does not

View File

@ -49,7 +49,7 @@ import logging
from codecs import decode from codecs import decode
from copy import copy from copy import copy
from PyQt6 import QtCore, QtNetwork from PySide6 import QtCore, QtNetwork
from openlp.core.common import qmd5_hash from openlp.core.common import qmd5_hash
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
@ -81,7 +81,7 @@ class PJLinkUDP(QtNetwork.QUdpSocket):
Socket service for PJLink UDP socket. Socket service for PJLink UDP socket.
""" """
data_received = QtCore.pyqtSignal(QtNetwork.QHostAddress, int, str, name='udp_data') # host, port, data data_received = QtCore.Signal(QtNetwork.QHostAddress, int, str, name='udp_data') # host, port, data
def __init__(self, port=PJLINK_PORT): def __init__(self, port=PJLINK_PORT):
""" """
@ -121,7 +121,7 @@ class PJLinkUDP(QtNetwork.QUdpSocket):
self.close() self.close()
self.readyRead.disconnect(self.get_datagram) self.readyRead.disconnect(self.get_datagram)
@QtCore.pyqtSlot() @QtCore.Slot()
def get_datagram(self): def get_datagram(self):
""" """
Retrieve packet and basic checks Retrieve packet and basic checks
@ -153,7 +153,7 @@ class PJLinkUDP(QtNetwork.QUdpSocket):
# TODO: Send SRCH packet here # TODO: Send SRCH packet here
self.search_timer.singleShot(self.search_time, self.search_stop) self.search_timer.singleShot(self.search_time, self.search_stop)
@QtCore.pyqtSlot() @QtCore.Slot()
def search_stop(self): def search_stop(self):
""" """
Stop search Stop search
@ -186,12 +186,12 @@ class PJLink(QtNetwork.QTcpSocket):
Socket services for PJLink TCP packets. Socket services for PJLink TCP packets.
""" """
# Signals sent by this module # Signals sent by this module
projectorChangeStatus = QtCore.pyqtSignal(str, int, str) projectorChangeStatus = QtCore.Signal(str, int, str)
projectorStatus = QtCore.pyqtSignal(int) # Status update projectorStatus = QtCore.Signal(int) # Status update
projectorAuthentication = QtCore.pyqtSignal(str) # Authentication error projectorAuthentication = QtCore.Signal(str) # Authentication error
projectorNoAuthentication = QtCore.pyqtSignal(str) # PIN set and no authentication needed projectorNoAuthentication = QtCore.Signal(str) # PIN set and no authentication needed
projectorReceivedData = QtCore.pyqtSignal() # Notify when received data finished processing projectorReceivedData = QtCore.Signal() # Notify when received data finished processing
projectorUpdateIcons = QtCore.pyqtSignal() # Update the status icons on toolbar projectorUpdateIcons = QtCore.Signal() # Update the status icons on toolbar
# Deprecated # Deprecated
changeStatus = projectorChangeStatus # Use projectorChangeStatus changeStatus = projectorChangeStatus # Use projectorChangeStatus
@ -421,7 +421,7 @@ class PJLink(QtNetwork.QTcpSocket):
self.changeStatus.emit(self.ip, status, message) self.changeStatus.emit(self.ip, status, message)
self.projectorUpdateIcons.emit() self.projectorUpdateIcons.emit()
@QtCore.pyqtSlot() @QtCore.Slot()
def check_login(self, data=None): def check_login(self, data=None):
""" """
Processes the initial connection and convert to a PJLink packet if valid initial connection Processes the initial connection and convert to a PJLink packet if valid initial connection
@ -481,7 +481,7 @@ class PJLink(QtNetwork.QTcpSocket):
log.debug(f'({self.entry.name}) Finished cleaning buffer - {trash_count} bytes dropped') log.debug(f'({self.entry.name}) Finished cleaning buffer - {trash_count} bytes dropped')
return return
@QtCore.pyqtSlot(QtNetwork.QHostAddress, int, str, name='udp_data') # host, port, data @QtCore.Slot(QtNetwork.QHostAddress, int, str, name='udp_data') # host, port, data
def get_buffer(self, host, port, data): def get_buffer(self, host, port, data):
""" """
Get data from somewhere other than TCP socket Get data from somewhere other than TCP socket
@ -497,7 +497,7 @@ class PJLink(QtNetwork.QTcpSocket):
else: else:
log.debug(f'({self.entry.name}) Ignoring data for {host.toString()} - not me') log.debug(f'({self.entry.name}) Ignoring data for {host.toString()} - not me')
@QtCore.pyqtSlot() @QtCore.Slot()
def get_socket(self): def get_socket(self):
""" """
Get data from TCP socket. Get data from TCP socket.
@ -614,7 +614,7 @@ class PJLink(QtNetwork.QTcpSocket):
return return
@QtCore.pyqtSlot(QtNetwork.QAbstractSocket.SocketError) @QtCore.Slot(QtNetwork.QAbstractSocket.SocketError)
def get_error(self, err): def get_error(self, err):
""" """
Process error from SocketError signal. Process error from SocketError signal.
@ -681,7 +681,7 @@ class PJLink(QtNetwork.QTcpSocket):
# May be some initial connection setup so make sure we send data # May be some initial connection setup so make sure we send data
self._send_command() self._send_command()
@QtCore.pyqtSlot() @QtCore.Slot()
def _send_command(self, data=None, utf8=False): def _send_command(self, data=None, utf8=False):
""" """
Socket interface to send data. If data=None, then check queue. Socket interface to send data. If data=None, then check queue.
@ -748,7 +748,7 @@ class PJLink(QtNetwork.QTcpSocket):
self.change_status(S_CONNECTING) self.change_status(S_CONNECTING)
self.connectToHost(self.ip, self.port) self.connectToHost(self.ip, self.port)
@QtCore.pyqtSlot() @QtCore.Slot()
def disconnect_from_host(self, abort=False): def disconnect_from_host(self, abort=False):
""" """
Close socket and cleanup. Close socket and cleanup.

View File

@ -25,7 +25,7 @@ Provides the dialog window for selecting video source for projector.
""" """
import logging import logging
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.platform import is_macosx from openlp.core.common.platform import is_macosx
@ -309,7 +309,7 @@ class SourceSelectTabs(QtWidgets.QDialog):
selected = super(SourceSelectTabs, self).exec() selected = super(SourceSelectTabs, self).exec()
return selected return selected
@QtCore.pyqtSlot(QtWidgets.QAbstractButton) @QtCore.Slot(QtWidgets.QAbstractButton)
def button_clicked(self, button): def button_clicked(self, button):
""" """
Checks which button was clicked Checks which button was clicked
@ -456,7 +456,7 @@ class SourceSelectSingle(QtWidgets.QDialog):
selected = super(SourceSelectSingle, self).exec() selected = super(SourceSelectSingle, self).exec()
return selected return selected
@QtCore.pyqtSlot(QtWidgets.QAbstractButton) @QtCore.Slot(QtWidgets.QAbstractButton)
def button_clicked(self, button): def button_clicked(self, button):
""" """
Checks which button was clicked Checks which button was clicked
@ -492,7 +492,7 @@ class SourceSelectSingle(QtWidgets.QDialog):
self.projectordb.delete_all_objects(ProjectorSource, ProjectorSource.projector_id == self.projector.db_item.id) self.projectordb.delete_all_objects(ProjectorSource, ProjectorSource.projector_id == self.projector.db_item.id)
self.done(100) self.done(100)
@QtCore.pyqtSlot() @QtCore.Slot()
def accept_me(self): def accept_me(self):
""" """
Slot to accept 'OK' button Slot to accept 'OK' button

View File

@ -23,7 +23,7 @@ The :mod:`openlp.core.ui.projector.tab` module provides the settings tab in the
""" """
import logging import logging
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -22,7 +22,7 @@
The :mod:`resources` module provides application images and icons in a central The :mod:`resources` module provides application images and icons in a central
store for use by OpenLP. store for use by OpenLP.
""" """
from PyQt6 import QtCore from PySide6 import QtCore
qt_resource_data = b"\ qt_resource_data = b"\
\x00\x00\x03\x2f\ \x00\x00\x03\x2f\

View File

@ -21,7 +21,7 @@
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
from PyQt6 import QtCore, QtNetwork from PySide6 import QtCore, QtNetwork
from openlp.core.common.mixins import LogMixin from openlp.core.common.mixins import LogMixin
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
@ -96,7 +96,7 @@ class Server(QtCore.QObject, LogMixin):
self.in_stream.setCodec('UTF-8') self.in_stream.setCodec('UTF-8')
self.in_socket.readyRead.connect(self._on_ready_read) self.in_socket.readyRead.connect(self._on_ready_read)
@QtCore.pyqtSlot() @QtCore.Slot()
def _on_ready_read(self): def _on_ready_read(self):
""" """
Read a record passed to the server and pass to the service manager to handle Read a record passed to the server and pass to the service manager to handle

View File

@ -21,7 +21,7 @@
""" """
The :mod:`openlp.core.threading` module contains some common threading code The :mod:`openlp.core.threading` module contains some common threading code
""" """
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.common.mixins import LogMixin from openlp.core.common.mixins import LogMixin
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
@ -31,8 +31,8 @@ class ThreadWorker(QtCore.QObject, LogMixin):
""" """
The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects The :class:`~openlp.core.threading.ThreadWorker` class provides a base class for all worker objects
""" """
quit = QtCore.pyqtSignal() quit = QtCore.Signal()
error = QtCore.pyqtSignal(str, str) error = QtCore.Signal(str, str)
def start(self): def start(self):
""" """

View File

@ -21,7 +21,7 @@
""" """
The :mod:`ui` module provides the core user interface for OpenLP The :mod:`ui` module provides the core user interface for OpenLP
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
class HideMode(object): class HideMode(object):

View File

@ -20,7 +20,7 @@
########################################################################## ##########################################################################
import datetime import datetime
from PyQt6 import QtGui, QtWidgets from PySide6 import QtGui, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.lib.ui import create_button, create_button_box from openlp.core.lib.ui import create_button, create_button_box

View File

@ -23,7 +23,7 @@ The About dialog.
""" """
import webbrowser import webbrowser
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.version import get_version from openlp.core.version import get_version

View File

@ -23,7 +23,7 @@ The :mod:`advancedtab` provides an advanced settings facility.
""" """
import logging import logging
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -19,7 +19,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # # along with this program. If not, see <https://www.gnu.org/licenses/>. #
########################################################################## ##########################################################################
from PyQt6 import QtGui, QtWidgets from PySide6 import QtGui, QtWidgets
from openlp.core.ui.icons import UiIcons from openlp.core.ui.icons import UiIcons

View File

@ -28,7 +28,7 @@ It is implemented as a QDialog containing:
After instantiating a ConfirmationForm object the calling code must call exec() on the instance. After instantiating a ConfirmationForm object the calling code must call exec() on the instance.
This runs the Qt dialog, which returns the usual 0 (for No) or 1 (for Yes) This runs the Qt dialog, which returns the usual 0 (for No) or 1 (for Yes)
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.ui.confirmationdialog import Ui_ConfirmationDialog from openlp.core.ui.confirmationdialog import Ui_ConfirmationDialog

View File

@ -22,7 +22,7 @@
The GUI widgets of the exception dialog. The GUI widgets of the exception dialog.
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button, create_button_box from openlp.core.lib.ui import create_button, create_button_box

View File

@ -26,7 +26,7 @@ import os
import platform import platform
import re import re
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties

View File

@ -21,7 +21,7 @@
""" """
The UI widgets for the rename dialog The UI widgets for the rename dialog
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -21,7 +21,7 @@
""" """
The file rename dialog. The file rename dialog.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties

View File

@ -30,7 +30,7 @@ import urllib.request
from pathlib import Path from pathlib import Path
from tempfile import gettempdir from tempfile import gettempdir
from PyQt6 import QtCore, QtWidgets, QtGui from PySide6 import QtCore, QtWidgets, QtGui
from openlp.core.api.deploy import get_latest_size, download_and_install from openlp.core.api.deploy import get_latest_size, download_and_install
from openlp.core.common import trace_error_handler from openlp.core.common import trace_error_handler

View File

@ -21,7 +21,7 @@
""" """
The UI widgets of the language selection dialog. The UI widgets of the language selection dialog.
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -21,7 +21,7 @@
""" """
The language selection dialog. The language selection dialog.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import LanguageManager from openlp.core.common.i18n import LanguageManager
from openlp.core.lib.ui import create_action from openlp.core.lib.ui import create_action

View File

@ -21,7 +21,7 @@
""" """
The UI widgets for the first time wizard. The UI widgets for the first time wizard.
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import clean_button_text from openlp.core.common import clean_button_text
from openlp.core.common.platform import is_macosx from openlp.core.common.platform import is_macosx

View File

@ -19,7 +19,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # # along with this program. If not, see <https://www.gnu.org/licenses/>. #
########################################################################## ##########################################################################
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import get_natural_key, translate from openlp.core.common.i18n import get_natural_key, translate
from openlp.core.lib.ui import create_button_box, critical_error_message_box from openlp.core.lib.ui import create_button_box, critical_error_message_box

View File

@ -21,7 +21,7 @@
""" """
The UI widgets for the formatting tags window. The UI widgets for the formatting tags window.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -23,7 +23,7 @@ The :mod:`formattingtagform` provides an Tag Edit facility. The Base set are pro
Custom tags can be defined and saved. The Custom Tag arrays are saved in a json string so QSettings works on them. Custom tags can be defined and saved. The Custom Tag arrays are saved in a json string so QSettings works on them.
Base Tags cannot be changed. Base Tags cannot be changed.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.formattingtags import FormattingTags from openlp.core.lib.formattingtags import FormattingTags

View File

@ -24,7 +24,7 @@ The general tab of the configuration dialog.
import logging import logging
from pathlib import Path from pathlib import Path
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import get_images_filter from openlp.core.common import get_images_filter
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -24,7 +24,7 @@ The :mod:`languages` module provides a list of icons.
import logging import logging
import qtawesome as qta import qtawesome as qta
from PyQt6 import QtGui, QtWidgets from PySide6 import QtGui, QtWidgets
from openlp.core.common import Singleton from openlp.core.common import Singleton
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation

View File

@ -25,7 +25,7 @@ import os
from pathlib import Path from pathlib import Path
from typing import Any, List, Optional, Union from typing import Any, List, Optional, Union
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common import sha256_file_hash from openlp.core.common import sha256_file_hash
from openlp.core.common.i18n import UiStrings, get_natural_key, translate from openlp.core.common.i18n import UiStrings, get_natural_key, translate
@ -368,7 +368,7 @@ class FolderLibraryItem(MediaManagerItem):
""" """
return [item.file_path, item.file_path] return [item.file_path, item.file_path]
@QtCore.pyqtSlot(str, bool, result=list) @QtCore.Slot(str, bool, result=list)
def search(self, string: str, show_error: bool = True) -> list[list[Any]]: def search(self, string: str, show_error: bool = True) -> list[list[Any]]:
""" """
Performs a search for items containing ``string`` Performs a search for items containing ``string``

View File

@ -30,7 +30,7 @@ from pathlib import Path
from tempfile import gettempdir from tempfile import gettempdir
from threading import Lock from threading import Lock
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.api.http.server import HttpServer from openlp.core.api.http.server import HttpServer
from openlp.core.api.websockets import WebSocketServer from openlp.core.api.websockets import WebSocketServer

View File

@ -32,7 +32,7 @@ except ImportError:
pymediainfo_available = False pymediainfo_available = False
pymediainfo_version = '0.0' pymediainfo_version = '0.0'
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import LogMixin, RegistryProperties from openlp.core.common.mixins import LogMixin, RegistryProperties
@ -62,10 +62,10 @@ class MediaController(QtWidgets.QWidget, RegistryBase, LogMixin, RegistryPropert
The implementation of the Media Controller which manages how media is played. The implementation of the Media Controller which manages how media is played.
""" """
vlc_live_media_tick = QtCore.pyqtSignal() vlc_live_media_tick = QtCore.Signal()
vlc_preview_media_tick = QtCore.pyqtSignal() vlc_preview_media_tick = QtCore.Signal()
vlc_live_media_stop = QtCore.pyqtSignal() vlc_live_media_stop = QtCore.Signal()
vlc_preview_media_stop = QtCore.pyqtSignal() vlc_preview_media_stop = QtCore.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -23,7 +23,7 @@ The :mod:`~openlp.core.ui.media.mediatab` module holds the configuration tab for
""" """
import logging import logging
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.settingstab import SettingsTab from openlp.core.lib.settingstab import SettingsTab

View File

@ -29,7 +29,7 @@ import threading
from datetime import datetime from datetime import datetime
from time import sleep from time import sleep
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import LogMixin from openlp.core.common.mixins import LogMixin

View File

@ -27,7 +27,7 @@ import threading
from datetime import datetime from datetime import datetime
from time import sleep from time import sleep
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import LogMixin from openlp.core.common.mixins import LogMixin

View File

@ -21,7 +21,7 @@
""" """
The UI widgets of the plugin view dialog The UI widgets of the plugin view dialog
#""" #"""
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -23,7 +23,7 @@ The actual plugin view form
""" """
import logging import logging
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.state import State from openlp.core.state import State
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate

View File

@ -21,7 +21,7 @@
""" """
The UI widgets of the print service dialog. The UI widgets of the print service dialog.
""" """
from PyQt6 import QtCore, QtPrintSupport, QtWidgets from PySide6 import QtCore, QtPrintSupport, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.ui.icons import UiIcons from openlp.core.ui.icons import UiIcons

View File

@ -25,7 +25,7 @@ import datetime
import html import html
import lxml.html import lxml.html
from PyQt6 import QtCore, QtGui, QtPrintSupport, QtWidgets from PySide6 import QtCore, QtGui, QtPrintSupport, QtWidgets
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -21,7 +21,7 @@
""" """
The screen settings tab in the configuration dialog The screen settings tab in the configuration dialog
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.display.screens import ScreenList from openlp.core.display.screens import ScreenList

View File

@ -21,7 +21,7 @@
""" """
The UI widgets for the service item edit dialog The UI widgets for the service item edit dialog
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button, create_button_box from openlp.core.lib.ui import create_button, create_button_box

View File

@ -21,7 +21,7 @@
""" """
The service item edit dialog The service item edit dialog
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -30,7 +30,7 @@ from contextlib import suppress
from datetime import datetime, timedelta from datetime import datetime, timedelta
from pathlib import Path from pathlib import Path
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import ThemeLevel, delete_file, sha256_file_hash from openlp.core.common import ThemeLevel, delete_file, sha256_file_hash
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
@ -307,13 +307,13 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
can then be zipped up with all the resources used into one OSZ or OSZL file for use on any OpenLP installation. can then be zipped up with all the resources used into one OSZ or OSZL file for use on any OpenLP installation.
Also handles the UI tasks of moving things up and down etc. Also handles the UI tasks of moving things up and down etc.
""" """
servicemanager_set_item = QtCore.pyqtSignal(int) servicemanager_set_item = QtCore.Signal(int)
servicemanager_set_item_by_uuid = QtCore.pyqtSignal(str) servicemanager_set_item_by_uuid = QtCore.Signal(str)
servicemanager_next_item = QtCore.pyqtSignal() servicemanager_next_item = QtCore.Signal()
servicemanager_previous_item = QtCore.pyqtSignal() servicemanager_previous_item = QtCore.Signal()
servicemanager_new_file = QtCore.pyqtSignal() servicemanager_new_file = QtCore.Signal()
servicemanager_changed = QtCore.pyqtSignal() servicemanager_changed = QtCore.Signal()
theme_update_service = QtCore.pyqtSignal() theme_update_service = QtCore.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class. The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties

View File

@ -24,7 +24,7 @@ The services tab of the configuration dialog.
import logging import logging
from datetime import datetime, timedelta from datetime import datetime, timedelta
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import SlideLimits from openlp.core.common import SlideLimits
from openlp.core.common.i18n import UiStrings, format_time, translate from openlp.core.common.i18n import UiStrings, format_time, translate

View File

@ -21,7 +21,7 @@
""" """
The UI widgets of the settings dialog. The UI widgets of the settings dialog.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -23,7 +23,7 @@ The :mod:`settingsform` provides a user interface for the OpenLP settings
""" """
import logging import logging
from PyQt6 import QtCore, QtWidgets, QtGui from PySide6 import QtCore, QtWidgets, QtGui
from openlp.core.state import State from openlp.core.state import State
from openlp.core.api.tab import ApiTab from openlp.core.api.tab import ApiTab

View File

@ -21,7 +21,7 @@
""" """
The list of shortcuts within a dialog. The list of shortcuts within a dialog.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -24,7 +24,7 @@ The :mod:`~openlp.core.ui.shortcutlistform` module contains the form class
import logging import logging
import re import re
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.actions import ActionList from openlp.core.common.actions import ActionList
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate

View File

@ -27,7 +27,7 @@ from collections import deque
from pathlib import Path from pathlib import Path
from threading import Lock from threading import Lock
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import SlideLimits from openlp.core.common import SlideLimits
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
@ -104,7 +104,7 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
user uses to control the displaying of verses/slides/etc on the screen. user uses to control the displaying of verses/slides/etc on the screen.
""" """
slidecontroller_changed = QtCore.pyqtSignal() slidecontroller_changed = QtCore.Signal()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """
@ -1333,7 +1333,7 @@ class SlideController(QtWidgets.QWidget, LogMixin, RegistryProperties):
slide_ready_time = self.slide_changed_time + datetime.timedelta(seconds=slide_delay_time) slide_ready_time = self.slide_changed_time + datetime.timedelta(seconds=slide_delay_time)
return datetime.datetime.now() > slide_ready_time return datetime.datetime.now() > slide_ready_time
@QtCore.pyqtSlot(result=str) @QtCore.Slot(result=str)
def grab_maindisplay(self) -> str: def grab_maindisplay(self) -> str:
""" """
Gets the last taken screenshot Gets the last taken screenshot
@ -1627,10 +1627,10 @@ class PreviewController(RegistryBase, SlideController):
""" """
Set up the Preview Controller. Set up the Preview Controller.
""" """
slidecontroller_preview_set = QtCore.pyqtSignal(list) slidecontroller_preview_set = QtCore.Signal(list)
slidecontroller_preview_next = QtCore.pyqtSignal() slidecontroller_preview_next = QtCore.Signal()
slidecontroller_preview_previous = QtCore.pyqtSignal() slidecontroller_preview_previous = QtCore.Signal()
slidecontroller_preview_clear = QtCore.pyqtSignal() slidecontroller_preview_clear = QtCore.Signal()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """
@ -1659,14 +1659,14 @@ class LiveController(RegistryBase, SlideController):
""" """
Set up the Live Controller. Set up the Live Controller.
""" """
slidecontroller_live_set = QtCore.pyqtSignal(list) slidecontroller_live_set = QtCore.Signal(list)
slidecontroller_live_next = QtCore.pyqtSignal() slidecontroller_live_next = QtCore.Signal()
slidecontroller_live_previous = QtCore.pyqtSignal() slidecontroller_live_previous = QtCore.Signal()
slidecontroller_toggle_display = QtCore.pyqtSignal(str) slidecontroller_toggle_display = QtCore.Signal(str)
slidecontroller_live_clear = QtCore.pyqtSignal() slidecontroller_live_clear = QtCore.Signal()
mediacontroller_live_play = QtCore.pyqtSignal() mediacontroller_live_play = QtCore.Signal()
mediacontroller_live_pause = QtCore.pyqtSignal() mediacontroller_live_pause = QtCore.Signal()
mediacontroller_live_stop = QtCore.pyqtSignal() mediacontroller_live_stop = QtCore.Signal()
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
""" """

View File

@ -22,7 +22,7 @@
The splash screen The splash screen
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
class SplashScreen(QtWidgets.QSplashScreen): class SplashScreen(QtWidgets.QSplashScreen):

View File

@ -21,7 +21,7 @@
""" """
The UI widgets for the time dialog The UI widgets for the time dialog
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -21,7 +21,7 @@
""" """
The actual start time form. The actual start time form.
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties

View File

@ -23,7 +23,7 @@ The :mod:`~openlp.core.ui.dark` module looks for and loads a dark theme
""" """
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from enum import Enum from enum import Enum
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.platform import is_macosx, is_win from openlp.core.common.platform import is_macosx, is_win
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry

View File

@ -23,7 +23,7 @@ The Theme wizard
""" """
import logging import logging
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import is_not_image_file from openlp.core.common import is_not_image_file
from openlp.core.common.enum import ServiceItemType from openlp.core.common.enum import ServiceItemType

View File

@ -21,7 +21,7 @@
""" """
The layout of the theme The layout of the theme
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_button_box from openlp.core.lib.ui import create_button_box

View File

@ -21,7 +21,7 @@
""" """
The form layout The form layout
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from .themelayoutdialog import Ui_ThemeLayoutDialog from .themelayoutdialog import Ui_ThemeLayoutDialog

View File

@ -27,7 +27,7 @@ import zipfile
from pathlib import Path from pathlib import Path
from xml.etree.ElementTree import XML, ElementTree from xml.etree.ElementTree import XML, ElementTree
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.state import State from openlp.core.state import State
from openlp.core.common import delete_file from openlp.core.common import delete_file
@ -143,8 +143,8 @@ class ThemeManager(QtWidgets.QWidget, RegistryBase, Ui_ThemeManager, LogMixin, R
Manages the orders of Theme. Manages the orders of Theme.
""" """
# These signals are used by the web api to update the theme on the ui thread # These signals are used by the web api to update the theme on the ui thread
theme_update_global = QtCore.pyqtSignal() theme_update_global = QtCore.Signal()
theme_level_updated = QtCore.pyqtSignal() theme_level_updated = QtCore.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License # # You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. # # along with this program. If not, see <https://www.gnu.org/licenses/>. #
########################################################################## ##########################################################################
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.display.render import ThemePreviewRenderer from openlp.core.display.render import ThemePreviewRenderer

View File

@ -21,7 +21,7 @@
""" """
The theme regeneration progress dialog The theme regeneration progress dialog
""" """
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.common.mixins import RegistryProperties, LogMixin from openlp.core.common.mixins import RegistryProperties, LogMixin
from openlp.core.common.utils import wait_for from openlp.core.common.utils import wait_for

View File

@ -21,7 +21,7 @@
""" """
The Themes configuration tab The Themes configuration tab
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import ThemeLevel from openlp.core.common import ThemeLevel
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -21,7 +21,7 @@
""" """
The Create/Edit theme wizard The Create/Edit theme wizard
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.common.platform import is_macosx from openlp.core.common.platform import is_macosx

View File

@ -27,7 +27,7 @@ import sys
from collections import OrderedDict from collections import OrderedDict
from datetime import date from datetime import date
from PyQt6 import QtCore from PySide6 import QtCore
from openlp.core.common.applocation import AppLocation from openlp.core.common.applocation import AppLocation
from openlp.core.common.httputils import get_web_page from openlp.core.common.httputils import get_web_page
@ -42,7 +42,7 @@ CONNECTION_TIMEOUT = 30
CONNECTION_RETRIES = 2 CONNECTION_RETRIES = 2
LIBRARIES = OrderedDict([ LIBRARIES = OrderedDict([
('Python', ('platform', 'python_version')), ('Python', ('platform', 'python_version')),
('PyQt6', ('PyQt6.Qt', 'PYQT_VERSION_STR')), ('PySide6', ('PySide6.Qt', 'PYQT_VERSION_STR')),
('SQLAlchemy', ('sqlalchemy',)), ('SQLAlchemy', ('sqlalchemy',)),
('Alembic', ('alembic',)), ('Alembic', ('alembic',)),
('BeautifulSoup', ('bs4',)), ('BeautifulSoup', ('bs4',)),
@ -63,8 +63,8 @@ class VersionWorker(ThreadWorker):
A worker class to fetch the version of OpenLP from the website. This is run from within a thread so that it A worker class to fetch the version of OpenLP from the website. This is run from within a thread so that it
doesn't affect the loading time of OpenLP. doesn't affect the loading time of OpenLP.
""" """
new_version = QtCore.pyqtSignal(str) new_version = QtCore.Signal(str)
no_internet = QtCore.pyqtSignal() no_internet = QtCore.Signal()
def __init__(self, last_check_date, current_version): def __init__(self, last_check_date, current_version):
""" """

View File

@ -22,7 +22,7 @@
""" """
Provide a custom widget based on QPushButton for the selection of colors Provide a custom widget based on QPushButton for the selection of colors
""" """
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
@ -32,7 +32,7 @@ class ColorButton(QtWidgets.QPushButton):
Subclasses QPushbutton to create a "Color Chooser" button Subclasses QPushbutton to create a "Color Chooser" button
""" """
colorChanged = QtCore.pyqtSignal(str) colorChanged = QtCore.Signal(str)
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -21,7 +21,7 @@
""" Patch the QFileDialog so it accepts and returns Path objects""" """ Patch the QFileDialog so it accepts and returns Path objects"""
from pathlib import Path from pathlib import Path
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.path import path_to_str, replace_params, str_to_path from openlp.core.common.path import path_to_str, replace_params, str_to_path
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate

View File

@ -23,7 +23,7 @@ The :mod:`~openlp.core.widgets.docks` module contains a customised base dock wid
""" """
import logging import logging
from PyQt6 import QtWidgets from PySide6 import QtWidgets
from openlp.core.display.screens import ScreenList from openlp.core.display.screens import ScreenList
from openlp.core.lib import build_icon from openlp.core.lib import build_icon

View File

@ -25,7 +25,7 @@ import logging
import re import re
from pathlib import Path from pathlib import Path
from PyQt6 import QtCore, QtGui, QtWidgets from PySide6 import QtCore, QtGui, QtWidgets
from openlp.core.common import CONTROL_CHARS from openlp.core.common import CONTROL_CHARS
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import UiStrings, translate
@ -53,8 +53,8 @@ class SearchEdit(QtWidgets.QLineEdit):
""" """
This is a specialised QLineEdit with a "clear" button inside for searches. This is a specialised QLineEdit with a "clear" button inside for searches.
""" """
searchTypeChanged = QtCore.pyqtSignal(QtCore.QVariant) searchTypeChanged = QtCore.Signal(int)
cleared = QtCore.pyqtSignal() cleared = QtCore.Signal()
def __init__(self, parent, settings_section): def __init__(self, parent, settings_section):
""" """
@ -170,7 +170,7 @@ class SearchEdit(QtWidgets.QLineEdit):
Internally implemented slot to react to when the text in the line edit has changed so that we can show or hide Internally implemented slot to react to when the text in the line edit has changed so that we can show or hide
the clear button. the clear button.
:param text: A :class:`~PyQt6.QtCore.QString` instance which represents the text in the line edit. :param text: A :class:`~PySide6.QtCore.QString` instance which represents the text in the line edit.
""" """
self.clear_button.setVisible(bool(text)) self.clear_button.setVisible(bool(text))
@ -200,7 +200,7 @@ class PathEdit(QtWidgets.QWidget):
The :class:`~openlp.core.widgets.edits.PathEdit` class subclasses QWidget to create a custom widget for use when The :class:`~openlp.core.widgets.edits.PathEdit` class subclasses QWidget to create a custom widget for use when
a file or directory needs to be selected. a file or directory needs to be selected.
""" """
pathChanged = QtCore.pyqtSignal(Path) pathChanged = QtCore.Signal(Path)
def __init__(self, parent=None, path_type=PathEditType.Files, default_path=None, dialog_caption=None, def __init__(self, parent=None, path_type=PathEditType.Files, default_path=None, dialog_caption=None,
show_revert=True): show_revert=True):
@ -246,7 +246,7 @@ class PathEdit(QtWidgets.QWidget):
self.line_edit.editingFinished.connect(self.on_line_edit_editing_finished) self.line_edit.editingFinished.connect(self.on_line_edit_editing_finished)
self.update_button_tool_tips() self.update_button_tool_tips()
@QtCore.pyqtProperty('QVariant') @property
def path(self): def path(self):
""" """
A property getter method to return the selected path. A property getter method to return the selected path.
@ -523,7 +523,7 @@ class SpellAction(QtGui.QAction):
""" """
A special QAction that returns the text in a signal. A special QAction that returns the text in a signal.
""" """
correct = QtCore.pyqtSignal(str) correct = QtCore.Signal(str)
def __init__(self, *args): def __init__(self, *args):
""" """
@ -539,7 +539,7 @@ class HistoryComboBox(QtWidgets.QComboBox):
signal for when the :kbd:`Enter` or :kbd:`Return` keys are pressed, and saves anything that is typed into the edit signal for when the :kbd:`Enter` or :kbd:`Return` keys are pressed, and saves anything that is typed into the edit
box into its list. box into its list.
""" """
returnPressed = QtCore.pyqtSignal() returnPressed = QtCore.Signal()
def __init__(self, parent=None): def __init__(self, parent=None):
""" """

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.widgets.labels` module contains specialised labels The :mod:`~openlp.core.widgets.labels` module contains specialised labels
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
class FormLabel(QtWidgets.QLabel): class FormLabel(QtWidgets.QLabel):

View File

@ -21,7 +21,7 @@
""" """
The :mod:`~openlp.core.widgets.layouts` module contains customised layout classes The :mod:`~openlp.core.widgets.layouts` module contains customised layout classes
""" """
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
class AspectRatioLayout(QtWidgets.QLayout): class AspectRatioLayout(QtWidgets.QLayout):
@ -30,7 +30,7 @@ class AspectRatioLayout(QtWidgets.QLayout):
This is based on the C++ example here: https://gist.github.com/pavel-perina/1324ff064aedede0e01311aab315f83d This is based on the C++ example here: https://gist.github.com/pavel-perina/1324ff064aedede0e01311aab315f83d
""" """
resize = QtCore.pyqtSignal(QtCore.QSize) resize = QtCore.Signal(QtCore.QSize)
def __init__(self, parent=None, aspect_ratio=None): def __init__(self, parent=None, aspect_ratio=None):
""" """

View File

@ -24,7 +24,7 @@ Provide common toolbar handling for OpenLP
import datetime import datetime
import logging import logging
from PyQt6 import QtCore, QtWidgets from PySide6 import QtCore, QtWidgets
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
from openlp.core.lib.ui import create_widget_action from openlp.core.lib.ui import create_widget_action

Some files were not shown because too many files have changed in this diff Show More