mirror of https://gitlab.com/openlp/openlp.git
Manual update to Qt6 (still need to migrate enums)
This commit is contained in:
parent
504b6bfd0a
commit
ccdae1cb24
|
@ -31,7 +31,7 @@ install:
|
|||
# Update pip
|
||||
- python -m pip install --upgrade pip
|
||||
# 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 PyQt5 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 PyQt6 PyQtWebEngine pymediainfo PyMuPDF QDarkStyle python-vlc flask-cors pytest-qt pyenchant pysword qrcode flask
|
||||
# Install Windows only dependencies
|
||||
- cmd: python -m pip install pyodbc pypiwin32
|
||||
- cmd: choco install vlc %CHOCO_VLC_ARG% --no-progress --limit-output
|
||||
|
|
|
@ -29,7 +29,7 @@ Ignore the version file and pull the version directly
|
|||
from Bazaar
|
||||
.TP
|
||||
\fB\-s\fR STYLE, \fB\-\-style\fR=\fISTYLE\fR
|
||||
Set the Qt5 style (passed directly to Qt5).
|
||||
Set the Qt6 style (passed directly to Qt6).
|
||||
.TP
|
||||
\fB\-\-testing\fR
|
||||
Run by testing framework
|
||||
|
|
|
@ -27,7 +27,7 @@ import re
|
|||
from datetime import date
|
||||
from zipfile import ZipFile
|
||||
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.httputils import download_file, get_web_page, get_openlp_user_agent
|
||||
|
|
|
@ -27,7 +27,7 @@ from qrcode.image.svg import SvgPathFillImage
|
|||
|
||||
from time import sleep
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.api.deploy import download_and_install, download_version_info, get_installed_version
|
||||
from openlp.core.common import get_network_interfaces
|
||||
|
@ -65,8 +65,8 @@ class ApiTab(SettingsTab):
|
|||
self.server_settings_layout.addRow(self.address_label)
|
||||
self.address_edit = QtWidgets.QLineEdit(self.server_settings_group_box)
|
||||
self.address_edit.setSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
self.address_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'),
|
||||
self))
|
||||
self.address_edit.setValidator(QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(
|
||||
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'), self))
|
||||
self.address_edit.setObjectName('address_edit')
|
||||
self.address_revert_button = QtWidgets.QToolButton(self.server_settings_group_box)
|
||||
self.address_revert_button.setObjectName('address_revert_button')
|
||||
|
@ -372,7 +372,7 @@ class ApiTab(SettingsTab):
|
|||
"""
|
||||
self.twelve_hour = False
|
||||
# we have a set value convert to True/False
|
||||
if check_state == QtCore.Qt.Checked:
|
||||
if check_state == QtCore.Qt.CheckState.Checked:
|
||||
self.twelve_hour = True
|
||||
|
||||
def on_thumbnails_check_box_changed(self, check_state):
|
||||
|
@ -381,7 +381,7 @@ class ApiTab(SettingsTab):
|
|||
"""
|
||||
self.thumbnails = False
|
||||
# we have a set value convert to True/False
|
||||
if check_state == QtCore.Qt.Checked:
|
||||
if check_state == QtCore.Qt.CheckState.Checked:
|
||||
self.thumbnails = True
|
||||
|
||||
def on_check_for_updates_button_clicked(self):
|
||||
|
|
|
@ -30,7 +30,7 @@ from dataclasses import asdict, dataclass
|
|||
from typing import Optional, Union
|
||||
|
||||
import time
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
from websockets import serve
|
||||
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ from pathlib import Path
|
|||
from shutil import copytree, move
|
||||
from traceback import format_exception
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWebEngineWidgets, QtWidgets # noqa
|
||||
from PyQt6 import QtCore, QtWebEngineCore, QtWidgets # noqa
|
||||
|
||||
from openlp.core.api.deploy import check_for_remote_update
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
@ -327,7 +327,7 @@ def set_up_web_engine_cache(web_cache_path):
|
|||
:param Path web_cache_path: The folder for the web engine files
|
||||
:rtype: None
|
||||
"""
|
||||
web_engine_profile = QtWebEngineWidgets.QWebEngineProfile.defaultProfile()
|
||||
web_engine_profile = QtWebEngineCore.QWebEngineProfile.defaultProfile()
|
||||
web_engine_profile.setCachePath(str(web_cache_path))
|
||||
web_engine_profile.setPersistentStoragePath(str(web_cache_path))
|
||||
|
||||
|
@ -408,8 +408,6 @@ def apply_dpi_adjustments_stage_qt(hidpi_mode, qt_args):
|
|||
qt_args[platform_index + 1] += ' windows:dpiawareness=0'
|
||||
except ValueError:
|
||||
qt_args.extend(['-platform', 'windows:dpiawareness=0'])
|
||||
else:
|
||||
QtWidgets.QApplication.setAttribute(QtCore.Qt.ApplicationAttribute.AA_EnableHighDpiScaling)
|
||||
if hidpi_mode == HiDPIMode.Default:
|
||||
no_custom_factor_rounding = not ('QT_SCALE_FACTOR_ROUNDING_POLICY' in os.environ
|
||||
and bool(os.environ['QT_SCALE_FACTOR_ROUNDING_POLICY'].strip()))
|
||||
|
@ -438,8 +436,6 @@ def apply_dpi_adjustments_stage_application(hidpi_mode: HiDPIMode, application:
|
|||
font = application.font()
|
||||
font.setPointSizeF(font.pointSizeF() * application.devicePixelRatio())
|
||||
application.setFont(font)
|
||||
if hidpi_mode != HiDPIMode.Windows_Unaware:
|
||||
application.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
|
||||
|
||||
|
||||
def setup_portable_settings(portable_path: Path | str | None) -> Settings:
|
||||
|
@ -514,7 +510,7 @@ def main():
|
|||
# Instantiating QCoreApplication
|
||||
init_webview_custom_schemes()
|
||||
application = QtWidgets.QApplication(qt_args)
|
||||
application.setAttribute(QtCore.Qt.AA_DontCreateNativeWidgetSiblings, True)
|
||||
application.setAttribute(QtCore.Qt.ApplicationAttribute.AA_DontCreateNativeWidgetSiblings, True)
|
||||
# Doing HiDPI adjustments that need to be done after QCoreApplication instantiation.
|
||||
apply_dpi_adjustments_stage_application(hidpi_mode, application)
|
||||
if no_custom_factor_rounding and hasattr(QtWidgets.QApplication, 'setHighDpiScaleFactorRoundingPolicy'):
|
||||
|
|
|
@ -31,9 +31,9 @@ import traceback
|
|||
from ipaddress import IPv4Address, IPv6Address, AddressValueError
|
||||
from shutil import which
|
||||
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtCore import QCryptographicHash as QHash
|
||||
from PyQt5.QtNetwork import QAbstractSocket, QHostAddress, QNetworkInterface
|
||||
from PyQt6 import QtGui
|
||||
from PyQt6.QtCore import QCryptographicHash as QHash
|
||||
from PyQt6.QtNetwork import QAbstractSocket, QHostAddress, QNetworkInterface
|
||||
from chardet.universaldetector import UniversalDetector
|
||||
|
||||
log = logging.getLogger(__name__ + '.__init__')
|
||||
|
@ -282,7 +282,7 @@ def sha256_file_hash(filename):
|
|||
def qmd5_hash(salt=None, data=None):
|
||||
"""
|
||||
Returns the hashed output of MD5Sum on salt, data
|
||||
using PyQt5.QCryptographicHash. Function returns a
|
||||
using PyQt6.QCryptographicHash. Function returns a
|
||||
QByteArray instead of a text string.
|
||||
If you need a string instead, call with
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ by the shortcuts system.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common.registry import Registry
|
||||
|
||||
|
@ -356,7 +356,7 @@ class ActionList(object):
|
|||
affected_actions = []
|
||||
if global_context:
|
||||
affected_actions = [a for a in self.get_all_child_objects(action.parent()) if isinstance(a,
|
||||
QtWidgets.QAction)]
|
||||
QtGui.QAction)]
|
||||
for existing_action in existing_actions:
|
||||
if action is existing_action:
|
||||
continue
|
||||
|
|
|
@ -26,7 +26,7 @@ from contextlib import contextmanager
|
|||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ from random import randint
|
|||
from tempfile import gettempdir
|
||||
|
||||
import requests
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
|
||||
from openlp.core.common import trace_error_handler
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -27,7 +27,7 @@ import logging
|
|||
import re
|
||||
from collections import namedtuple
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import Singleton
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
@ -40,7 +40,7 @@ log = logging.getLogger(__name__)
|
|||
# Due to dependency issues, this HAS to be at the top of the file
|
||||
def translate(context, text, comment=None, qt_translate=QtCore.QCoreApplication.translate):
|
||||
"""
|
||||
A special shortcut method to wrap around the Qt5 translation functions. This abstracts the translation procedure so
|
||||
A special shortcut method to wrap around the Qt6 translation functions. This abstracts the translation procedure so
|
||||
that we can change it if at a later date if necessary, without having to redo the whole of OpenLP.
|
||||
|
||||
:param context: The translation context, used to give each string a context or a namespace.
|
||||
|
@ -233,7 +233,7 @@ class LanguageManager(object):
|
|||
# A translator for buttons and other default strings provided by Qt.
|
||||
if not is_win() and not is_macosx():
|
||||
lang_path = QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.TranslationsPath)
|
||||
# As of Qt5, the core translations come in 2 files per language
|
||||
# As of Qt6, the core translations come in 2 files per language
|
||||
default_translator = QtCore.QTranslator()
|
||||
default_translator.load('qt_%s' % language, lang_path)
|
||||
base_translator = QtCore.QTranslator()
|
||||
|
@ -312,7 +312,7 @@ class LanguageManager(object):
|
|||
LanguageManager.__qm_list__ = {}
|
||||
qm_files = LanguageManager.find_qm_files()
|
||||
for counter, qmf in enumerate(qm_files):
|
||||
reg_ex = QtCore.QRegExp("^.*i18n/(.*).qm")
|
||||
reg_ex = QtCore.QRegularExpression("^.*i18n/(.*).qm")
|
||||
if reg_ex.exactMatch(qmf):
|
||||
name = '{regex}'.format(regex=reg_ex.cap(1))
|
||||
LanguageManager.__qm_list__[
|
||||
|
|
|
@ -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.
|
||||
"""
|
||||
from PyQt5 import QtGui
|
||||
from PyQt6 import QtGui
|
||||
return QtGui.QGuiApplication.platformName() == 'xcb'
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ from enum import IntEnum
|
|||
from pathlib import Path
|
||||
from tempfile import gettempdir
|
||||
|
||||
from PyQt5 import QtCore, QtGui
|
||||
from PyQt6 import QtCore, QtGui
|
||||
|
||||
from openlp.core.common import SlideLimits, ThemeLevel
|
||||
from openlp.core.common.enum import AlertLocation, BibleSearch, CustomSearch, HiDPIMode, ImageThemeMode, LayoutStyle, \
|
||||
|
@ -300,7 +300,7 @@ class Settings(QtCore.QSettings):
|
|||
'media/status': PluginStatus.Inactive,
|
||||
'media/media files': [],
|
||||
'media/last directory': None,
|
||||
'media/media auto start': QtCore.Qt.Unchecked,
|
||||
'media/media auto start': QtCore.Qt.CheckState.Unchecked,
|
||||
'media/vlc arguments': '',
|
||||
'media/live volume': 50,
|
||||
'media/preview volume': 0,
|
||||
|
@ -316,18 +316,18 @@ class Settings(QtCore.QSettings):
|
|||
'planningcenter/application_id': '',
|
||||
'planningcenter/secret': '',
|
||||
'presentations/status': PluginStatus.Inactive,
|
||||
'presentations/override app': QtCore.Qt.Unchecked,
|
||||
'presentations/maclo': QtCore.Qt.Checked,
|
||||
'presentations/Impress': QtCore.Qt.Checked,
|
||||
'presentations/Powerpoint': QtCore.Qt.Checked,
|
||||
'presentations/Pdf': QtCore.Qt.Checked,
|
||||
'presentations/Keynote': QtCore.Qt.Checked,
|
||||
'presentations/PowerPointMac': QtCore.Qt.Checked,
|
||||
'presentations/override app': QtCore.Qt.CheckState.Unchecked,
|
||||
'presentations/maclo': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/Impress': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/Powerpoint': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/Pdf': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/Keynote': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/PowerPointMac': QtCore.Qt.CheckState.Checked,
|
||||
'presentations/presentations files': [],
|
||||
'presentations/thumbnail_scheme': '',
|
||||
'presentations/powerpoint slide click advance': QtCore.Qt.Unchecked,
|
||||
'presentations/powerpoint control window': QtCore.Qt.Unchecked,
|
||||
'presentations/impress use display setting': QtCore.Qt.Unchecked,
|
||||
'presentations/powerpoint slide click advance': QtCore.Qt.CheckState.Unchecked,
|
||||
'presentations/powerpoint control window': QtCore.Qt.CheckState.Unchecked,
|
||||
'presentations/impress use display setting': QtCore.Qt.CheckState.Unchecked,
|
||||
'presentations/last directory': None,
|
||||
'presentations/db type': 'sqlite',
|
||||
'presentations/db username': '',
|
||||
|
@ -533,17 +533,18 @@ class Settings(QtCore.QSettings):
|
|||
def init_default_shortcuts(self):
|
||||
# Add shortcuts here so QKeySequence has a QApplication instance to use.
|
||||
Settings.__default_settings__.update({
|
||||
'shortcuts/aboutItem': [QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_F1)],
|
||||
'shortcuts/aboutItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Control + QtCore.Qt.Key.Key_F1)],
|
||||
'shortcuts/addToService': [],
|
||||
'shortcuts/audioPauseItem': [],
|
||||
'shortcuts/displayTagItem': [],
|
||||
'shortcuts/blankScreen': [QtGui.QKeySequence(QtCore.Qt.Key_Period)],
|
||||
'shortcuts/collapse': [QtGui.QKeySequence(QtCore.Qt.Key_Minus)],
|
||||
'shortcuts/desktopScreen': [QtGui.QKeySequence(QtCore.Qt.Key_D), QtGui.QKeySequence(QtCore.Qt.Key_Escape)],
|
||||
'shortcuts/blankScreen': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Period)],
|
||||
'shortcuts/collapse': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Minus)],
|
||||
'shortcuts/desktopScreen': [QtGui.QKeySequence(QtCore.Qt.Key.Key_D),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Escape)],
|
||||
'shortcuts/delete': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/down': [QtGui.QKeySequence(QtCore.Qt.Key_Down)],
|
||||
'shortcuts/down': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Down)],
|
||||
'shortcuts/editSong': [],
|
||||
'shortcuts/expand': [QtGui.QKeySequence(QtCore.Qt.Key_Plus)],
|
||||
'shortcuts/expand': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus)],
|
||||
'shortcuts/exportThemeItem': [],
|
||||
'shortcuts/fileNewItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.New)],
|
||||
'shortcuts/fileSaveAsItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.SaveAs)],
|
||||
|
@ -555,82 +556,85 @@ class Settings(QtCore.QSettings):
|
|||
'shortcuts/importThemeItem': [],
|
||||
'shortcuts/importBibleItem': [],
|
||||
'shortcuts/listViewBiblesDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewBiblesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewBiblesLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewBiblesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewBiblesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewBiblesLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewBiblesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/listViewCustomDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewCustomPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewCustomLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewCustomServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewCustomPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewCustomLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewCustomServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/listViewImagesDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewImagesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewImagesLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewImagesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewImagesPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewImagesLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewImagesServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/listViewMediaDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewMediaPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewMediaLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewMediaServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewMediaPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewMediaLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Shift + QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewMediaServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/listViewPresentationsDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewPresentationsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewPresentationsLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewPresentationsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewPresentationsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewPresentationsLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key_Shift +
|
||||
QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Shift +
|
||||
QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewPresentationsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/listViewSongsDeleteItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Delete)],
|
||||
'shortcuts/listViewSongsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewSongsLiveItem': [QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.SHIFT + QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/listViewSongsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Equal)],
|
||||
'shortcuts/listViewSongsPreviewItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewSongsLiveItem': [QtGui.QKeySequence(QtCore.Qt.Key_Shift + QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_Shift + QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/listViewSongsServiceItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Plus),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Equal)],
|
||||
'shortcuts/lockPanel': [],
|
||||
'shortcuts/modeDefaultItem': [],
|
||||
'shortcuts/modeLiveItem': [],
|
||||
'shortcuts/make_live': [QtGui.QKeySequence(QtCore.Qt.Key_Return), QtGui.QKeySequence(QtCore.Qt.Key_Enter)],
|
||||
'shortcuts/moveUp': [QtGui.QKeySequence(QtCore.Qt.Key_PageUp)],
|
||||
'shortcuts/moveTop': [QtGui.QKeySequence(QtCore.Qt.Key_Home)],
|
||||
'shortcuts/make_live': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Return),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_Enter)],
|
||||
'shortcuts/moveUp': [QtGui.QKeySequence(QtCore.Qt.Key.Key_PageUp)],
|
||||
'shortcuts/moveTop': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Home)],
|
||||
'shortcuts/modeSetupItem': [],
|
||||
'shortcuts/moveBottom': [QtGui.QKeySequence(QtCore.Qt.Key_End)],
|
||||
'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
||||
'shortcuts/moveBottom': [QtGui.QKeySequence(QtCore.Qt.Key.Key_End)],
|
||||
'shortcuts/moveDown': [QtGui.QKeySequence(QtCore.Qt.Key.Key_PageDown)],
|
||||
'shortcuts/nextTrackItem': [],
|
||||
'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Down),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
||||
'shortcuts/nextItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key_Down),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_PageDown)],
|
||||
'shortcuts/nextService': [QtGui.QKeySequence(QtCore.Qt.Key_Right)],
|
||||
'shortcuts/nextItem_live': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Down),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_PageDown)],
|
||||
'shortcuts/nextItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Down),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_PageDown)],
|
||||
'shortcuts/nextService': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Right)],
|
||||
'shortcuts/newService': [],
|
||||
'shortcuts/openService': [],
|
||||
'shortcuts/saveService': [],
|
||||
'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key_Up),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_PageUp)],
|
||||
'shortcuts/previousItem_live': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Up),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_PageUp)],
|
||||
'shortcuts/playbackPause': [],
|
||||
'shortcuts/playbackPlay': [],
|
||||
'shortcuts/playbackStop': [],
|
||||
'shortcuts/playSlidesLoop': [],
|
||||
'shortcuts/playSlidesOnce': [],
|
||||
'shortcuts/previousService': [QtGui.QKeySequence(QtCore.Qt.Key_Left)],
|
||||
'shortcuts/previousItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key_Up),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key_PageUp)],
|
||||
'shortcuts/previousService': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Left)],
|
||||
'shortcuts/previousItem_preview': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Up),
|
||||
QtGui.QKeySequence(QtCore.Qt.Key.Key_PageUp)],
|
||||
'shortcuts/printServiceItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Print)],
|
||||
'shortcuts/songExportItem': [],
|
||||
'shortcuts/songUsageStatus': [QtGui.QKeySequence(QtCore.Qt.Key_F4)],
|
||||
'shortcuts/songUsageStatus': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F4)],
|
||||
'shortcuts/searchShortcut': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Find)],
|
||||
'shortcuts/settingsShortcutsItem': [],
|
||||
'shortcuts/settingsImportItem': [],
|
||||
'shortcuts/settingsPluginListItem': [QtGui.QKeySequence(QtCore.Qt.ALT + QtCore.Qt.Key_F7)],
|
||||
'shortcuts/settingsPluginListItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Alt + QtCore.Qt.Key.Key_F7)],
|
||||
'shortcuts/songUsageDelete': [],
|
||||
'shortcuts/settingsConfigureItem': [QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Preferences)],
|
||||
'shortcuts/shortcutAction_B': [QtGui.QKeySequence(QtCore.Qt.Key_B)],
|
||||
|
@ -654,22 +658,22 @@ class Settings(QtCore.QSettings):
|
|||
'shortcuts/settingsExportItem': [],
|
||||
'shortcuts/songUsageReport': [],
|
||||
'shortcuts/songImportItem': [],
|
||||
'shortcuts/themeScreen': [QtGui.QKeySequence(QtCore.Qt.Key_T)],
|
||||
'shortcuts/themeScreen': [QtGui.QKeySequence(QtCore.Qt.Key.Key_T)],
|
||||
'shortcuts/toolsReindexItem': [],
|
||||
'shortcuts/toolsFindDuplicates': [],
|
||||
'shortcuts/toolsSongListReport': [],
|
||||
'shortcuts/toolsAlertItem': [QtGui.QKeySequence(QtCore.Qt.Key_F7)],
|
||||
'shortcuts/toolsAlertItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F7)],
|
||||
'shortcuts/toolsFirstTimeWizard': [],
|
||||
'shortcuts/toolsOpenDataFolder': [],
|
||||
'shortcuts/toolsAddToolItem': [],
|
||||
'shortcuts/updateThemeImages': [],
|
||||
'shortcuts/up': [QtGui.QKeySequence(QtCore.Qt.Key_Up)],
|
||||
'shortcuts/viewProjectorManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key_F6)],
|
||||
'shortcuts/viewThemeManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key_F10)],
|
||||
'shortcuts/viewMediaManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key_F8)],
|
||||
'shortcuts/viewPreviewPanel': [QtGui.QKeySequence(QtCore.Qt.Key_F11)],
|
||||
'shortcuts/viewLivePanel': [QtGui.QKeySequence(QtCore.Qt.Key_F12)],
|
||||
'shortcuts/viewServiceManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key_F9)],
|
||||
'shortcuts/up': [QtGui.QKeySequence(QtCore.Qt.Key.Key_Up)],
|
||||
'shortcuts/viewProjectorManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F6)],
|
||||
'shortcuts/viewThemeManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F10)],
|
||||
'shortcuts/viewMediaManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F8)],
|
||||
'shortcuts/viewPreviewPanel': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F11)],
|
||||
'shortcuts/viewLivePanel': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F12)],
|
||||
'shortcuts/viewServiceManagerItem': [QtGui.QKeySequence(QtCore.Qt.Key.Key_F9)],
|
||||
'shortcuts/webSiteItem': []
|
||||
})
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import math
|
|||
import os
|
||||
import re
|
||||
|
||||
from PyQt5 import QtWidgets, QtGui
|
||||
from PyQt6 import QtWidgets, QtGui
|
||||
|
||||
from openlp.core.common import ThemeLevel
|
||||
from openlp.core.common.enum import ServiceItemType
|
||||
|
|
|
@ -26,7 +26,7 @@ import logging
|
|||
import copy
|
||||
from functools import cmp_to_key
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import Singleton
|
||||
from openlp.core.common.i18n import translate
|
||||
|
|
|
@ -25,7 +25,7 @@ Heavily inspired by https://stackoverflow.com/questions/33467776/qt-qwebengine-r
|
|||
import logging
|
||||
import os.path
|
||||
|
||||
from PyQt5 import QtCore, QtWebEngineWidgets, QtWidgets, QtWebEngineCore
|
||||
from PyQt6 import QtCore, QtWebEngineCore, QtWebEngineWidgets, QtWidgets
|
||||
from typing import Tuple
|
||||
|
||||
from openlp.core.common import Singleton
|
||||
|
@ -35,16 +35,16 @@ from openlp.core.common.platform import is_win
|
|||
|
||||
|
||||
LOG_LEVELS = {
|
||||
QtWebEngineWidgets.QWebEnginePage.InfoMessageLevel: logging.INFO,
|
||||
QtWebEngineWidgets.QWebEnginePage.WarningMessageLevel: logging.WARNING,
|
||||
QtWebEngineWidgets.QWebEnginePage.ErrorMessageLevel: logging.ERROR
|
||||
QtWebEngineCore.QWebEnginePage.JavaScriptConsoleMessageLevel.InfoMessageLevel: logging.INFO,
|
||||
QtWebEngineCore.QWebEnginePage.JavaScriptConsoleMessageLevel.WarningMessageLevel: logging.WARNING,
|
||||
QtWebEngineCore.QWebEnginePage.JavaScriptConsoleMessageLevel.ErrorMessageLevel: logging.ERROR
|
||||
}
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class WebEnginePage(QtWebEngineWidgets.QWebEnginePage):
|
||||
class WebEnginePage(QtWebEngineCore.QWebEnginePage):
|
||||
"""
|
||||
A custom WebEngine page to capture Javascript console logging
|
||||
"""
|
||||
|
@ -76,12 +76,16 @@ class WebEngineView(QtWebEngineWidgets.QWebEngineView):
|
|||
"""
|
||||
super(WebEngineView, self).__init__(parent)
|
||||
self.setPage(WebEnginePage(self))
|
||||
self.settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalStorageEnabled, True)
|
||||
self.settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalContentCanAccessFileUrls, True)
|
||||
self.settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalContentCanAccessRemoteUrls, True)
|
||||
self.page().settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalStorageEnabled, True)
|
||||
self.page().settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalContentCanAccessFileUrls, True)
|
||||
self.page().settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.LocalContentCanAccessRemoteUrls, True)
|
||||
self.settings().setAttribute(QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalStorageEnabled, True)
|
||||
self.settings().setAttribute(
|
||||
QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalContentCanAccessFileUrls, True)
|
||||
self.settings().setAttribute(
|
||||
QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True)
|
||||
self.page().settings().setAttribute(QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalStorageEnabled, True)
|
||||
self.page().settings().setAttribute(
|
||||
QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalContentCanAccessFileUrls, True)
|
||||
self.page().settings().setAttribute(
|
||||
QtWebEngineCore.QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True)
|
||||
self.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
|
||||
|
||||
def eventFilter(self, obj, ev):
|
||||
|
@ -89,9 +93,9 @@ class WebEngineView(QtWebEngineWidgets.QWebEngineView):
|
|||
Emit delegatePaint on paint event of the last added QOpenGLWidget child
|
||||
"""
|
||||
if obj == self._child:
|
||||
if ev.type() == QtCore.QEvent.MouseButtonPress or ev.type() == QtCore.QEvent.TouchBegin:
|
||||
if ev.type() == QtCore.QEvent.Type.MouseButtonPress or ev.type() == QtCore.QEvent.Type.TouchBegin:
|
||||
self.display_clicked()
|
||||
if ev.type() == QtCore.QEvent.Paint:
|
||||
if ev.type() == QtCore.QEvent.Type.Paint:
|
||||
self.delegatePaint.emit()
|
||||
return super(WebEngineView, self).eventFilter(obj, ev)
|
||||
|
||||
|
@ -105,7 +109,7 @@ class WebEngineView(QtWebEngineWidgets.QWebEngineView):
|
|||
"""
|
||||
Handle events
|
||||
"""
|
||||
if ev.type() == QtCore.QEvent.ChildAdded:
|
||||
if ev.type() == QtCore.QEvent.Type.ChildAdded:
|
||||
# Only use QWidget child (used to be QOpenGLWidget)
|
||||
w = ev.child()
|
||||
if w and isinstance(w, QtWidgets.QWidget):
|
||||
|
@ -217,7 +221,7 @@ class WebViewCustomScheme(QtCore.QObject):
|
|||
|
||||
def init_handler(self, profile=None):
|
||||
if profile is None:
|
||||
profile = QtWebEngineWidgets.QWebEngineProfile.defaultProfile()
|
||||
profile = QtWebEngineCore.QWebEngineProfile.defaultProfile()
|
||||
handler = profile.urlSchemeHandler(self.scheme_name)
|
||||
if handler is not None:
|
||||
profile.removeUrlSchemeHandler(handler)
|
||||
|
|
|
@ -27,7 +27,7 @@ import os
|
|||
import copy
|
||||
import re
|
||||
|
||||
from PyQt5 import QtCore, QtWebChannel, QtWidgets
|
||||
from PyQt6 import QtCore, QtWebChannel, QtWidgets
|
||||
|
||||
from openlp.core.common.enum import ServiceItemType
|
||||
from openlp.core.common.i18n import translate
|
||||
|
|
|
@ -28,7 +28,7 @@ import base64
|
|||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Provides the generic functions for interfacing plugins with the Media Manager.
|
|||
"""
|
||||
import re
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
|
|
|
@ -23,7 +23,7 @@ Provide plugin management
|
|||
"""
|
||||
import os
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.state import State, MessageType
|
||||
from openlp.core.common import extension_loader
|
||||
|
|
|
@ -30,7 +30,7 @@ from copy import deepcopy
|
|||
from pathlib import Path
|
||||
from shutil import copytree, copy, move
|
||||
|
||||
from PyQt5 import QtGui
|
||||
from PyQt6 import QtGui
|
||||
|
||||
from openlp.core.common import ThemeLevel, sha256_file_hash
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
The :mod:`~openlp.core.lib.settingstab` module contains the base SettingsTab class which plugins use for adding their
|
||||
own tab to the settings dialog.
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`ui` module provides standard UI components for OpenLP.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
@ -268,7 +268,7 @@ def create_action(parent, name, **kwargs):
|
|||
``triggers``
|
||||
A slot which is connected to the actions ``triggered()`` slot.
|
||||
"""
|
||||
action = QtWidgets.QAction(parent)
|
||||
action = QtGui.QAction(parent)
|
||||
action.setObjectName(name)
|
||||
if is_macosx():
|
||||
action.setIconVisibleInMenu(False)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.pages` module contains wizard pages used in OpenLP
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
|
||||
class GridLayoutPage(QtWidgets.QWizardPage):
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.pages.alignment` module contains the alignment page used in the theme wizard
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.theme import HorizontalType, VerticalType, TransitionType, TransitionSpeed, TransitionDirection
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.pages.areaposition` module contains the area position page used in the theme wizard
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.pages import GridLayoutPage
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.pages.background` module contains the background page used in the theme wizard
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common import get_images_filter
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.pages.fontselect` module contains the font selection page used in the theme wizard
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.pages import GridLayoutPage
|
||||
|
|
|
@ -24,7 +24,7 @@ database.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import verify_ip_address, Singleton
|
||||
from openlp.core.common.i18n import translate
|
||||
|
|
|
@ -26,7 +26,7 @@ Provides the functions for the display/control of Projectors.
|
|||
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
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
|
||||
item to change input source.
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
self.get_settings() # In case the dialog interface setting was changed
|
||||
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
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
self.projector_form.exec()
|
||||
|
||||
|
@ -490,7 +490,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
|||
"""
|
||||
Deletes a projector from the list and the database
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
|
||||
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
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
|
||||
projector = list_item.data(QtCore.Qt.UserRole)
|
||||
|
@ -621,7 +621,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
|||
"""
|
||||
Builds message box with projector status information
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
lwi = self.projector_list_widget.item(self.projector_list_widget.currentRow())
|
||||
projector = lwi.data(QtCore.Qt.UserRole)
|
||||
|
@ -701,7 +701,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
|||
"""
|
||||
Calls edit dialog as readonly with selected projector to show information
|
||||
|
||||
:param opt: Needed by PyQt5
|
||||
:param opt: Needed by PyQt6
|
||||
"""
|
||||
list_item = self.projector_list_widget.item(self.projector_list_widget.currentRow())
|
||||
projector = list_item.data(QtCore.Qt.UserRole)
|
||||
|
@ -758,7 +758,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
|||
Add a projector from the edit dialog
|
||||
|
||||
:param ip: IP address of new record item to find
|
||||
:param opts: Needed by PyQt5
|
||||
:param opts: Needed by PyQt6
|
||||
"""
|
||||
log.debug(f'add_projector_from_wizard(ip={ip})')
|
||||
item = self.projectordb.get_projector_by_ip(ip)
|
||||
|
@ -839,7 +839,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
|||
return self.update_icons()
|
||||
|
||||
def get_toolbar_item(self, name, enabled=False, hidden=False):
|
||||
item = self.one_toolbar.findChild(QtWidgets.QAction, name)
|
||||
item = self.one_toolbar.findChild(QtGui.QAction, name)
|
||||
if item == 0:
|
||||
log.debug(f'No item found with name "{name}"')
|
||||
return
|
||||
|
|
|
@ -49,7 +49,7 @@ import logging
|
|||
from codecs import decode
|
||||
from copy import copy
|
||||
|
||||
from PyQt5 import QtCore, QtNetwork
|
||||
from PyQt6 import QtCore, QtNetwork
|
||||
|
||||
from openlp.core.common import qmd5_hash
|
||||
from openlp.core.common.i18n import translate
|
||||
|
|
|
@ -25,7 +25,7 @@ Provides the dialog window for selecting video source for projector.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.platform import is_macosx
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`openlp.core.ui.projector.tab` module provides the settings tab in the
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from PyQt5 import QtCore, QtNetwork
|
||||
from PyQt6 import QtCore, QtNetwork
|
||||
|
||||
from openlp.core.common.mixins import LogMixin
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`openlp.core.threading` module contains some common threading code
|
||||
"""
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
|
||||
from openlp.core.common.mixins import LogMixin
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`ui` module provides the core user interface for OpenLP
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
|
||||
class HideMode(object):
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
##########################################################################
|
||||
import datetime
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
from PyQt6 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
@ -123,8 +123,8 @@ class UiAboutDialog(object):
|
|||
'libraries:')
|
||||
build_tech = ('<ul>'
|
||||
'<li><a href="https://www.python.org/">Python</a> (PSFL)</li>'
|
||||
'<li><a href="https://www.qt.io">Qt5</a> (GPL3/LGPL3)</li>'
|
||||
'<li><a href="https://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt5</a> (GPL3)</li>'
|
||||
'<li><a href="https://www.qt.io">Qt6</a> (GPL3/LGPL3)</li>'
|
||||
'<li><a href="https://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt6</a> (GPL3)</li>'
|
||||
'<li><a href="https://github.com/ActiveState/appdirs">appdirs</a> (MIT)</li>'
|
||||
'<li><a href="https://alembic.sqlalchemy.org/en/latest/">Alembic</a> (MIT)</li>'
|
||||
'<li><a href="https://www.crummy.com/software/BeautifulSoup/">BeautifulSoup 4</a> (MIT)</li>'
|
||||
|
|
|
@ -23,7 +23,7 @@ The About dialog.
|
|||
"""
|
||||
import webbrowser
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.version import get_version
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`advancedtab` provides an advanced settings facility.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
from PyQt6 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
@ -54,7 +54,7 @@ class Ui_ConfirmationDialog():
|
|||
self.listview = QtWidgets.QListView(self)
|
||||
self.listview.setObjectName("confirmation listview")
|
||||
# make the entries read-only
|
||||
self.listview.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
self.listview.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||
self.confirmation_layout.addWidget(self.listview)
|
||||
|
||||
# add the items to the listview model
|
||||
|
|
|
@ -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.
|
||||
This runs the Qt dialog, which returns the usual 0 (for No) or 1 (for Yes)
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.ui.confirmationdialog import Ui_ConfirmationDialog
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
The GUI widgets of the exception dialog.
|
||||
"""
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
|
|
@ -26,7 +26,7 @@ import os
|
|||
import platform
|
||||
import re
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets for the rename dialog
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
@ -45,7 +45,8 @@ class Ui_FileRenameDialog(object):
|
|||
self.file_name_label.setObjectName('file_name_label')
|
||||
self.dialog_layout.addWidget(self.file_name_label, 0, 0)
|
||||
self.file_name_edit = QtWidgets.QLineEdit(file_rename_dialog)
|
||||
self.file_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+%]+'), self))
|
||||
self.file_name_edit.setValidator(
|
||||
QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(r'[^/\\?*|<>\[\]":+%]+'), self))
|
||||
self.file_name_edit.setObjectName('file_name_edit')
|
||||
self.dialog_layout.addWidget(self.file_name_edit, 0, 1)
|
||||
self.button_box = create_button_box(file_rename_dialog, 'button_box', ['cancel', 'ok'])
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The file rename dialog.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -30,7 +30,7 @@ import urllib.request
|
|||
from pathlib import Path
|
||||
from tempfile import gettempdir
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
|
||||
from openlp.core.api.deploy import get_latest_size, download_and_install
|
||||
from openlp.core.common import trace_error_handler
|
||||
|
@ -209,7 +209,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
self.application.process_events()
|
||||
item = QtWidgets.QListWidgetItem(song['title'], self.songs_list_widget)
|
||||
item.setData(QtCore.Qt.UserRole, (song['file_name'], song['sha256']))
|
||||
item.setCheckState(QtCore.Qt.Unchecked)
|
||||
item.setCheckState(QtCore.Qt.CheckState.Unchecked)
|
||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
|
||||
for lang in config['bibles'].values():
|
||||
self.application.process_events()
|
||||
|
@ -218,7 +218,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
self.application.process_events()
|
||||
item = QtWidgets.QTreeWidgetItem(lang_item, [translation['title']])
|
||||
item.setData(0, QtCore.Qt.UserRole, (translation['file_name'], translation['sha256']))
|
||||
item.setCheckState(0, QtCore.Qt.Unchecked)
|
||||
item.setCheckState(0, QtCore.Qt.CheckState.Unchecked)
|
||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
|
||||
self.bibles_tree_widget.expandAll()
|
||||
self.application.process_events()
|
||||
|
@ -415,7 +415,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
for i in range(self.songs_list_widget.count()):
|
||||
self.application.process_events()
|
||||
item = self.songs_list_widget.item(i)
|
||||
if item.checkState() == QtCore.Qt.Checked:
|
||||
if item.checkState() == QtCore.Qt.CheckState.Checked:
|
||||
filename, sha256 = item.data(QtCore.Qt.UserRole)
|
||||
size = get_url_file_size('{path}{name}'.format(path=self.songs_url, name=filename))
|
||||
self.max_progress += size
|
||||
|
@ -424,7 +424,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
while iterator.value():
|
||||
self.application.process_events()
|
||||
item = iterator.value()
|
||||
if item.parent() and item.checkState(0) == QtCore.Qt.Checked:
|
||||
if item.parent() and item.checkState(0) == QtCore.Qt.CheckState.Checked:
|
||||
filename, sha256 = item.data(0, QtCore.Qt.UserRole)
|
||||
size = get_url_file_size('{path}{name}'.format(path=self.bibles_url, name=filename))
|
||||
self.max_progress += size
|
||||
|
@ -508,7 +508,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
# Download songs
|
||||
for i in range(self.songs_list_widget.count()):
|
||||
item = self.songs_list_widget.item(i)
|
||||
if item.checkState() == QtCore.Qt.Checked:
|
||||
if item.checkState() == QtCore.Qt.CheckState.Checked:
|
||||
filename, sha256 = item.data(QtCore.Qt.UserRole)
|
||||
self._increment_progress_bar(self.downloading.format(name=filename), 0)
|
||||
self.previous_size = 0
|
||||
|
@ -520,7 +520,7 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
bibles_iterator = QtWidgets.QTreeWidgetItemIterator(self.bibles_tree_widget)
|
||||
while bibles_iterator.value():
|
||||
item = bibles_iterator.value()
|
||||
if item.parent() and item.checkState(0) == QtCore.Qt.Checked:
|
||||
if item.parent() and item.checkState(0) == QtCore.Qt.CheckState.Checked:
|
||||
bible, sha256 = item.data(0, QtCore.Qt.UserRole)
|
||||
self._increment_progress_bar(self.downloading.format(name=bible), 0)
|
||||
self.previous_size = 0
|
||||
|
@ -563,5 +563,5 @@ class FirstTimeForm(QtWidgets.QWizard, UiFirstTimeWizard, RegistryProperties):
|
|||
"""
|
||||
Set the status of a plugin.
|
||||
"""
|
||||
status = PluginStatus.Active if field.checkState() == QtCore.Qt.Checked else PluginStatus.Inactive
|
||||
status = PluginStatus.Active if field.checkState() == QtCore.Qt.CheckState.Checked else PluginStatus.Inactive
|
||||
self.settings.setValue(tag, status)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets of the language selection dialog.
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The language selection dialog.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import LanguageManager
|
||||
from openlp.core.lib.ui import create_action
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets for the first time wizard.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import clean_button_text
|
||||
from openlp.core.common.platform import is_macosx
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import get_natural_key, translate
|
||||
from openlp.core.lib.ui import create_button_box, critical_error_message_box
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets for the formatting tags window.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -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.
|
||||
Base Tags cannot be changed.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.formattingtags import FormattingTags
|
||||
|
@ -104,7 +104,7 @@ class FormattingTagForm(QtWidgets.QDialog, Ui_FormattingTagDialog, FormattingTag
|
|||
hiddenlayout.setAlignment(QtCore.Qt.AlignCenter)
|
||||
hiddenlayout.setContentsMargins(0, 0, 0, 0)
|
||||
hiddenwidget.setLayout(hiddenlayout)
|
||||
hiddencheckbox.setCheckState(QtCore.Qt.Unchecked)
|
||||
hiddencheckbox.setCheckState(QtCore.Qt.CheckState.Unchecked)
|
||||
self.tag_table_widget.setCellWidget(new_row, 4, hiddenwidget)
|
||||
self.tag_table_widget.resizeRowsToContents()
|
||||
self.tag_table_widget.scrollToBottom()
|
||||
|
@ -174,7 +174,8 @@ class FormattingTagForm(QtWidgets.QDialog, Ui_FormattingTagDialog, FormattingTag
|
|||
hiddenlayout.setAlignment(QtCore.Qt.AlignCenter)
|
||||
hiddenlayout.setContentsMargins(0, 0, 0, 0)
|
||||
hiddenwidget.setLayout(hiddenlayout)
|
||||
hiddencheckbox.setCheckState(QtCore.Qt.Checked if html['hidden'] else QtCore.Qt.Unchecked)
|
||||
hiddencheckbox.setCheckState(QtCore.Qt.CheckState.Checked if html['hidden']
|
||||
else QtCore.Qt.CheckState.Unchecked)
|
||||
self.tag_table_widget.setCellWidget(line, 4, hiddenwidget)
|
||||
self.tag_table_widget.resizeRowsToContents()
|
||||
# Permanent (persistent) tags do not have this key
|
||||
|
|
|
@ -24,7 +24,7 @@ The general tab of the configuration dialog.
|
|||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import get_images_filter
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
@ -400,6 +400,6 @@ class GeneralTab(SettingsTab):
|
|||
self.logo_background_color = color
|
||||
|
||||
def on_search_as_type_check_box_changed(self, check_state):
|
||||
self.is_search_as_you_type_enabled = (check_state == QtCore.Qt.Checked)
|
||||
self.is_search_as_you_type_enabled = (check_state == QtCore.Qt.CheckState.Checked)
|
||||
self.settings_form.register_post_process('songs_config_updated')
|
||||
self.settings_form.register_post_process('custom_config_updated')
|
||||
|
|
|
@ -24,7 +24,7 @@ The :mod:`languages` module provides a list of icons.
|
|||
import logging
|
||||
|
||||
import qtawesome as qta
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
from PyQt6 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import Singleton
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
|
|
|
@ -25,7 +25,7 @@ import os
|
|||
from pathlib import Path
|
||||
from typing import Any, List, Optional, Union
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import sha256_file_hash
|
||||
from openlp.core.common.i18n import UiStrings, get_natural_key, translate
|
||||
|
|
|
@ -30,7 +30,7 @@ from pathlib import Path
|
|||
from tempfile import gettempdir
|
||||
from threading import Lock
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.api.http.server import HttpServer
|
||||
from openlp.core.api.websockets import WebSocketServer
|
||||
|
@ -190,7 +190,7 @@ class Ui_MainWindow(object):
|
|||
can_shortcuts=True,
|
||||
category=UiStrings().File, triggers=main_window.close)
|
||||
# Give QT Extra Hint that this is the Exit Menu Item
|
||||
self.file_exit_item.setMenuRole(QtWidgets.QAction.MenuRole.QuitRole)
|
||||
self.file_exit_item.setMenuRole(QtGui.QAction.MenuRole.QuitRole)
|
||||
action_list.add_category(UiStrings().Import, CategoryOrder.standard_menu)
|
||||
self.import_theme_item = create_action(main_window, 'importThemeItem', category=UiStrings().Import,
|
||||
can_shortcuts=True)
|
||||
|
@ -237,7 +237,7 @@ class Ui_MainWindow(object):
|
|||
can_shortcuts=True)
|
||||
self.mode_live_item = create_action(main_window, 'modeLiveItem', checked=True, category=UiStrings().ViewMode,
|
||||
can_shortcuts=True)
|
||||
self.mode_group = QtWidgets.QActionGroup(main_window)
|
||||
self.mode_group = QtGui.QActionGroup(main_window)
|
||||
self.mode_group.addAction(self.mode_default_item)
|
||||
self.mode_group.addAction(self.mode_setup_item)
|
||||
self.mode_group.addAction(self.mode_live_item)
|
||||
|
@ -263,7 +263,7 @@ class Ui_MainWindow(object):
|
|||
triggers=self.on_plugin_item_clicked)
|
||||
# i18n Language Items
|
||||
self.auto_language_item = create_action(main_window, 'autoLanguageItem', checked=LanguageManager.auto_language)
|
||||
self.language_group = QtWidgets.QActionGroup(main_window)
|
||||
self.language_group = QtGui.QActionGroup(main_window)
|
||||
self.language_group.setExclusive(True)
|
||||
self.language_group.setObjectName('languageGroup')
|
||||
add_actions(self.language_group, [self.auto_language_item])
|
||||
|
@ -283,7 +283,7 @@ class Ui_MainWindow(object):
|
|||
icon=UiIcons().settings, can_shortcuts=True,
|
||||
category=UiStrings().Settings)
|
||||
# Give Qt Extra Hint that this is the Preferences Menu Item
|
||||
self.settings_configure_item.setMenuRole(QtWidgets.QAction.MenuRole.PreferencesRole)
|
||||
self.settings_configure_item.setMenuRole(QtGui.QAction.MenuRole.PreferencesRole)
|
||||
self.settings_import_item = create_action(main_window, 'settingsImportItem',
|
||||
category=UiStrings().Import, can_shortcuts=True)
|
||||
self.settings_export_item = create_action(main_window, 'settingsExportItem',
|
||||
|
@ -293,7 +293,7 @@ class Ui_MainWindow(object):
|
|||
can_shortcuts=True, category=UiStrings().Help,
|
||||
triggers=self.on_about_item_clicked)
|
||||
# Give Qt Extra Hint that this is an About Menu Item
|
||||
self.about_item.setMenuRole(QtWidgets.QAction.MenuRole.AboutRole)
|
||||
self.about_item.setMenuRole(QtGui.QAction.MenuRole.AboutRole)
|
||||
if is_win():
|
||||
self.local_help_file = AppLocation.get_directory(AppLocation.AppDir) / 'OpenLP.chm'
|
||||
elif is_macosx():
|
||||
|
@ -331,8 +331,8 @@ class Ui_MainWindow(object):
|
|||
# menu. If we are running on Mac OS X the menu items whose title contains those keywords but don't belong in the
|
||||
# main menu need to be marked as such with QAction.MenuRole.NoRole.
|
||||
if is_macosx():
|
||||
self.settings_shortcuts_item.setMenuRole(QtWidgets.QAction.MenuRole.NoRole)
|
||||
self.formatting_tag_item.setMenuRole(QtWidgets.QAction.MenuRole.NoRole)
|
||||
self.settings_shortcuts_item.setMenuRole(QtGui.QAction.MenuRole.NoRole)
|
||||
self.formatting_tag_item.setMenuRole(QtGui.QAction.MenuRole.NoRole)
|
||||
add_actions(self.settings_menu, (self.settings_plugin_list_item, self.settings_language_menu.menuAction(),
|
||||
None, self.formatting_tag_item, self.settings_shortcuts_item, self.settings_configure_item))
|
||||
add_actions(self.tools_menu, (self.tools_add_tool_item, None))
|
||||
|
|
|
@ -32,7 +32,7 @@ except ImportError:
|
|||
pymediainfo_available = False
|
||||
pymediainfo_version = '0.0'
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`~openlp.core.ui.media.mediatab` module holds the configuration tab for
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.settingstab import SettingsTab
|
||||
|
|
|
@ -29,7 +29,7 @@ import threading
|
|||
from datetime import datetime
|
||||
from time import sleep
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import LogMixin
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets of the plugin view dialog
|
||||
#"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -23,7 +23,7 @@ The actual plugin view form
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.state import State
|
||||
from openlp.core.common.i18n import translate
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets of the print service dialog.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtPrintSupport, QtWidgets
|
||||
from PyQt6 import QtCore, QtPrintSupport, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
|
|
@ -25,7 +25,7 @@ import datetime
|
|||
import html
|
||||
|
||||
import lxml.html
|
||||
from PyQt5 import QtCore, QtGui, QtPrintSupport, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtPrintSupport, QtWidgets
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
@ -374,7 +374,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
|||
"""
|
||||
Called when html copy check box is selected.
|
||||
"""
|
||||
if value == QtCore.Qt.Checked:
|
||||
if value == QtCore.Qt.CheckState.Checked:
|
||||
self.copyTextButton.setText(UiStrings().CopyToHtml)
|
||||
else:
|
||||
self.copyTextButton.setText(UiStrings().CopyToText)
|
||||
|
@ -384,7 +384,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
|||
Disable or enable the ``page_break_after_text`` checkbox as it should only
|
||||
be enabled, when the ``slide_text_check_box`` is enabled.
|
||||
"""
|
||||
self.page_break_after_text.setDisabled(state == QtCore.Qt.Unchecked)
|
||||
self.page_break_after_text.setDisabled(state == QtCore.Qt.CheckState.Unchecked)
|
||||
|
||||
def save_options(self):
|
||||
"""
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The screen settings tab in the configuration dialog
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.display.screens import ScreenList
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets for the service item edit dialog
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The service item edit dialog
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -30,7 +30,7 @@ from contextlib import suppress
|
|||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import ThemeLevel, delete_file, sha256_file_hash
|
||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||
|
@ -89,19 +89,19 @@ class ServiceManagerList(QtWidgets.QTreeWidget):
|
|||
"""
|
||||
if isinstance(event, QtGui.QKeyEvent):
|
||||
# here accept the event and do something
|
||||
if event.key() == QtCore.Qt.Key_Up:
|
||||
if event.key() == QtCore.Qt.Key.Key_Up:
|
||||
self.service_manager.on_move_selection_up()
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_Down:
|
||||
elif event.key() == QtCore.Qt.Key.Key_Down:
|
||||
self.service_manager.on_move_selection_down()
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_Right:
|
||||
elif event.key() == QtCore.Qt.Key.Key_Right:
|
||||
self.service_manager.on_expand_selection()
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_Left:
|
||||
elif event.key() == QtCore.Qt.Key.Key_Left:
|
||||
self.service_manager.on_collapse_selection()
|
||||
event.accept()
|
||||
elif event.key() == QtCore.Qt.Key_Delete:
|
||||
elif event.key() == QtCore.Qt.Key.Key_Delete:
|
||||
self.service_manager.on_delete_from_service()
|
||||
event.accept()
|
||||
event.ignore()
|
||||
|
@ -270,7 +270,7 @@ class Ui_ServiceManager(object):
|
|||
# Add AutoPlay menu actions
|
||||
self.auto_play_slides_menu = QtWidgets.QMenu(translate('OpenLP.ServiceManager', '&Auto play slides'))
|
||||
self.menu.addMenu(self.auto_play_slides_menu)
|
||||
auto_play_slides_group = QtWidgets.QActionGroup(self.auto_play_slides_menu)
|
||||
auto_play_slides_group = QtGui.QActionGroup(self.auto_play_slides_menu)
|
||||
auto_play_slides_group.setExclusive(True)
|
||||
self.auto_play_slides_loop = create_widget_action(self.auto_play_slides_menu,
|
||||
text=translate('OpenLP.ServiceManager', 'Auto play slides '
|
||||
|
@ -981,7 +981,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
|||
if service_item['service_item'].theme is None:
|
||||
theme_action = self.theme_menu.defaultAction()
|
||||
else:
|
||||
theme_action = self.theme_menu.findChild(QtWidgets.QAction, service_item['service_item'].theme)
|
||||
theme_action = self.theme_menu.findChild(QtGui.QAction, service_item['service_item'].theme)
|
||||
if theme_action is not None:
|
||||
theme_action.setChecked(True)
|
||||
self.menu.exec(self.service_manager_list.mapToGlobal(point))
|
||||
|
@ -1824,7 +1824,7 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
|||
self.theme_combo_box.clear()
|
||||
self.theme_menu.clear()
|
||||
self.theme_combo_box.addItem('')
|
||||
theme_group = QtWidgets.QActionGroup(self.theme_menu)
|
||||
theme_group = QtGui.QActionGroup(self.theme_menu)
|
||||
theme_group.setExclusive(True)
|
||||
theme_group.setObjectName('theme_group')
|
||||
# Create a "Default" theme, which allows the user to reset the item's theme to the service theme or global
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.ui.servicenoteform` module contains the `ServiceNoteForm` class.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -24,7 +24,7 @@ The services tab of the configuration dialog.
|
|||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import SlideLimits
|
||||
from openlp.core.common.i18n import UiStrings, format_time, translate
|
||||
|
@ -79,7 +79,8 @@ class ServiceTab(SettingsTab):
|
|||
self.service_name_label.setObjectName('service_name_label')
|
||||
self.service_name_edit = QtWidgets.QLineEdit(self.service_name_group_box)
|
||||
self.service_name_edit.setObjectName('service_name_edit')
|
||||
self.service_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":+]+'), self))
|
||||
self.service_name_edit.setValidator(
|
||||
QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(r'[^/\\?*|<>\[\]":+]+'), self))
|
||||
self.service_name_revert_button = QtWidgets.QToolButton(self.service_name_group_box)
|
||||
self.service_name_revert_button.setObjectName('service_name_revert_button')
|
||||
self.service_name_revert_button.setIcon(UiIcons().undo)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets of the settings dialog.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`settingsform` provides a user interface for the OpenLP settings
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
|
||||
from openlp.core.state import State
|
||||
from openlp.core.api.tab import ApiTab
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The list of shortcuts within a dialog.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
@ -44,7 +44,7 @@ class CaptureShortcutButton(QtWidgets.QPushButton):
|
|||
Block the ``Key_Space`` key, so that the button will not change the
|
||||
checked state.
|
||||
"""
|
||||
if event.key() == QtCore.Qt.Key_Space and self.isChecked():
|
||||
if event.key() == QtCore.Qt.Key.Key_Space and self.isChecked():
|
||||
# Ignore the event, so that the parent can take care of this.
|
||||
event.ignore()
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ The :mod:`~openlp.core.ui.shortcutlistform` module contains the form class
|
|||
import logging
|
||||
import re
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import translate
|
||||
|
@ -66,11 +66,11 @@ class ShortcutListForm(QtWidgets.QDialog, Ui_ShortcutListDialog, RegistryPropert
|
|||
"""
|
||||
Respond to certain key presses
|
||||
"""
|
||||
if event.key() == QtCore.Qt.Key_Space:
|
||||
if event.key() == QtCore.Qt.Key.Key_Space:
|
||||
self.keyReleaseEvent(event)
|
||||
elif self.primary_push_button.isChecked() or self.alternate_push_button.isChecked():
|
||||
self.keyReleaseEvent(event)
|
||||
elif event.key() == QtCore.Qt.Key_Escape:
|
||||
elif event.key() == QtCore.Qt.Key.Key_Escape:
|
||||
event.accept()
|
||||
self.close()
|
||||
|
||||
|
@ -81,11 +81,12 @@ class ShortcutListForm(QtWidgets.QDialog, Ui_ShortcutListDialog, RegistryPropert
|
|||
if not self.primary_push_button.isChecked() and not self.alternate_push_button.isChecked():
|
||||
return
|
||||
# Do not continue, as the event is for the dialog (close it).
|
||||
if self.dialog_was_shown and event.key() in (QtCore.Qt.Key_Escape, QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return):
|
||||
if self.dialog_was_shown and event.key() in (QtCore.Qt.Key.Key_Escape, QtCore.Qt.Key.Key_Enter,
|
||||
QtCore.Qt.Key.Key_Return):
|
||||
self.dialog_was_shown = False
|
||||
return
|
||||
key = event.key()
|
||||
if key in (QtCore.Qt.Key_Shift, QtCore.Qt.Key_Control, QtCore.Qt.Key_Meta, QtCore.Qt.Key_Alt):
|
||||
if key in (QtCore.Qt.Key.Key_Shift, QtCore.Qt.Key.Key_Control, QtCore.Qt.Key.Key_Meta, QtCore.Qt.Key.Key_Alt):
|
||||
return
|
||||
key_string = QtGui.QKeySequence(key).toString()
|
||||
if event.modifiers() & QtCore.Qt.ControlModifier == QtCore.Qt.ControlModifier:
|
||||
|
|
|
@ -27,7 +27,7 @@ from collections import deque
|
|||
from pathlib import Path
|
||||
from threading import Lock
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import SlideLimits
|
||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
The splash screen
|
||||
"""
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class SplashScreen(QtWidgets.QSplashScreen):
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The UI widgets for the time dialog
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The actual start time form.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`~openlp.core.ui.dark` module looks for and loads a dark theme
|
|||
"""
|
||||
from subprocess import Popen, PIPE
|
||||
from enum import Enum
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.platform import is_macosx, is_win
|
||||
from openlp.core.common.registry import Registry
|
||||
|
@ -238,7 +238,7 @@ def get_application_stylesheet():
|
|||
"""
|
||||
stylesheet = ''
|
||||
if is_ui_theme(UiThemes.QDarkStyle):
|
||||
stylesheet = qdarkstyle.load_stylesheet_pyqt5()
|
||||
stylesheet = qdarkstyle.load_stylesheet_PyQt6()
|
||||
else:
|
||||
if not Registry().get('settings').value('advanced/alternate rows'):
|
||||
base_color = QtWidgets.QApplication.palette().color(QtGui.QPalette.ColorGroup.Active,
|
||||
|
|
|
@ -23,7 +23,7 @@ The Theme wizard
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import is_not_image_file
|
||||
from openlp.core.common.enum import ServiceItemType
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The layout of the theme
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The form layout
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from .themelayoutdialog import Ui_ThemeLayoutDialog
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import zipfile
|
|||
from pathlib import Path
|
||||
from xml.etree.ElementTree import XML, ElementTree
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.state import State
|
||||
from openlp.core.common import delete_file
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# You should have received a copy of the GNU General Public License #
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.display.render import ThemePreviewRenderer
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The theme regeneration progress dialog
|
||||
"""
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.mixins import RegistryProperties, LogMixin
|
||||
from openlp.core.common.utils import wait_for
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The Themes configuration tab
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import ThemeLevel
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The Create/Edit theme wizard
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.platform import is_macosx
|
||||
|
@ -90,7 +90,8 @@ class Ui_ThemeWizard(object):
|
|||
self.theme_name_label = QtWidgets.QLabel(self.preview_page)
|
||||
self.theme_name_label.setObjectName('theme_name_label')
|
||||
self.theme_name_edit = QtWidgets.QLineEdit(self.preview_page)
|
||||
self.theme_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
||||
self.theme_name_edit.setValidator(
|
||||
QtGui.QRegularExpressionValidator(QtCore.QRegularExpression(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
||||
self.theme_name_edit.setObjectName('ThemeNameEdit')
|
||||
self.theme_name_layout.addRow(self.theme_name_label, self.theme_name_edit)
|
||||
self.preview_layout.addLayout(self.theme_name_layout)
|
||||
|
|
|
@ -27,7 +27,7 @@ import sys
|
|||
from collections import OrderedDict
|
||||
from datetime import date
|
||||
|
||||
from PyQt5 import QtCore
|
||||
from PyQt6 import QtCore
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.httputils import get_web_page
|
||||
|
@ -42,7 +42,7 @@ CONNECTION_TIMEOUT = 30
|
|||
CONNECTION_RETRIES = 2
|
||||
LIBRARIES = OrderedDict([
|
||||
('Python', ('platform', 'python_version')),
|
||||
('PyQt5', ('PyQt5.Qt', 'PYQT_VERSION_STR')),
|
||||
('PyQt6', ('PyQt6.Qt', 'PYQT_VERSION_STR')),
|
||||
('SQLAlchemy', ('sqlalchemy',)),
|
||||
('Alembic', ('alembic',)),
|
||||
('BeautifulSoup', ('bs4',)),
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"""
|
||||
Provide a custom widget based on QPushButton for the selection of colors
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
""" Patch the QFileDialog so it accepts and returns Path objects"""
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.path import path_to_str, replace_params, str_to_path
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:`~openlp.core.widgets.docks` module contains a customised base dock wid
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import build_icon
|
||||
|
|
|
@ -25,7 +25,7 @@ import logging
|
|||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import CONTROL_CHARS
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
|
@ -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
|
||||
the clear button.
|
||||
|
||||
:param text: A :class:`~PyQt5.QtCore.QString` instance which represents the text in the line edit.
|
||||
:param text: A :class:`~PyQt6.QtCore.QString` instance which represents the text in the line edit.
|
||||
"""
|
||||
self.clear_button.setVisible(bool(text))
|
||||
|
||||
|
@ -516,7 +516,7 @@ class Highlighter(QtGui.QSyntaxHighlighter):
|
|||
self.setFormat(word_object.start(), word_object.end() - word_object.start(), char_format)
|
||||
|
||||
|
||||
class SpellAction(QtWidgets.QAction):
|
||||
class SpellAction(QtGui.QAction):
|
||||
"""
|
||||
A special QAction that returns the text in a signal.
|
||||
"""
|
||||
|
@ -558,7 +558,7 @@ class HistoryComboBox(QtWidgets.QComboBox):
|
|||
:param event: The keyboard event
|
||||
"""
|
||||
# Handle Enter and Return ourselves
|
||||
if event.key() == QtCore.Qt.Key_Enter or event.key() == QtCore.Qt.Key_Return:
|
||||
if event.key() == QtCore.Qt.Key.Key_Enter or event.key() == QtCore.Qt.Key.Key_Return:
|
||||
# Emit the returnPressed signal
|
||||
self.returnPressed.emit()
|
||||
# Save the current text to the dropdown list
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.widgets.labels` module contains specialised labels
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
|
||||
class FormLabel(QtWidgets.QLabel):
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.widgets.layouts` module contains customised layout classes
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
|
||||
class AspectRatioLayout(QtWidgets.QLayout):
|
||||
|
|
|
@ -24,7 +24,7 @@ Provide common toolbar handling for OpenLP
|
|||
import datetime
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
from openlp.core.common.i18n import translate
|
||||
|
||||
from openlp.core.lib.ui import create_widget_action
|
||||
|
|
|
@ -24,7 +24,7 @@ It is based on a QTableWidget but represents its contents in list form.
|
|||
"""
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"""
|
||||
The :mod:`~openlp.core.widgets.widgets` module contains custom widgets used in OpenLP
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
from PyQt6 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
|
@ -23,7 +23,7 @@ The :mod:``wizard`` module provides generic wizard tools for OpenLP.
|
|||
"""
|
||||
import logging
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||
##########################################################################
|
||||
|
||||
from PyQt5 import QtCore, QtWidgets, QtGui
|
||||
from PyQt6 import QtCore, QtWidgets, QtGui
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.registry import Registry
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue