new tree
@ -16,7 +16,6 @@ OpenLP.egg-info
|
||||
build
|
||||
resources/innosetup/Output
|
||||
.pylint.d
|
||||
*.qm
|
||||
openlp/core/resources.py.old
|
||||
*.qm
|
||||
resources/windows/warnOpenLP.txt
|
||||
@ -46,3 +45,4 @@ output
|
||||
htmlcov
|
||||
openlp-test-projectordb.sqlite
|
||||
.cache
|
||||
.pytest_cache
|
||||
|
@ -22,13 +22,14 @@
|
||||
"""
|
||||
The :mod:`~openlp.core.api.tab` module contains the settings tab for the API
|
||||
"""
|
||||
from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import get_local_ip4
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
ZERO_URL = '0.0.0.0'
|
||||
|
||||
@ -38,11 +39,9 @@ class ApiTab(SettingsTab):
|
||||
RemoteTab is the Remotes settings tab in the settings dialog.
|
||||
"""
|
||||
def __init__(self, parent):
|
||||
self.icon_path = ':/plugins/plugin_remote.png'
|
||||
self.icon_path = UiIcons().remote
|
||||
advanced_translated = translate('OpenLP.AdvancedTab', 'Advanced')
|
||||
super(ApiTab, self).__init__(parent, 'api', advanced_translated)
|
||||
self.define_main_window_icon()
|
||||
self.generate_icon()
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName('ApiTab')
|
||||
@ -155,24 +154,6 @@ class ApiTab(SettingsTab):
|
||||
self.thumbnails_check_box.stateChanged.connect(self.on_thumbnails_check_box_changed)
|
||||
self.address_edit.textChanged.connect(self.set_urls)
|
||||
|
||||
def define_main_window_icon(self):
|
||||
"""
|
||||
Define an icon on the main window to show the state of the server
|
||||
:return:
|
||||
"""
|
||||
self.remote_server_icon = QtWidgets.QLabel(self.main_window.status_bar)
|
||||
size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
size_policy.setHorizontalStretch(0)
|
||||
size_policy.setVerticalStretch(0)
|
||||
size_policy.setHeightForWidth(self.remote_server_icon.sizePolicy().hasHeightForWidth())
|
||||
self.remote_server_icon.setSizePolicy(size_policy)
|
||||
self.remote_server_icon.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.remote_server_icon.setLineWidth(1)
|
||||
self.remote_server_icon.setScaledContents(True)
|
||||
self.remote_server_icon.setFixedSize(20, 20)
|
||||
self.remote_server_icon.setObjectName('remote_server_icon')
|
||||
self.main_window.status_bar.insertPermanentWidget(2, self.remote_server_icon)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.tab_title_visible = translate('RemotePlugin.RemoteTab', 'Remote Interface')
|
||||
self.server_settings_group_box.setTitle(translate('RemotePlugin.RemoteTab', 'Server Settings'))
|
||||
@ -259,7 +240,6 @@ class ApiTab(SettingsTab):
|
||||
Settings().setValue(self.settings_section + '/authentication enabled', self.user_login_group_box.isChecked())
|
||||
Settings().setValue(self.settings_section + '/user id', self.user_id.text())
|
||||
Settings().setValue(self.settings_section + '/password', self.password.text())
|
||||
self.generate_icon()
|
||||
if self.update_site_group_box.isChecked():
|
||||
self.settings_form.register_post_process('download_website')
|
||||
|
||||
@ -280,19 +260,3 @@ class ApiTab(SettingsTab):
|
||||
# we have a set value convert to True/False
|
||||
if check_state == QtCore.Qt.Checked:
|
||||
self.thumbnails = True
|
||||
|
||||
def generate_icon(self):
|
||||
"""
|
||||
Generate icon for main window
|
||||
"""
|
||||
self.remote_server_icon.hide()
|
||||
icon = QtGui.QImage(':/remote/network_server.png')
|
||||
icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
if Settings().value(self.settings_section + '/authentication enabled'):
|
||||
overlay = QtGui.QImage(':/remote/network_auth.png')
|
||||
overlay = overlay.scaled(60, 60, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
painter = QtGui.QPainter(icon)
|
||||
painter.drawImage(20, 0, overlay)
|
||||
painter.end()
|
||||
self.remote_server_icon.setPixmap(QtGui.QPixmap.fromImage(icon))
|
||||
self.remote_server_icon.show()
|
||||
|
@ -404,6 +404,7 @@ def main(args=None):
|
||||
if not Settings().value('core/has run wizard'):
|
||||
if not FirstTimeLanguageForm().exec():
|
||||
# if cancel then stop processing
|
||||
server.close_server()
|
||||
sys.exit()
|
||||
# i18n Set Language
|
||||
language = LanguageManager.get_language()
|
||||
|
@ -339,9 +339,10 @@ class UiStrings(object):
|
||||
"""
|
||||
if not cls.__instance__:
|
||||
cls.__instance__ = object.__new__(cls)
|
||||
cls.load(cls)
|
||||
return cls.__instance__
|
||||
|
||||
def __init__(self):
|
||||
def load(self):
|
||||
"""
|
||||
These strings should need a good reason to be retranslated elsewhere.
|
||||
Should some/more/less of these have an & attached?
|
||||
|
@ -58,6 +58,7 @@ class Registry(object):
|
||||
registry.working_flags = {}
|
||||
# Allow the tests to remove Registry entries but not the live system
|
||||
registry.running_under_test = 'nose' in sys.argv[0]
|
||||
registry.running_under_test = 'pytest' in sys.argv[0]
|
||||
registry.initialising = True
|
||||
return registry
|
||||
|
||||
|
@ -28,6 +28,7 @@ import re
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import path_to_str, str_to_path
|
||||
from openlp.core.common.registry import Registry
|
||||
@ -165,28 +166,25 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
||||
toolbar_actions = []
|
||||
# Import Button
|
||||
if self.has_import_icon:
|
||||
toolbar_actions.append(['Import', StringContent.Import,
|
||||
':/general/general_import.png', self.on_import_click])
|
||||
toolbar_actions.append(['Import', StringContent.Import, UiIcons().download, self.on_import_click])
|
||||
# Load Button
|
||||
if self.has_file_icon:
|
||||
toolbar_actions.append(['Load', StringContent.Load, ':/general/general_open.png', self.on_file_click])
|
||||
toolbar_actions.append(['Load', StringContent.Load, UiIcons().open, self.on_file_click])
|
||||
# New Button
|
||||
if self.has_new_icon:
|
||||
toolbar_actions.append(['New', StringContent.New, ':/general/general_new.png', self.on_new_click])
|
||||
toolbar_actions.append(['New', StringContent.New, UiIcons().new, self.on_new_click])
|
||||
# Edit Button
|
||||
if self.has_edit_icon:
|
||||
toolbar_actions.append(['Edit', StringContent.Edit, ':/general/general_edit.png', self.on_edit_click])
|
||||
toolbar_actions.append(['Edit', StringContent.Edit, UiIcons().edit, self.on_edit_click])
|
||||
# Delete Button
|
||||
if self.has_delete_icon:
|
||||
toolbar_actions.append(['Delete', StringContent.Delete,
|
||||
':/general/general_delete.png', self.on_delete_click])
|
||||
toolbar_actions.append(['Delete', StringContent.Delete, UiIcons().delete, self.on_delete_click])
|
||||
# Preview
|
||||
toolbar_actions.append(['Preview', StringContent.Preview,
|
||||
':/general/general_preview.png', self.on_preview_click])
|
||||
toolbar_actions.append(['Preview', StringContent.Preview, UiIcons().preview, self.on_preview_click])
|
||||
# Live Button
|
||||
toolbar_actions.append(['Live', StringContent.Live, ':/general/general_live.png', self.on_live_click])
|
||||
toolbar_actions.append(['Live', StringContent.Live, UiIcons().live, self.on_live_click])
|
||||
# Add to service Button
|
||||
toolbar_actions.append(['Service', StringContent.Service, ':/general/general_add.png', self.on_add_click])
|
||||
toolbar_actions.append(['Service', StringContent.Service, UiIcons().add, self.on_add_click])
|
||||
for action in toolbar_actions:
|
||||
if action[0] == StringContent.Preview:
|
||||
self.toolbar.addSeparator()
|
||||
@ -207,21 +205,21 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
||||
if self.has_edit_icon:
|
||||
create_widget_action(self.list_view,
|
||||
text=self.plugin.get_string(StringContent.Edit)['title'],
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_edit_click)
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(self.list_view,
|
||||
'listView{plugin}{preview}Item'.format(plugin=self.plugin.name.title(),
|
||||
preview=StringContent.Preview.title()),
|
||||
text=self.plugin.get_string(StringContent.Preview)['title'],
|
||||
icon=':/general/general_preview.png',
|
||||
icon=UiIcons().preview,
|
||||
can_shortcuts=True,
|
||||
triggers=self.on_preview_click)
|
||||
create_widget_action(self.list_view,
|
||||
'listView{plugin}{live}Item'.format(plugin=self.plugin.name.title(),
|
||||
live=StringContent.Live.title()),
|
||||
text=self.plugin.get_string(StringContent.Live)['title'],
|
||||
icon=':/general/general_live.png',
|
||||
icon=UiIcons().live,
|
||||
can_shortcuts=True,
|
||||
triggers=self.on_live_click)
|
||||
create_widget_action(self.list_view,
|
||||
@ -229,7 +227,7 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
||||
service=StringContent.Service.title()),
|
||||
can_shortcuts=True,
|
||||
text=self.plugin.get_string(StringContent.Service)['title'],
|
||||
icon=':/general/general_add.png',
|
||||
icon=UiIcons().add,
|
||||
triggers=self.on_add_click)
|
||||
if self.has_delete_icon:
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
@ -237,13 +235,13 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
||||
'listView{plugin}{delete}Item'.format(plugin=self.plugin.name.title(),
|
||||
delete=StringContent.Delete.title()),
|
||||
text=self.plugin.get_string(StringContent.Delete)['title'],
|
||||
icon=':/general/general_delete.png',
|
||||
icon=UiIcons().delete,
|
||||
can_shortcuts=True, triggers=self.on_delete_click)
|
||||
if self.add_to_service_item:
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(self.list_view,
|
||||
text=translate('OpenLP.MediaManagerItem', '&Add to selected Service Item'),
|
||||
icon=':/general/general_add.png',
|
||||
icon=UiIcons().add,
|
||||
triggers=self.on_add_edit_click)
|
||||
self.add_custom_context_actions()
|
||||
# Create the context menu and add all actions from the list_view.
|
||||
@ -621,7 +619,7 @@ class MediaManagerItem(QtWidgets.QWidget, RegistryProperties):
|
||||
:param context: The context on which this is called
|
||||
"""
|
||||
service_item = ServiceItem(self.plugin)
|
||||
service_item.add_icon(self.plugin.icon_path)
|
||||
service_item.add_icon()
|
||||
if self.generate_slide_data(service_item, item, xml_version, remote, context):
|
||||
return service_item
|
||||
else:
|
||||
|
@ -35,6 +35,7 @@ from PyQt5 import QtGui
|
||||
from openlp.core.common import md5_hash
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.common.settings import Settings
|
||||
@ -169,7 +170,7 @@ class ServiceItem(RegistryProperties):
|
||||
self.processor = None
|
||||
self.audit = ''
|
||||
self.items = []
|
||||
self.iconic_representation = None
|
||||
self.icon = UiIcons().default
|
||||
self.raw_footer = []
|
||||
self.foot_text = ''
|
||||
self.theme = None
|
||||
@ -229,14 +230,22 @@ class ServiceItem(RegistryProperties):
|
||||
"""
|
||||
return capability in self.capabilities
|
||||
|
||||
def add_icon(self, icon):
|
||||
def add_icon(self):
|
||||
"""
|
||||
Add an icon to the service item. This is used when displaying the service item in the service manager.
|
||||
|
||||
:param icon: A string to an icon in the resources or on disk.
|
||||
"""
|
||||
self.icon = icon
|
||||
self.iconic_representation = build_icon(icon)
|
||||
if self.name == 'songs':
|
||||
self.icon = UiIcons().music
|
||||
elif self.name == 'bibles':
|
||||
self.icon = UiIcons().bible
|
||||
elif self.name == 'presentations':
|
||||
self.icon = UiIcons().presentation
|
||||
elif self.name == 'images':
|
||||
self.icon = UiIcons().picture
|
||||
elif self.name == 'media':
|
||||
self.icon = UiIcons().video
|
||||
else:
|
||||
self.icon = UiIcons().clone
|
||||
|
||||
def render(self, provides_own_theme_data=False):
|
||||
"""
|
||||
@ -361,7 +370,6 @@ class ServiceItem(RegistryProperties):
|
||||
'plugin': self.name,
|
||||
'theme': self.theme,
|
||||
'title': self.title,
|
||||
'icon': self.icon,
|
||||
'footer': self.raw_footer,
|
||||
'type': self.service_item_type,
|
||||
'audit': self.audit,
|
||||
@ -413,7 +421,7 @@ class ServiceItem(RegistryProperties):
|
||||
self.name = header['name']
|
||||
self.service_item_type = header['type']
|
||||
self.theme = header['theme']
|
||||
self.add_icon(header['icon'])
|
||||
self.add_icon()
|
||||
self.raw_footer = header['footer']
|
||||
self.audit = header['audit']
|
||||
self.notes = header['notes']
|
||||
|
@ -31,6 +31,7 @@ from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -161,10 +162,10 @@ def create_button(parent, name, **kwargs):
|
||||
kwargs.setdefault('text', UiStrings().Delete)
|
||||
kwargs.setdefault('tooltip', translate('OpenLP.Ui', 'Delete the selected item.'))
|
||||
elif role == 'up':
|
||||
kwargs.setdefault('icon', ':/services/service_up.png')
|
||||
kwargs.setdefault('icon', UiIcons().arrow_up)
|
||||
kwargs.setdefault('tooltip', translate('OpenLP.Ui', 'Move selection up one position.'))
|
||||
elif role == 'down':
|
||||
kwargs.setdefault('icon', ':/services/service_down.png')
|
||||
kwargs.setdefault('icon', UiIcons().arrow_down)
|
||||
kwargs.setdefault('tooltip', translate('OpenLP.Ui', 'Move selection down one position.'))
|
||||
else:
|
||||
log.warning('The role "{role}" is not defined in create_push_button().'.format(role=role))
|
||||
|
@ -29,7 +29,7 @@ from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import verify_ip_address
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.projectors.constants import PJLINK_PORT
|
||||
from openlp.core.projectors.db import Projector
|
||||
|
||||
@ -47,7 +47,7 @@ class Ui_ProjectorEditForm(object):
|
||||
Create the interface layout.
|
||||
"""
|
||||
edit_projector_dialog.setObjectName('edit_projector_dialog')
|
||||
edit_projector_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
edit_projector_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
edit_projector_dialog.setMinimumWidth(400)
|
||||
edit_projector_dialog.setModal(True)
|
||||
# Define the basic layout
|
||||
|
@ -30,6 +30,7 @@ import logging
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.registry import RegistryBase
|
||||
from openlp.core.common.settings import Settings
|
||||
@ -49,25 +50,6 @@ log = logging.getLogger(__name__)
|
||||
log.debug('projectormanager loaded')
|
||||
|
||||
|
||||
# Dict for matching projector status to display icon
|
||||
STATUS_ICONS = {
|
||||
S_NOT_CONNECTED: ':/projector/projector_item_disconnect.png',
|
||||
S_CONNECTING: ':/projector/projector_item_connect.png',
|
||||
S_CONNECTED: ':/projector/projector_off.png',
|
||||
S_OFF: ':/projector/projector_off.png',
|
||||
S_INITIALIZE: ':/projector/projector_off.png',
|
||||
S_STANDBY: ':/projector/projector_off.png',
|
||||
S_WARMUP: ':/projector/projector_warmup.png',
|
||||
S_ON: ':/projector/projector_on.png',
|
||||
S_COOLDOWN: ':/projector/projector_cooldown.png',
|
||||
E_ERROR: ':/projector/projector_error.png',
|
||||
E_NETWORK: ':/projector/projector_not_connected_error.png',
|
||||
E_AUTHENTICATION: ':/projector/projector_not_connected_error.png',
|
||||
E_UNKNOWN_SOCKET_ERROR: ':/projector/projector_not_connected_error.png',
|
||||
E_NOT_CONNECTED: ':/projector/projector_not_connected_error.png'
|
||||
}
|
||||
|
||||
|
||||
class UiProjectorManager(object):
|
||||
"""
|
||||
UI part of the Projector Manager
|
||||
@ -88,30 +70,30 @@ class UiProjectorManager(object):
|
||||
self.one_toolbar = OpenLPToolbar(widget)
|
||||
self.one_toolbar.add_toolbar_action('new_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'Add Projector'),
|
||||
icon=':/projector/projector_new.png',
|
||||
icon=UiIcons().new,
|
||||
tooltip=translate('OpenLP.ProjectorManager', 'Add a new projector.'),
|
||||
triggers=self.on_add_projector)
|
||||
# Show edit/delete when projector not connected
|
||||
self.one_toolbar.add_toolbar_action('edit_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'Edit Projector'),
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
tooltip=translate('OpenLP.ProjectorManager', 'Edit selected projector.'),
|
||||
triggers=self.on_edit_projector)
|
||||
self.one_toolbar.add_toolbar_action('delete_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'Delete Projector'),
|
||||
icon=':/general/general_delete.png',
|
||||
icon=UiIcons().delete,
|
||||
tooltip=translate('OpenLP.ProjectorManager', 'Delete selected projector.'),
|
||||
triggers=self.on_delete_projector)
|
||||
# Show source/view when projector connected
|
||||
self.one_toolbar.add_toolbar_action('source_view_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'Select Input Source'),
|
||||
icon=':/projector/projector_hdmi.png',
|
||||
icon=UiIcons().projector_hdmi,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Choose input source on selected projector.'),
|
||||
triggers=self.on_select_input)
|
||||
self.one_toolbar.add_toolbar_action('view_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'View Projector'),
|
||||
icon=':/system/system_about.png',
|
||||
icon=UiIcons().info,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'View selected projector information.'),
|
||||
triggers=self.on_status_projector)
|
||||
@ -119,28 +101,28 @@ class UiProjectorManager(object):
|
||||
self.one_toolbar.add_toolbar_action('connect_projector',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Connect to selected projector.'),
|
||||
icon=':/projector/projector_connect.png',
|
||||
icon=UiIcons().projector_connect,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Connect to selected projector.'),
|
||||
triggers=self.on_connect_projector)
|
||||
self.one_toolbar.add_toolbar_action('connect_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Connect to selected projectors'),
|
||||
icon=':/projector/projector_connect_tiled.png',
|
||||
icon=UiIcons().projector_connect,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Connect to selected projectors.'),
|
||||
triggers=self.on_connect_projector)
|
||||
self.one_toolbar.add_toolbar_action('disconnect_projector',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Disconnect from selected projectors'),
|
||||
icon=':/projector/projector_disconnect.png',
|
||||
icon=UiIcons().projector_disconnect,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Disconnect from selected projector.'),
|
||||
triggers=self.on_disconnect_projector)
|
||||
self.one_toolbar.add_toolbar_action('disconnect_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Disconnect from selected projector'),
|
||||
icon=':/projector/projector_disconnect_tiled.png',
|
||||
icon=UiIcons().projector_disconnect,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Disconnect from selected projectors.'),
|
||||
triggers=self.on_disconnect_projector)
|
||||
@ -148,26 +130,26 @@ class UiProjectorManager(object):
|
||||
self.one_toolbar.add_toolbar_action('poweron_projector',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Power on selected projector'),
|
||||
icon=':/projector/projector_power_on.png',
|
||||
icon=UiIcons().projector_on,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Power on selected projector.'),
|
||||
triggers=self.on_poweron_projector)
|
||||
self.one_toolbar.add_toolbar_action('poweron_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Power on selected projector'),
|
||||
icon=':/projector/projector_power_on_tiled.png',
|
||||
icon=UiIcons().projector_on,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Power on selected projectors.'),
|
||||
triggers=self.on_poweron_projector)
|
||||
self.one_toolbar.add_toolbar_action('poweroff_projector',
|
||||
text=translate('OpenLP.ProjectorManager', 'Standby selected projector'),
|
||||
icon=':/projector/projector_power_off.png',
|
||||
icon=UiIcons().projector_off,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Put selected projector in standby.'),
|
||||
triggers=self.on_poweroff_projector)
|
||||
self.one_toolbar.add_toolbar_action('poweroff_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager', 'Standby selected projector'),
|
||||
icon=':/projector/projector_power_off_tiled.png',
|
||||
icon=UiIcons().projector_off,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Put selected projectors in standby.'),
|
||||
triggers=self.on_poweroff_projector)
|
||||
@ -175,28 +157,28 @@ class UiProjectorManager(object):
|
||||
self.one_toolbar.add_toolbar_action('blank_projector',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Blank selected projector screen'),
|
||||
icon=':/projector/projector_blank.png',
|
||||
icon=UiIcons().blank,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Blank selected projector screen'),
|
||||
triggers=self.on_blank_projector)
|
||||
self.one_toolbar.add_toolbar_action('blank_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Blank selected projectors screen'),
|
||||
icon=':/projector/projector_blank_tiled.png',
|
||||
icon=UiIcons().blank,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Blank selected projectors screen.'),
|
||||
triggers=self.on_blank_projector)
|
||||
self.one_toolbar.add_toolbar_action('show_projector',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Show selected projector screen'),
|
||||
icon=':/projector/projector_show.png',
|
||||
icon=UiIcons().desktop,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Show selected projector screen.'),
|
||||
triggers=self.on_show_projector)
|
||||
self.one_toolbar.add_toolbar_action('show_projector_multiple',
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Show selected projector screen'),
|
||||
icon=':/projector/projector_show_tiled.png',
|
||||
icon=UiIcons().desktop,
|
||||
tooltip=translate('OpenLP.ProjectorManager',
|
||||
'Show selected projectors screen.'),
|
||||
triggers=self.on_show_projector)
|
||||
@ -218,61 +200,61 @@ class UiProjectorManager(object):
|
||||
self.status_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&View Projector Information'),
|
||||
icon=':/system/system_about.png',
|
||||
icon=UiIcons().info,
|
||||
triggers=self.on_status_projector)
|
||||
self.edit_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&Edit Projector'),
|
||||
icon=':/projector/projector_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_edit_projector)
|
||||
self.menu.addSeparator()
|
||||
self.connect_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&Connect Projector'),
|
||||
icon=':/projector/projector_connect.png',
|
||||
icon=UiIcons().projector_connect,
|
||||
triggers=self.on_connect_projector)
|
||||
self.disconnect_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'D&isconnect Projector'),
|
||||
icon=':/projector/projector_disconnect.png',
|
||||
icon=UiIcons().projector_off,
|
||||
triggers=self.on_disconnect_projector)
|
||||
self.menu.addSeparator()
|
||||
self.poweron_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Power &On Projector'),
|
||||
icon=':/projector/projector_power_on.png',
|
||||
icon=UiIcons().projector_on,
|
||||
triggers=self.on_poweron_projector)
|
||||
self.poweroff_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Power O&ff Projector'),
|
||||
icon=':/projector/projector_power_off.png',
|
||||
icon=UiIcons().projector_off,
|
||||
triggers=self.on_poweroff_projector)
|
||||
self.menu.addSeparator()
|
||||
self.select_input_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Select &Input'),
|
||||
icon=':/projector/projector_hdmi.png',
|
||||
icon=UiIcons().projector_hdmi,
|
||||
triggers=self.on_select_input)
|
||||
self.edit_input_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'Edit Input Source'),
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_edit_input)
|
||||
self.blank_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&Blank Projector Screen'),
|
||||
icon=':/projector/projector_blank.png',
|
||||
icon=UiIcons().blank,
|
||||
triggers=self.on_blank_projector)
|
||||
self.show_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&Show Projector Screen'),
|
||||
icon=':/projector/projector_show.png',
|
||||
icon=UiIcons().projector,
|
||||
triggers=self.on_show_projector)
|
||||
self.menu.addSeparator()
|
||||
self.delete_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ProjectorManager',
|
||||
'&Delete Projector'),
|
||||
icon=':/general/general_delete.png',
|
||||
icon=UiIcons().delete,
|
||||
triggers=self.on_delete_projector)
|
||||
self.update_icons()
|
||||
|
||||
@ -297,6 +279,23 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
||||
# Dictionary of PJLinkUDP objects to listen for UDP broadcasts from PJLink 2+ projectors.
|
||||
# Key is port number that projectors use
|
||||
self.pjlink_udp = {}
|
||||
# Dict for matching projector status to display icon
|
||||
self.status_icons = {
|
||||
S_NOT_CONNECTED: UiIcons().projector_disconnect,
|
||||
S_CONNECTING: UiIcons().projector_connect,
|
||||
S_CONNECTED: UiIcons().projector_off,
|
||||
S_OFF: UiIcons().projector_off,
|
||||
S_INITIALIZE: UiIcons().projector_on,
|
||||
S_STANDBY: UiIcons().projector_off,
|
||||
S_WARMUP: UiIcons().projector_warmup,
|
||||
S_ON: UiIcons().projector_off,
|
||||
S_COOLDOWN: UiIcons().projector_cooldown,
|
||||
E_ERROR: UiIcons().projector_error,
|
||||
E_NETWORK: UiIcons().error,
|
||||
E_AUTHENTICATION: UiIcons().authentication,
|
||||
E_UNKNOWN_SOCKET_ERROR: UiIcons().error,
|
||||
E_NOT_CONNECTED: UiIcons().projector_disconnect
|
||||
}
|
||||
|
||||
def bootstrap_initialise(self):
|
||||
"""
|
||||
@ -724,7 +723,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
||||
"""
|
||||
item = ProjectorItem(link=self._add_projector(projector))
|
||||
item.db_item = projector
|
||||
item.icon = QtGui.QIcon(QtGui.QPixmap(STATUS_ICONS[S_NOT_CONNECTED]))
|
||||
item.icon = QtGui.QIcon(self.status_icons[S_NOT_CONNECTED])
|
||||
widget = QtWidgets.QListWidgetItem(item.icon,
|
||||
item.link.name,
|
||||
self.projector_list_widget
|
||||
@ -820,7 +819,7 @@ class ProjectorManager(QtWidgets.QWidget, RegistryBase, UiProjectorManager, LogM
|
||||
return
|
||||
|
||||
item.status = status
|
||||
item.icon = QtGui.QIcon(QtGui.QPixmap(STATUS_ICONS[status]))
|
||||
item.icon = self.status_icons[status]
|
||||
log.debug('({name}) Updating icon with {code}'.format(name=item.link.name, code=STATUS_CODE[status]))
|
||||
item.widget.setIcon(item.icon)
|
||||
return self.update_icons()
|
||||
|
@ -29,6 +29,7 @@ from PyQt5 import QtWidgets
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.projectors import DialogSourceStyle
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -45,7 +46,7 @@ class ProjectorTab(SettingsTab):
|
||||
|
||||
:param parent: Parent widget
|
||||
"""
|
||||
self.icon_path = ':/projector/projector_manager.png'
|
||||
self.icon_path = UiIcons().projector
|
||||
projector_translated = translate('OpenLP.ProjectorTab', 'Projector')
|
||||
super(ProjectorTab, self).__init__(parent, 'Projector', projector_translated)
|
||||
|
||||
|
@ -53,6 +53,7 @@ class Server(QtCore.QObject, LogMixin):
|
||||
if 'OpenLP' in args:
|
||||
args.remove('OpenLP')
|
||||
# Yes, there is.
|
||||
if len(args):
|
||||
self.out_stream = QtCore.QTextStream(self.out_socket)
|
||||
self.out_stream.setCodec('UTF-8')
|
||||
self.out_socket.write(str.encode("".join(args)))
|
||||
|
@ -125,4 +125,4 @@ __all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideCon
|
||||
'ServiceNoteForm', 'ThemeLayoutForm', 'FileRenameForm', 'StartTimeForm', 'MainDisplay',
|
||||
'SlideController', 'DisplayController', 'GeneralTab', 'ThemesTab', 'AdvancedTab', 'PluginForm',
|
||||
'FormattingTagForm', 'ShortcutListForm', 'FormattingTagController', 'SingleColumnTableWidget',
|
||||
'ProjectorManager', 'ProjectorTab', 'ProjectorEditForm']
|
||||
'ProjectorManager', 'ProjectorTab', 'ProjectorEditForm', 'LiveController', 'PreviewController']
|
||||
|
@ -24,8 +24,8 @@ import datetime
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class UiAboutDialog(object):
|
||||
@ -40,7 +40,7 @@ class UiAboutDialog(object):
|
||||
:param about_dialog: The QDialog object to set up.
|
||||
"""
|
||||
about_dialog.setObjectName('about_dialog')
|
||||
about_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
about_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
self.about_dialog_layout = QtWidgets.QVBoxLayout(about_dialog)
|
||||
self.about_dialog_layout.setContentsMargins(8, 8, 8, 8)
|
||||
self.about_dialog_layout.setObjectName('about_dialog_layout')
|
||||
@ -78,7 +78,7 @@ class UiAboutDialog(object):
|
||||
self.license_tab_layout.addWidget(self.license_text_edit)
|
||||
self.about_notebook.addTab(self.license_tab, '')
|
||||
self.about_dialog_layout.addWidget(self.about_notebook)
|
||||
self.volunteer_button = create_button(None, 'volunteer_button', icon=':/system/system_volunteer.png')
|
||||
self.volunteer_button = create_button(None, 'volunteer_button', icon=UiIcons().volunteer)
|
||||
self.button_box = create_button_box(about_dialog, 'button_box', ['close'], [self.volunteer_button])
|
||||
self.about_dialog_layout.addWidget(self.button_box)
|
||||
self.retranslate_ui(about_dialog)
|
||||
|
@ -33,6 +33,7 @@ from openlp.core.common.i18n import UiStrings, format_time, translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import SettingsTab, build_icon
|
||||
from openlp.core.ui.style import HAS_DARK_STYLE
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import PathEdit
|
||||
from openlp.core.widgets.enums import PathEditType
|
||||
|
||||
@ -49,7 +50,7 @@ class AdvancedTab(SettingsTab):
|
||||
Initialise the settings tab
|
||||
"""
|
||||
self.data_exists = False
|
||||
self.icon_path = ':/system/system_settings.png'
|
||||
self.icon_path = UiIcons().settings
|
||||
self.autoscroll_map = [None, {'dist': -1, 'pos': 0}, {'dist': -1, 'pos': 1}, {'dist': -1, 'pos': 2},
|
||||
{'dist': 0, 'pos': 0}, {'dist': 0, 'pos': 1}, {'dist': 0, 'pos': 2},
|
||||
{'dist': 0, 'pos': 3}, {'dist': 1, 'pos': 0}, {'dist': 1, 'pos': 1},
|
||||
@ -131,7 +132,7 @@ class AdvancedTab(SettingsTab):
|
||||
self.new_data_directory_has_files_label.setWordWrap(True)
|
||||
self.data_directory_cancel_button = QtWidgets.QToolButton(self.data_directory_group_box)
|
||||
self.data_directory_cancel_button.setObjectName('data_directory_cancel_button')
|
||||
self.data_directory_cancel_button.setIcon(build_icon(':/general/general_delete.png'))
|
||||
self.data_directory_cancel_button.setIcon(UiIcons().delete)
|
||||
self.data_directory_copy_check_layout = QtWidgets.QHBoxLayout()
|
||||
self.data_directory_copy_check_layout.setObjectName('data_directory_copy_check_layout')
|
||||
self.data_directory_copy_check_box = QtWidgets.QCheckBox(self.data_directory_group_box)
|
||||
@ -211,7 +212,7 @@ class AdvancedTab(SettingsTab):
|
||||
self.service_name_edit.setValidator(QtGui.QRegExpValidator(QtCore.QRegExp(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(build_icon(':/general/general_revert.png'))
|
||||
self.service_name_revert_button.setIcon(UiIcons().undo)
|
||||
self.service_name_button_layout = QtWidgets.QHBoxLayout()
|
||||
self.service_name_button_layout.setObjectName('service_name_button_layout')
|
||||
self.service_name_button_layout.addWidget(self.service_name_edit)
|
||||
|
@ -26,7 +26,7 @@ The GUI widgets of the exception dialog.
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class Ui_ExceptionDialog(object):
|
||||
Set up the UI.
|
||||
"""
|
||||
exception_dialog.setObjectName('exception_dialog')
|
||||
exception_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
exception_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
self.exception_layout = QtWidgets.QVBoxLayout(exception_dialog)
|
||||
self.exception_layout.setObjectName('exception_layout')
|
||||
self.message_layout = QtWidgets.QHBoxLayout()
|
||||
@ -48,7 +48,7 @@ class Ui_ExceptionDialog(object):
|
||||
self.message_layout.setContentsMargins(0, 0, 50, 0)
|
||||
self.message_layout.addSpacing(12)
|
||||
self.bug_label = QtWidgets.QLabel(exception_dialog)
|
||||
self.bug_label.setPixmap(QtGui.QPixmap(':/graphics/exception.png'))
|
||||
self.bug_label.setPixmap(UiIcons().exception.pixmap(40, 40))
|
||||
self.bug_label.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
self.bug_label.setObjectName('bug_label')
|
||||
self.message_layout.addWidget(self.bug_label)
|
||||
@ -72,13 +72,13 @@ class Ui_ExceptionDialog(object):
|
||||
self.exception_text_edit.setObjectName('exception_text_edit')
|
||||
self.exception_layout.addWidget(self.exception_text_edit)
|
||||
self.send_report_button = create_button(exception_dialog, 'send_report_button',
|
||||
icon=':/general/general_email.png',
|
||||
icon=UiIcons().email,
|
||||
click=self.on_send_report_button_clicked)
|
||||
self.save_report_button = create_button(exception_dialog, 'save_report_button',
|
||||
icon=':/general/general_save.png',
|
||||
icon=UiIcons().save,
|
||||
click=self.on_save_report_button_clicked)
|
||||
self.attach_tile_button = create_button(exception_dialog, 'attach_tile_button',
|
||||
icon=':/general/general_open.png',
|
||||
icon=UiIcons().open,
|
||||
click=self.on_attach_file_button_clicked)
|
||||
self.button_box = create_button_box(exception_dialog, 'button_box', ['close'],
|
||||
[self.send_report_button, self.save_report_button, self.attach_tile_button])
|
||||
@ -91,7 +91,7 @@ class Ui_ExceptionDialog(object):
|
||||
"""
|
||||
Translate the widgets on the fly.
|
||||
"""
|
||||
# Note that bugs mail is not clicable, but it adds the blue color and underlining and makes the test copyable.
|
||||
# Note that bugs mail is not clickable, but it adds the blue color and underlining and makes the test copyable.
|
||||
exception_dialog.setWindowTitle(translate('OpenLP.ExceptionDialog', 'Error Occurred'))
|
||||
# Explanation text, adds a small space before: If possible, write in English.
|
||||
self.description_explanation.setText(
|
||||
|
@ -25,8 +25,8 @@ The UI widgets for the rename dialog
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_FileRenameDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_FileRenameDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
file_rename_dialog.setObjectName('file_rename_dialog')
|
||||
file_rename_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
file_rename_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
file_rename_dialog.resize(300, 10)
|
||||
self.dialog_layout = QtWidgets.QGridLayout(file_rename_dialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -25,8 +25,8 @@ The UI widgets of the language selection dialog.
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_FirstTimeLanguageDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_FirstTimeLanguageDialog(object):
|
||||
Set up the UI.
|
||||
"""
|
||||
language_dialog.setObjectName('language_dialog')
|
||||
language_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
language_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
language_dialog.resize(300, 50)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(language_dialog)
|
||||
self.dialog_layout.setContentsMargins(8, 8, 8, 8)
|
||||
|
@ -25,10 +25,10 @@ The UI widgets for the first time wizard.
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import is_macosx, clean_button_text
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import add_welcome_page
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class FirstTimePage(object):
|
||||
@ -57,7 +57,7 @@ class UiFirstTimeWizard(object):
|
||||
:param first_time_wizard: The wizard form
|
||||
"""
|
||||
first_time_wizard.setObjectName('first_time_wizard')
|
||||
first_time_wizard.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
first_time_wizard.setWindowIcon(UiIcons().main_icon)
|
||||
first_time_wizard.resize(550, 386)
|
||||
first_time_wizard.setModal(True)
|
||||
first_time_wizard.setOptions(QtWidgets.QWizard.IndependentPages | QtWidgets.QWizard.NoBackButtonOnStartPage |
|
||||
|
BIN
openlp/core/ui/fonts/OpenLP.ttf
Normal file
11
openlp/core/ui/fonts/openlp-charmap.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"users": "0041",
|
||||
"file-text": "0042",
|
||||
"search-text": "0043",
|
||||
"search-lyrcs": "0044",
|
||||
"search-CCLI": "0045",
|
||||
"hdmi": "0046",
|
||||
"video": "0047",
|
||||
"plus_sign": "0048",
|
||||
"minus_sign": "0049"
|
||||
}
|
49283
openlp/core/ui/fonts/openlp.sfd
Normal file
@ -25,7 +25,7 @@ The UI widgets for the formatting tags window.
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ class Ui_FormattingTagDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
formatting_tag_dialog.setObjectName('formatting_tag_dialog')
|
||||
formatting_tag_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
formatting_tag_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
formatting_tag_dialog.resize(725, 548)
|
||||
self.list_data_grid_layout = QtWidgets.QVBoxLayout(formatting_tag_dialog)
|
||||
self.list_data_grid_layout.setContentsMargins(8, 8, 8, 8)
|
||||
@ -87,11 +87,11 @@ class Ui_FormattingTagDialog(object):
|
||||
self.list_data_grid_layout.addWidget(self.tag_table_widget)
|
||||
self.edit_button_layout = QtWidgets.QHBoxLayout()
|
||||
self.new_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
||||
self.new_button.setIcon(build_icon(':/general/general_new.png'))
|
||||
self.new_button.setIcon(UiIcons().new)
|
||||
self.new_button.setObjectName('new_button')
|
||||
self.edit_button_layout.addWidget(self.new_button)
|
||||
self.delete_button = QtWidgets.QPushButton(formatting_tag_dialog)
|
||||
self.delete_button.setIcon(build_icon(':/general/general_delete.png'))
|
||||
self.delete_button.setIcon(UiIcons().delete)
|
||||
self.delete_button.setObjectName('delete_button')
|
||||
self.edit_button_layout.addWidget(self.delete_button)
|
||||
self.edit_button_layout.addStretch()
|
||||
@ -100,7 +100,7 @@ class Ui_FormattingTagDialog(object):
|
||||
self.save_button = self.button_box.button(QtWidgets.QDialogButtonBox.Save)
|
||||
self.save_button.setObjectName('save_button')
|
||||
self.restore_button = self.button_box.button(QtWidgets.QDialogButtonBox.RestoreDefaults)
|
||||
self.restore_button.setIcon(build_icon(':/general/general_revert.png'))
|
||||
self.restore_button.setIcon(UiIcons().undo)
|
||||
self.restore_button.setObjectName('restore_button')
|
||||
self.list_data_grid_layout.addWidget(self.button_box)
|
||||
self.retranslateUi(formatting_tag_dialog)
|
||||
|
190
openlp/core/ui/icons.py
Normal file
@ -0,0 +1,190 @@
|
||||
# -*- coding: {'icon': utf-8 -*-
|
||||
# vim: {'icon': autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2018 OpenLP Developers #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
"""
|
||||
The :mod:`languages` module provides a list of icons.
|
||||
"""
|
||||
import qtawesome as qta
|
||||
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.lib import build_icon
|
||||
|
||||
|
||||
class UiIcons(object):
|
||||
"""
|
||||
Provide standard icons for objects to use.
|
||||
"""
|
||||
__instance__ = None
|
||||
|
||||
def __new__(cls):
|
||||
"""
|
||||
Override the default object creation method to return a single instance.
|
||||
"""
|
||||
if not cls.__instance__:
|
||||
cls.__instance__ = object.__new__(cls)
|
||||
cls.load(cls)
|
||||
return cls.__instance__
|
||||
|
||||
def load(self):
|
||||
"""
|
||||
These are the font icons used in the code.
|
||||
"""
|
||||
font_path = AppLocation.get_directory(AppLocation.AppDir) / 'core' / 'ui' / 'fonts' / 'OpenLP.ttf'
|
||||
charmap_path = AppLocation.get_directory(AppLocation.AppDir) / 'core' / 'ui' / 'fonts' / 'openlp-charmap.json'
|
||||
qta.load_font('op', font_path, charmap_path)
|
||||
palette = QtWidgets.QApplication.palette()
|
||||
qta.set_defaults(color=palette.color(QtGui.QPalette.Active,
|
||||
QtGui.QPalette.ButtonText),
|
||||
color_disabled=palette.color(QtGui.QPalette.Disabled,
|
||||
QtGui.QPalette.ButtonText))
|
||||
icon_list = {
|
||||
'active': {'icon': 'fa.child'},
|
||||
'add': {'icon': 'fa.plus-circle'},
|
||||
'alert': {'icon': 'fa.exclamation-triangle'},
|
||||
'arrow_down': {'icon': 'fa.arrow-down'},
|
||||
'arrow_left': {'icon': 'fa.arrow-left'},
|
||||
'arrow_right': {'icon': 'fa.arrow-right'},
|
||||
'arrow_up': {'icon': 'fa.arrow-up'},
|
||||
'audio': {'icon': 'fa.file-sound-o'},
|
||||
'authentication': {'icon': 'fa.exclamation-triangle', 'attr': 'red'},
|
||||
'address': {'icon': 'fa.book'},
|
||||
'back': {'icon': 'fa.step-backward'},
|
||||
'bible': {'icon': 'fa.book'},
|
||||
'blank': {'icon': 'fa.times-circle'},
|
||||
'blank_theme': {'icon': 'fa.file-image-o'},
|
||||
'book': {'icon': 'fa.book'},
|
||||
'bottom': {'icon': 'fa.angle-double-down'},
|
||||
'box': {'icon': 'fa.briefcase'},
|
||||
'clapperboard': {'icon': 'fa.chess-board'},
|
||||
'clock': {'icon': 'fa.clock-o'},
|
||||
'clone': {'icon': 'fa.clone'},
|
||||
'close': {'icon': 'fa.times-circle-o'},
|
||||
'copy': {'icon': 'fa.copy'},
|
||||
'copyright': {'icon': 'fa.copyright'},
|
||||
'database': {'icon': 'fa.database'},
|
||||
'default': {'icon': 'fa.info-circle'},
|
||||
'desktop': {'icon': 'fa.desktop'},
|
||||
'delete': {'icon': 'fa.trash'},
|
||||
'download': {'icon': 'fa.cloud-download'},
|
||||
'edit': {'icon': 'fa.edit'},
|
||||
'email': {'icon': 'fa.envelope'},
|
||||
'error': {'icon': 'fa.exclamation', 'attr': 'red'},
|
||||
'exception': {'icon': 'fa.times-circle'},
|
||||
'exit': {'icon': 'fa.sign-out'},
|
||||
'group': {'icon': 'fa.object-group'},
|
||||
'inactive': {'icon': 'fa.child', 'attr': 'lightGray'},
|
||||
'info': {'icon': 'fa.info'},
|
||||
'light_bulb': {'icon': 'fa.lightbulb-o'},
|
||||
'live': {'icon': 'fa.eye'},
|
||||
'manual': {'icon': 'fa.graduation-cap'},
|
||||
'media': {'icon': 'fa.fax'},
|
||||
'minus': {'icon': 'fa.minus'},
|
||||
'music': {'icon': 'fa.music'},
|
||||
'new': {'icon': 'fa.file'},
|
||||
'new_group': {'icon': 'fa.folder'},
|
||||
'notes': {'icon': 'fa.sticky-note'},
|
||||
'open': {'icon': 'fa.folder-open'},
|
||||
'optical': {'icon': 'fa.file-video-o'},
|
||||
'pause': {'icon': 'fa.pause'},
|
||||
'play': {'icon': 'fa.play'},
|
||||
'player': {'icon': 'fa.tablet'},
|
||||
'plugin_list': {'icon': 'fa.puzzle-piece'},
|
||||
'plus': {'icon': 'fa.plus'},
|
||||
'presentation': {'icon': 'fa.bar-chart'},
|
||||
'preview': {'icon': 'fa.laptop'},
|
||||
'projector': {'icon': 'op.video'},
|
||||
'projector_connect': {'icon': 'fa.plug'},
|
||||
'projector_cooldown': {'icon': 'fa.video-camera', 'attr': 'blue'},
|
||||
'projector_disconnect': {'icon': 'fa.plug', 'attr': 'lightGray'},
|
||||
'projector_error': {'icon': 'fa.video-camera', 'attr': 'red'},
|
||||
'projector_hdmi': {'icon': 'op.hdmi'},
|
||||
'projector_off': {'icon': 'fa.video-camera', 'attr': 'black'},
|
||||
'projector_on': {'icon': 'fa.video-camera', 'attr': 'green'},
|
||||
'projector_warmup': {'icon': 'fa.video-camera', 'attr': 'yellow'},
|
||||
'picture': {'icon': 'fa.picture-o'},
|
||||
'print': {'icon': 'fa.print'},
|
||||
'remote': {'icon': 'fa.rss'},
|
||||
'repeat': {'icon': 'fa.repeat'},
|
||||
'save': {'icon': 'fa.save'},
|
||||
'search': {'icon': 'fa.search'},
|
||||
'search_ccli': {'icon': 'op.search-CCLI'},
|
||||
'search_comb': {'icon': 'fa.columns'},
|
||||
'search_lyrcs': {'icon': 'op.search-lyrcs'},
|
||||
'search_minus': {'icon': 'fa.search-minus'},
|
||||
'search_plus': {'icon': 'fa.search-plus'},
|
||||
'search_ref': {'icon': 'fa.institution'},
|
||||
'search_text': {'icon': 'op.search-text'},
|
||||
'settings': {'icon': 'fa.cogs'},
|
||||
'shortcuts': {'icon': 'fa.wrench'},
|
||||
'song_usage': {'icon': 'fa.line-chart'},
|
||||
'song_usage_active': {'icon': 'op.plus_sign'},
|
||||
'song_usage_inactive': {'icon': 'op.minus_sign'},
|
||||
'sort': {'icon': 'fa.sort'},
|
||||
'stop': {'icon': 'fa.stop'},
|
||||
'square': {'icon': 'fa.square'},
|
||||
'text': {'icon': 'op.file-text'},
|
||||
'time': {'icon': 'fa.history'},
|
||||
'theme': {'icon': 'fa.paint-brush'},
|
||||
'top': {'icon': 'fa.angle-double-up'},
|
||||
'undo': {'icon': 'fa.undo'},
|
||||
'upload': {'icon': 'fa.cloud-upload'},
|
||||
'user': {'icon': 'fa.user'},
|
||||
'usermo': {'icon': 'op.users'},
|
||||
'users': {'icon': 'fa.users'},
|
||||
'video': {'icon': 'fa.file-video-o'},
|
||||
'volunteer': {'icon': 'fa.group'}
|
||||
}
|
||||
|
||||
self.load_icons(self, icon_list)
|
||||
|
||||
def load_icons(self, icon_list):
|
||||
"""
|
||||
Load the list of icons to be processed
|
||||
"""
|
||||
for key in icon_list:
|
||||
try:
|
||||
icon = icon_list[key]['icon']
|
||||
try:
|
||||
attr = icon_list[key]['attr']
|
||||
setattr(self, key, qta.icon(icon, color=attr))
|
||||
except KeyError:
|
||||
setattr(self, key, qta.icon(icon))
|
||||
except Exception:
|
||||
import sys
|
||||
print("Unexpected error:", sys.exc_info())
|
||||
setattr(self, key, qta.icon('fa.plus-circle', color='red'))
|
||||
except:
|
||||
setattr(self, key, qta.icon('fa.plus-circle', color='red'))
|
||||
|
||||
self.main_icon = build_icon(':/icon/openlp-logo.svg')
|
||||
|
||||
@staticmethod
|
||||
def _print_icons():
|
||||
"""
|
||||
Have ability to dump icons to see what is actually available. Can only run within an application
|
||||
:return:
|
||||
"""
|
||||
ico = qta._resource['iconic']
|
||||
fa = ico.charmap['fa']
|
||||
for ky in fa.keys():
|
||||
print(ky, fa[ky])
|
@ -43,6 +43,7 @@ from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import ServiceItem, ImageSource, build_html, expand_tags, image_to_byte
|
||||
from openlp.core.lib.theme import BackgroundType
|
||||
from openlp.core.ui import HideMode, AlertLocation, DisplayControllerType
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
if is_macosx():
|
||||
from ctypes import pythonapi, c_void_p, c_char_p, py_object
|
||||
@ -492,7 +493,7 @@ class MainDisplay(Display, LogMixin, RegistryProperties):
|
||||
path = str(AppLocation.get_section_data_path('themes') / self.service_item.theme_data.theme_name)
|
||||
service_item.add_from_command(path,
|
||||
path_to_str(self.service_item.theme_data.background_filename),
|
||||
':/media/slidecontroller_multimedia.png')
|
||||
UiIcons().media)
|
||||
self.media_controller.video(DisplayControllerType.Live, service_item, video_behind_text=True)
|
||||
self._hide_mouse()
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
"""
|
||||
This is the main window, where all the action happens.
|
||||
"""
|
||||
import logging
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from distutils import dir_util
|
||||
@ -37,13 +36,14 @@ from openlp.core.common import is_win, is_macosx, add_actions
|
||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import LanguageManager, UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.path import Path, copyfile, create_paths
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.display.renderer import Renderer
|
||||
from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import PluginManager, ImageManager, PluginStatus, build_icon
|
||||
from openlp.core.lib import PluginManager, ImageManager, PluginStatus
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.projectors.manager import ProjectorManager
|
||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \
|
||||
@ -66,7 +66,7 @@ class Ui_MainWindow(object):
|
||||
Set up the user interface
|
||||
"""
|
||||
main_window.setObjectName('MainWindow')
|
||||
main_window.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
main_window.setWindowIcon(UiIcons().main_icon)
|
||||
main_window.setDockNestingEnabled(True)
|
||||
if is_macosx():
|
||||
main_window.setDocumentMode(True)
|
||||
@ -97,11 +97,11 @@ class Ui_MainWindow(object):
|
||||
self.recent_files_menu.setObjectName('recentFilesMenu')
|
||||
self.file_import_menu = QtWidgets.QMenu(self.file_menu)
|
||||
if not is_macosx():
|
||||
self.file_import_menu.setIcon(build_icon(u':/general/general_import.png'))
|
||||
self.file_import_menu.setIcon(UiIcons().download)
|
||||
self.file_import_menu.setObjectName('file_import_menu')
|
||||
self.file_export_menu = QtWidgets.QMenu(self.file_menu)
|
||||
if not is_macosx():
|
||||
self.file_export_menu.setIcon(build_icon(u':/general/general_export.png'))
|
||||
self.file_export_menu.setIcon(UiIcons().upload)
|
||||
self.file_export_menu.setObjectName('file_export_menu')
|
||||
# View Menu
|
||||
self.view_menu = QtWidgets.QMenu(self.menu_bar)
|
||||
@ -134,7 +134,7 @@ class Ui_MainWindow(object):
|
||||
self.status_bar.addPermanentWidget(self.default_theme_label)
|
||||
# Create the MediaManager
|
||||
self.media_manager_dock = OpenLPDockWidget(main_window, 'media_manager_dock',
|
||||
':/system/system_mediamanager.png')
|
||||
UiIcons().box)
|
||||
self.media_manager_dock.setStyleSheet(get_library_stylesheet())
|
||||
# Create the media toolbox
|
||||
self.media_tool_box = QtWidgets.QToolBox(self.media_manager_dock)
|
||||
@ -143,13 +143,13 @@ class Ui_MainWindow(object):
|
||||
main_window.addDockWidget(QtCore.Qt.LeftDockWidgetArea, self.media_manager_dock)
|
||||
# Create the service manager
|
||||
self.service_manager_dock = OpenLPDockWidget(main_window, 'service_manager_dock',
|
||||
':/system/system_servicemanager.png')
|
||||
UiIcons().live)
|
||||
self.service_manager_contents = ServiceManager(self.service_manager_dock)
|
||||
self.service_manager_dock.setWidget(self.service_manager_contents)
|
||||
main_window.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.service_manager_dock)
|
||||
# Create the theme manager
|
||||
self.theme_manager_dock = OpenLPDockWidget(main_window, 'theme_manager_dock',
|
||||
':/system/system_thememanager.png')
|
||||
UiIcons().theme)
|
||||
self.theme_manager_contents = ThemeManager(self.theme_manager_dock)
|
||||
self.theme_manager_contents.setObjectName('theme_manager_contents')
|
||||
self.theme_manager_dock.setWidget(self.theme_manager_contents)
|
||||
@ -157,7 +157,7 @@ class Ui_MainWindow(object):
|
||||
# Create the projector manager
|
||||
self.projector_manager_dock = OpenLPDockWidget(parent=main_window,
|
||||
name='projector_manager_dock',
|
||||
icon=':/projector/projector_manager.png')
|
||||
icon=UiIcons().projector)
|
||||
self.projector_manager_contents = ProjectorManager(self.projector_manager_dock)
|
||||
self.projector_manager_contents.setObjectName('projector_manager_contents')
|
||||
self.projector_manager_dock.setWidget(self.projector_manager_contents)
|
||||
@ -166,13 +166,13 @@ class Ui_MainWindow(object):
|
||||
# Create the menu items
|
||||
action_list = ActionList.get_instance()
|
||||
action_list.add_category(UiStrings().File, CategoryOrder.standard_menu)
|
||||
self.file_new_item = create_action(main_window, 'fileNewItem', icon=':/general/general_new.png',
|
||||
self.file_new_item = create_action(main_window, 'fileNewItem', icon=UiIcons().new,
|
||||
can_shortcuts=True, category=UiStrings().File,
|
||||
triggers=self.service_manager_contents.on_new_service_clicked)
|
||||
self.file_open_item = create_action(main_window, 'fileOpenItem', icon=':/general/general_open.png',
|
||||
self.file_open_item = create_action(main_window, 'fileOpenItem', icon=UiIcons().open,
|
||||
can_shortcuts=True, category=UiStrings().File,
|
||||
triggers=self.service_manager_contents.on_load_service_clicked)
|
||||
self.file_save_item = create_action(main_window, 'fileSaveItem', icon=':/general/general_save.png',
|
||||
self.file_save_item = create_action(main_window, 'fileSaveItem', icon=UiIcons().save,
|
||||
can_shortcuts=True, category=UiStrings().File,
|
||||
triggers=self.service_manager_contents.decide_save_method)
|
||||
self.file_save_as_item = create_action(main_window, 'fileSaveAsItem', can_shortcuts=True,
|
||||
@ -181,7 +181,7 @@ class Ui_MainWindow(object):
|
||||
self.print_service_order_item = create_action(main_window, 'printServiceItem', can_shortcuts=True,
|
||||
category=UiStrings().File,
|
||||
triggers=lambda x: PrintServiceForm().exec())
|
||||
self.file_exit_item = create_action(main_window, 'fileExitItem', icon=':/system/system_exit.png',
|
||||
self.file_exit_item = create_action(main_window, 'fileExitItem', icon=UiIcons().exit,
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().File, triggers=main_window.close)
|
||||
# Give QT Extra Hint that this is the Exit Menu Item
|
||||
@ -200,22 +200,22 @@ class Ui_MainWindow(object):
|
||||
can_shortcuts=False)
|
||||
action_list.add_category(UiStrings().Import, CategoryOrder.standard_menu)
|
||||
self.view_projector_manager_item = create_action(main_window, 'viewProjectorManagerItem',
|
||||
icon=':/projector/projector_manager.png',
|
||||
icon=UiIcons().projector,
|
||||
checked=self.projector_manager_dock.isVisible(),
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().View,
|
||||
triggers=self.toggle_projector_manager)
|
||||
self.view_media_manager_item = create_action(main_window, 'viewMediaManagerItem',
|
||||
icon=':/system/system_mediamanager.png',
|
||||
icon=UiIcons().box,
|
||||
checked=self.media_manager_dock.isVisible(),
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().View, triggers=self.toggle_media_manager)
|
||||
self.view_theme_manager_item = create_action(main_window, 'viewThemeManagerItem', can_shortcuts=True,
|
||||
icon=':/system/system_thememanager.png',
|
||||
icon=UiIcons().theme,
|
||||
checked=self.theme_manager_dock.isVisible(),
|
||||
category=UiStrings().View, triggers=self.toggle_theme_manager)
|
||||
self.view_service_manager_item = create_action(main_window, 'viewServiceManagerItem', can_shortcuts=True,
|
||||
icon=':/system/system_servicemanager.png',
|
||||
icon=UiIcons().live,
|
||||
checked=self.service_manager_dock.isVisible(),
|
||||
category=UiStrings().View, triggers=self.toggle_service_manager)
|
||||
self.view_preview_panel = create_action(main_window, 'viewPreviewPanel', can_shortcuts=True,
|
||||
@ -239,20 +239,20 @@ class Ui_MainWindow(object):
|
||||
self.mode_default_item.setChecked(True)
|
||||
action_list.add_category(UiStrings().Tools, CategoryOrder.standard_menu)
|
||||
self.tools_add_tool_item = create_action(main_window,
|
||||
'toolsAddToolItem', icon=':/tools/tools_add.png',
|
||||
'toolsAddToolItem', icon=UiIcons().add,
|
||||
category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.tools_open_data_folder = create_action(main_window,
|
||||
'toolsOpenDataFolder', icon=':/general/general_open.png',
|
||||
'toolsOpenDataFolder', icon=UiIcons().open,
|
||||
category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.tools_first_time_wizard = create_action(main_window,
|
||||
'toolsFirstTimeWizard', icon=':/general/general_revert.png',
|
||||
'toolsFirstTimeWizard', icon=UiIcons().undo,
|
||||
category=UiStrings().Tools, can_shortcuts=True)
|
||||
self.update_theme_images = create_action(main_window,
|
||||
'updateThemeImages', category=UiStrings().Tools, can_shortcuts=True)
|
||||
action_list.add_category(UiStrings().Settings, CategoryOrder.standard_menu)
|
||||
self.settings_plugin_list_item = create_action(main_window,
|
||||
'settingsPluginListItem',
|
||||
icon=':/system/settings_plugin_list.png',
|
||||
icon=UiIcons().plugin_list,
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().Settings,
|
||||
triggers=self.on_plugin_item_clicked)
|
||||
@ -268,14 +268,14 @@ class Ui_MainWindow(object):
|
||||
language_item = create_action(main_window, key, checked=qm_list[key] == saved_language)
|
||||
add_actions(self.language_group, [language_item])
|
||||
self.settings_shortcuts_item = create_action(main_window, 'settingsShortcutsItem',
|
||||
icon=':/system/system_configure_shortcuts.png',
|
||||
icon=UiIcons().shortcuts,
|
||||
category=UiStrings().Settings, can_shortcuts=True)
|
||||
# Formatting Tags were also known as display tags.
|
||||
self.formatting_tag_item = create_action(main_window, 'displayTagItem',
|
||||
icon=':/system/tag_editor.png', category=UiStrings().Settings,
|
||||
icon=UiIcons().edit, category=UiStrings().Settings,
|
||||
can_shortcuts=True)
|
||||
self.settings_configure_item = create_action(main_window, 'settingsConfigureItem',
|
||||
icon=':/system/system_settings.png', can_shortcuts=True,
|
||||
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.PreferencesRole)
|
||||
@ -284,7 +284,7 @@ class Ui_MainWindow(object):
|
||||
self.settings_export_item = create_action(main_window, 'settingsExportItem',
|
||||
category=UiStrings().Export, can_shortcuts=True)
|
||||
action_list.add_category(UiStrings().Help, CategoryOrder.standard_menu)
|
||||
self.about_item = create_action(main_window, 'aboutItem', icon=':/system/system_about.png',
|
||||
self.about_item = create_action(main_window, 'aboutItem', icon=UiIcons().info,
|
||||
can_shortcuts=True, category=UiStrings().Help,
|
||||
triggers=self.on_about_item_clicked)
|
||||
# Give QT Extra Hint that this is an About Menu Item
|
||||
@ -293,7 +293,7 @@ class Ui_MainWindow(object):
|
||||
self.local_help_file = AppLocation.get_directory(AppLocation.AppDir) / 'OpenLP.chm'
|
||||
elif is_macosx():
|
||||
self.local_help_file = AppLocation.get_directory(AppLocation.AppDir) / '..' / 'Resources' / 'OpenLP.help'
|
||||
self.user_manual_item = create_action(main_window, 'userManualItem', icon=':/system/system_help_contents.png',
|
||||
self.user_manual_item = create_action(main_window, 'userManualItem', icon=UiIcons().manual,
|
||||
can_shortcuts=True, category=UiStrings().Help,
|
||||
triggers=self.on_help_clicked)
|
||||
self.web_site_item = create_action(main_window, 'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
|
||||
@ -625,7 +625,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
||||
"""
|
||||
version_text = translate('OpenLP.MainWindow', 'Version {new} of OpenLP is now available for download (you are '
|
||||
'currently running version {current}). \n\nYou can download the latest version from '
|
||||
'http://openlp.org/.').format(new=version, current=get_version()[u'full'])
|
||||
'https://openlp.org/.').format(new=version, current=get_version()[u'full'])
|
||||
QtWidgets.QMessageBox.question(self, translate('OpenLP.MainWindow', 'OpenLP Version Updated'), version_text)
|
||||
|
||||
def show(self):
|
||||
@ -775,7 +775,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
||||
Load the OpenLP website
|
||||
"""
|
||||
import webbrowser
|
||||
webbrowser.open_new('http://openlp.org/')
|
||||
webbrowser.open_new('https://openlp.org/')
|
||||
|
||||
def on_help_clicked(self):
|
||||
"""
|
||||
@ -786,7 +786,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl.fromLocalFile(str(self.local_help_file)))
|
||||
else:
|
||||
import webbrowser
|
||||
webbrowser.open_new('http://manual.openlp.org/')
|
||||
webbrowser.open_new('https://manual.openlp.org/')
|
||||
|
||||
def on_about_item_clicked(self):
|
||||
"""
|
||||
@ -801,7 +801,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert
|
||||
self.plugin_form.load()
|
||||
self.plugin_form.exec()
|
||||
|
||||
def on_tools_open_data_folder_clicked(self):
|
||||
@staticmethod
|
||||
def on_tools_open_data_folder_clicked():
|
||||
"""
|
||||
Open data folder
|
||||
"""
|
||||
|
@ -38,6 +38,7 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import ItemCapabilities
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui import DisplayControllerType
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, get_media_players, set_media_players, \
|
||||
parse_optical_path
|
||||
from openlp.core.ui.media.endpoint import media_endpoint
|
||||
@ -283,19 +284,19 @@ class MediaController(RegistryBase, LogMixin, RegistryProperties):
|
||||
# Build a Media ToolBar
|
||||
controller.mediabar = OpenLPToolbar(controller)
|
||||
controller.mediabar.add_toolbar_action('playbackPlay', text='media_playback_play',
|
||||
icon=':/slides/media_playback_start.png',
|
||||
icon=UiIcons().play,
|
||||
tooltip=translate('OpenLP.SlideController', 'Start playing media.'),
|
||||
triggers=controller.send_to_plugins)
|
||||
controller.mediabar.add_toolbar_action('playbackPause', text='media_playback_pause',
|
||||
icon=':/slides/media_playback_pause.png',
|
||||
icon=UiIcons().pause,
|
||||
tooltip=translate('OpenLP.SlideController', 'Pause playing media.'),
|
||||
triggers=controller.send_to_plugins)
|
||||
controller.mediabar.add_toolbar_action('playbackStop', text='media_playback_stop',
|
||||
icon=':/slides/media_playback_stop.png',
|
||||
icon=UiIcons().stop,
|
||||
tooltip=translate('OpenLP.SlideController', 'Stop playing media.'),
|
||||
triggers=controller.send_to_plugins)
|
||||
controller.mediabar.add_toolbar_action('playbackLoop', text='media_playback_loop',
|
||||
icon=':/media/media_repeat.png', checked=False,
|
||||
icon=UiIcons().repeat, checked=False,
|
||||
tooltip=translate('OpenLP.SlideController', 'Loop playing media.'),
|
||||
triggers=controller.send_to_plugins)
|
||||
controller.position_label = QtWidgets.QLabel()
|
||||
|
@ -31,6 +31,7 @@ from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib.ui import create_button
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.ui.media import get_media_players, set_media_players
|
||||
from openlp.core.widgets.buttons import ColorButton
|
||||
|
||||
@ -56,7 +57,7 @@ class PlayerTab(SettingsTab):
|
||||
"""
|
||||
self.media_players = Registry().get('media_controller').media_players
|
||||
self.saved_used_players = None
|
||||
self.icon_path = ':/media/multimedia-player.png'
|
||||
self.icon_path = UiIcons().player
|
||||
player_translated = translate('OpenLP.PlayerTab', 'Players')
|
||||
super(PlayerTab, self).__init__(parent, 'Players', player_translated)
|
||||
|
||||
|
@ -25,8 +25,8 @@ The UI widgets of the plugin view dialog
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_PluginViewDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_PluginViewDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
plugin_view_dialog.setObjectName('plugin_view_dialog')
|
||||
plugin_view_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
plugin_view_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
plugin_view_dialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
self.plugin_layout = QtWidgets.QVBoxLayout(plugin_view_dialog)
|
||||
self.plugin_layout.setObjectName('plugin_layout')
|
||||
|
@ -25,7 +25,7 @@ The UI widgets of the print service dialog.
|
||||
from PyQt5 import QtCore, QtWidgets, QtPrintSupport
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import SpellTextEdit
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ class Ui_PrintServiceDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
print_service_dialog.setObjectName('print_service_dialog')
|
||||
print_service_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
print_service_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
print_service_dialog.resize(664, 594)
|
||||
self.main_layout = QtWidgets.QVBoxLayout(print_service_dialog)
|
||||
self.main_layout.setSpacing(0)
|
||||
@ -59,31 +59,31 @@ class Ui_PrintServiceDialog(object):
|
||||
self.toolbar = QtWidgets.QToolBar(print_service_dialog)
|
||||
self.toolbar.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||
self.print_button = self.toolbar.addAction(build_icon(':/general/general_print.png'),
|
||||
self.print_button = self.toolbar.addAction(UiIcons().print,
|
||||
translate('OpenLP.PrintServiceForm', 'Print'))
|
||||
self.options_button = QtWidgets.QToolButton(self.toolbar)
|
||||
self.options_button.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||
self.options_button.setIcon(build_icon(':/system/system_configure.png'))
|
||||
self.options_button.setIcon(UiIcons().settings)
|
||||
self.options_button.setCheckable(True)
|
||||
self.toolbar.addWidget(self.options_button)
|
||||
self.toolbar.addSeparator()
|
||||
self.plain_copy = self.toolbar.addAction(build_icon(':/system/system_edit_copy.png'),
|
||||
self.plain_copy = self.toolbar.addAction(UiIcons().clone,
|
||||
translate('OpenLP.PrintServiceForm', 'Copy'))
|
||||
self.html_copy = self.toolbar.addAction(build_icon(':/system/system_edit_copy.png'),
|
||||
self.html_copy = self.toolbar.addAction(UiIcons().clone,
|
||||
translate('OpenLP.PrintServiceForm', 'Copy as HTML'))
|
||||
self.toolbar.addSeparator()
|
||||
self.zoom_in_button = QtWidgets.QToolButton(self.toolbar)
|
||||
self.zoom_in_button.setIcon(build_icon(':/general/general_zoom_in.png'))
|
||||
self.zoom_in_button.setIcon(UiIcons().search_plus)
|
||||
self.zoom_in_button.setObjectName('zoom_in_button')
|
||||
self.zoom_in_button.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoom_in_button)
|
||||
self.zoom_out_button = QtWidgets.QToolButton(self.toolbar)
|
||||
self.zoom_out_button.setIcon(build_icon(':/general/general_zoom_out.png'))
|
||||
self.zoom_out_button.setIcon(UiIcons().search_minus)
|
||||
self.zoom_out_button.setObjectName('zoom_out_button')
|
||||
self.zoom_out_button.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoom_out_button)
|
||||
self.zoom_original_button = QtWidgets.QToolButton(self.toolbar)
|
||||
self.zoom_original_button.setIcon(build_icon(':/general/general_zoom_original.png'))
|
||||
self.zoom_original_button.setIcon(UiIcons().search)
|
||||
self.zoom_original_button.setObjectName('zoom_original_button')
|
||||
self.zoom_original_button.setIconSize(QtCore.QSize(22, 22))
|
||||
self.toolbar.addWidget(self.zoom_original_button)
|
||||
|
@ -33,7 +33,7 @@ from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import get_text_file_string
|
||||
from openlp.core.lib import get_text_file_string, image_to_byte
|
||||
from openlp.core.ui.printservicedialog import Ui_PrintServiceDialog, ZoomSize
|
||||
|
||||
DEFAULT_CSS = """/*
|
||||
@ -184,7 +184,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
custom_css = DEFAULT_CSS
|
||||
self._add_element('style', custom_css, html_data.head, attribute=('type', 'text/css'))
|
||||
self._add_element('body', parent=html_data)
|
||||
self._add_element('h1', html.escape(self.title_line_edit.text()), html_data.body, classId='serviceTitle')
|
||||
self._add_element('h1', html.escape(self.title_line_edit.text()), html_data.body, class_id='serviceTitle')
|
||||
for index, item in enumerate(self.service_manager.service_items):
|
||||
self._add_preview_item(html_data.body, item['service_item'], index)
|
||||
if not self.show_chords_check_box.isChecked():
|
||||
@ -195,10 +195,10 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
spacing_span.drop_tree()
|
||||
# Add the custom service notes:
|
||||
if self.footer_text_edit.toPlainText():
|
||||
div = self._add_element('div', parent=html_data.body, classId='customNotes')
|
||||
div = self._add_element('div', parent=html_data.body, class_id='customNotes')
|
||||
self._add_element(
|
||||
'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId='customNotesTitle')
|
||||
self._add_element('span', html.escape(self.footer_text_edit.toPlainText()), div, classId='customNotesText')
|
||||
'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, class_id='customNotesTitle')
|
||||
self._add_element('span', html.escape(self.footer_text_edit.toPlainText()), div, class_id='customNotesText')
|
||||
self.document.setHtml(lxml.html.tostring(html_data).decode())
|
||||
self.preview_widget.updatePreview()
|
||||
|
||||
@ -206,10 +206,11 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
"""
|
||||
Add a preview item
|
||||
"""
|
||||
div = self._add_element('div', classId='item', parent=body)
|
||||
div = self._add_element('div', class_id='item', parent=body)
|
||||
# Add the title of the service item.
|
||||
item_title = self._add_element('h2', parent=div, classId='itemTitle')
|
||||
self._add_element('img', parent=item_title, attribute=('src', item.icon))
|
||||
item_title = self._add_element('h2', parent=div, class_id='itemTitle')
|
||||
img = image_to_byte(item.icon.pixmap(20, 20).toImage())
|
||||
self._add_element('img', parent=item_title, attribute=('src', 'data:image/png;base64, ' + img))
|
||||
self._add_element('span', ' ' + html.escape(item.get_display_title()), item_title)
|
||||
if self.slide_text_check_box.isChecked():
|
||||
# Add the text of the service item.
|
||||
@ -218,7 +219,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
verse_html = None
|
||||
for slide in item.get_frames():
|
||||
if not verse_def or verse_def != slide['verseTag'] or verse_html == slide['printing_html']:
|
||||
text_div = self._add_element('div', parent=div, classId='itemText')
|
||||
text_div = self._add_element('div', parent=div, class_id='itemText')
|
||||
elif 'chordspacing' not in slide['printing_html']:
|
||||
self._add_element('br', parent=text_div)
|
||||
self._add_element('span', slide['printing_html'], text_div)
|
||||
@ -229,7 +230,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
div.set('class', 'item newPage')
|
||||
# Add the image names of the service item.
|
||||
elif item.is_image():
|
||||
ol = self._add_element('ol', parent=div, classId='imageList')
|
||||
ol = self._add_element('ol', parent=div, class_id='imageList')
|
||||
for slide in range(len(item.get_frames())):
|
||||
self._add_element('li', item.get_frame_title(slide), ol)
|
||||
# add footer
|
||||
@ -237,24 +238,24 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
foot_text = foot_text.partition('<br>')[2]
|
||||
if foot_text:
|
||||
foot_text = html.escape(foot_text.replace('<br>', '\n'))
|
||||
self._add_element('div', foot_text.replace('\n', '<br>'), parent=div, classId='itemFooter')
|
||||
self._add_element('div', foot_text.replace('\n', '<br>'), parent=div, class_id='itemFooter')
|
||||
# Add service items' notes.
|
||||
if self.notes_check_box.isChecked():
|
||||
if item.notes:
|
||||
p = self._add_element('div', classId='itemNotes', parent=div)
|
||||
self._add_element('span', translate('OpenLP.ServiceManager', 'Notes: '), p, classId='itemNotesTitle')
|
||||
self._add_element('span', html.escape(item.notes).replace('\n', '<br>'), p, classId='itemNotesText')
|
||||
p = self._add_element('div', class_id='itemNotes', parent=div)
|
||||
self._add_element('span', translate('OpenLP.ServiceManager', 'Notes: '), p, class_id='itemNotesTitle')
|
||||
self._add_element('span', html.escape(item.notes).replace('\n', '<br>'), p, class_id='itemNotesText')
|
||||
# Add play length of media files.
|
||||
if item.is_media() and self.meta_data_check_box.isChecked():
|
||||
tme = item.media_length
|
||||
if item.end_time > 0:
|
||||
tme = item.end_time - item.start_time
|
||||
title = self._add_element('div', classId='media', parent=div)
|
||||
title = self._add_element('div', class_id='media', parent=div)
|
||||
self._add_element(
|
||||
'span', translate('OpenLP.ServiceManager', 'Playing time: '), title, classId='mediaTitle')
|
||||
self._add_element('span', str(datetime.timedelta(seconds=tme)), title, classId='mediaText')
|
||||
'span', translate('OpenLP.ServiceManager', 'Playing time: '), title, class_id='mediaTitle')
|
||||
self._add_element('span', str(datetime.timedelta(seconds=tme)), title, class_id='mediaText')
|
||||
|
||||
def _add_element(self, tag, text=None, parent=None, classId=None, attribute=None):
|
||||
def _add_element(self, tag, text=None, parent=None, class_id=None, attribute=None):
|
||||
"""
|
||||
Creates a html element. If ``text`` is given, the element's text will set and if a ``parent`` is given,
|
||||
the element is appended.
|
||||
@ -262,7 +263,7 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
:param tag: The html tag, e. g. ``'span'``. Defaults to ``None``.
|
||||
:param text: The text for the tag. Defaults to ``None``.
|
||||
:param parent: The parent element. Defaults to ``None``.
|
||||
:param classId: Value for the class attribute
|
||||
:param class_id: Value for the class attribute
|
||||
:param attribute: Tuple name/value pair to add as an optional attribute
|
||||
"""
|
||||
if text is not None:
|
||||
@ -271,8 +272,8 @@ class PrintServiceForm(QtWidgets.QDialog, Ui_PrintServiceDialog, RegistryPropert
|
||||
element = lxml.html.Element(tag)
|
||||
if parent is not None:
|
||||
parent.append(element)
|
||||
if classId is not None:
|
||||
element.set('class', classId)
|
||||
if class_id is not None:
|
||||
element.set('class', class_id)
|
||||
if attribute is not None:
|
||||
element.set(attribute[0], attribute[1])
|
||||
return element
|
||||
|
@ -25,8 +25,8 @@ The UI widgets for the service item edit dialog
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box, create_button
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_ServiceItemEditDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_ServiceItemEditDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
serviceItemEditDialog.setObjectName('serviceItemEditDialog')
|
||||
serviceItemEditDialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
serviceItemEditDialog.setWindowIcon(UiIcons().main_icon)
|
||||
self.dialog_layout = QtWidgets.QGridLayout(serviceItemEditDialog)
|
||||
self.dialog_layout.setContentsMargins(8, 8, 8, 8)
|
||||
self.dialog_layout.setSpacing(8)
|
||||
|
@ -37,6 +37,7 @@ from openlp.core.common import ThemeLevel, delete_file
|
||||
from openlp.core.common.actions import ActionList, CategoryOrder
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings, format_time, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.json import OpenLPJsonDecoder, OpenLPJsonEncoder
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.path import Path, str_to_path
|
||||
@ -137,14 +138,14 @@ class Ui_ServiceManager(object):
|
||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||
# Create the top toolbar
|
||||
self.toolbar = OpenLPToolbar(self)
|
||||
self.toolbar.add_toolbar_action('newService', text=UiStrings().NewService, icon=':/general/general_new.png',
|
||||
self.toolbar.add_toolbar_action('newService', text=UiStrings().NewService, icon=UiIcons().new,
|
||||
tooltip=UiStrings().CreateService, triggers=self.on_new_service_clicked)
|
||||
self.toolbar.add_toolbar_action('openService', text=UiStrings().OpenService,
|
||||
icon=':/general/general_open.png',
|
||||
icon=UiIcons().open,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Load an existing service.'),
|
||||
triggers=self.on_load_service_clicked)
|
||||
self.toolbar.add_toolbar_action('saveService', text=UiStrings().SaveService,
|
||||
icon=':/general/general_save.png',
|
||||
icon=UiIcons().save,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Save this service.'),
|
||||
triggers=self.decide_save_method)
|
||||
self.toolbar.addSeparator()
|
||||
@ -178,45 +179,45 @@ class Ui_ServiceManager(object):
|
||||
action_list.add_category(UiStrings().Service, CategoryOrder.standard_toolbar)
|
||||
self.move_top_action = self.order_toolbar.add_toolbar_action(
|
||||
'moveTop',
|
||||
text=translate('OpenLP.ServiceManager', 'Move to &top'), icon=':/services/service_top.png',
|
||||
text=translate('OpenLP.ServiceManager', 'Move to &top'), icon=UiIcons().top,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Move item to the top of the service.'),
|
||||
can_shortcuts=True, category=UiStrings().Service, triggers=self.on_service_top)
|
||||
self.move_up_action = self.order_toolbar.add_toolbar_action(
|
||||
'moveUp',
|
||||
text=translate('OpenLP.ServiceManager', 'Move &up'), icon=':/services/service_up.png',
|
||||
text=translate('OpenLP.ServiceManager', 'Move &up'), icon=UiIcons().arrow_up,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Move item up one position in the service.'),
|
||||
can_shortcuts=True, category=UiStrings().Service, triggers=self.on_service_up)
|
||||
self.move_down_action = self.order_toolbar.add_toolbar_action(
|
||||
'moveDown',
|
||||
text=translate('OpenLP.ServiceManager', 'Move &down'), icon=':/services/service_down.png',
|
||||
text=translate('OpenLP.ServiceManager', 'Move &down'), icon=UiIcons().arrow_down,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Move item down one position in the service.'),
|
||||
can_shortcuts=True, category=UiStrings().Service, triggers=self.on_service_down)
|
||||
self.move_bottom_action = self.order_toolbar.add_toolbar_action(
|
||||
'moveBottom',
|
||||
text=translate('OpenLP.ServiceManager', 'Move to &bottom'), icon=':/services/service_bottom.png',
|
||||
text=translate('OpenLP.ServiceManager', 'Move to &bottom'), icon=UiIcons().bottom,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Move item to the end of the service.'),
|
||||
can_shortcuts=True, category=UiStrings().Service, triggers=self.on_service_end)
|
||||
self.order_toolbar.addSeparator()
|
||||
self.delete_action = self.order_toolbar.add_toolbar_action(
|
||||
'delete', can_shortcuts=True,
|
||||
text=translate('OpenLP.ServiceManager', '&Delete From Service'), icon=':/general/general_delete.png',
|
||||
text=translate('OpenLP.ServiceManager', '&Delete From Service'), icon=UiIcons().delete,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Delete the selected item from the service.'),
|
||||
triggers=self.on_delete_from_service)
|
||||
self.order_toolbar.addSeparator()
|
||||
self.expand_action = self.order_toolbar.add_toolbar_action(
|
||||
'expand', can_shortcuts=True,
|
||||
text=translate('OpenLP.ServiceManager', '&Expand all'), icon=':/services/service_expand_all.png',
|
||||
text=translate('OpenLP.ServiceManager', '&Expand all'), icon=UiIcons().plus,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Expand all the service items.'),
|
||||
category=UiStrings().Service, triggers=self.on_expand_all)
|
||||
self.collapse_action = self.order_toolbar.add_toolbar_action(
|
||||
'collapse', can_shortcuts=True,
|
||||
text=translate('OpenLP.ServiceManager', '&Collapse all'), icon=':/services/service_collapse_all.png',
|
||||
text=translate('OpenLP.ServiceManager', '&Collapse all'), icon=UiIcons().minus,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Collapse all the service items.'),
|
||||
category=UiStrings().Service, triggers=self.on_collapse_all)
|
||||
self.order_toolbar.addSeparator()
|
||||
self.make_live_action = self.order_toolbar.add_toolbar_action(
|
||||
'make_live', can_shortcuts=True,
|
||||
text=translate('OpenLP.ServiceManager', 'Go Live'), icon=':/general/general_live.png',
|
||||
text=translate('OpenLP.ServiceManager', 'Go Live'), icon=UiIcons().live,
|
||||
tooltip=translate('OpenLP.ServiceManager', 'Send the selected item to Live.'),
|
||||
category=UiStrings().Service,
|
||||
triggers=self.on_make_live_action_triggered)
|
||||
@ -233,33 +234,33 @@ class Ui_ServiceManager(object):
|
||||
# build the drag and drop context menu
|
||||
self.dnd_menu = QtWidgets.QMenu()
|
||||
self.new_action = self.dnd_menu.addAction(translate('OpenLP.ServiceManager', '&Add New Item'))
|
||||
self.new_action.setIcon(build_icon(':/general/general_edit.png'))
|
||||
self.new_action.setIcon(UiIcons().edit)
|
||||
self.add_to_action = self.dnd_menu.addAction(translate('OpenLP.ServiceManager', '&Add to Selected Item'))
|
||||
self.add_to_action.setIcon(build_icon(':/general/general_edit.png'))
|
||||
self.add_to_action.setIcon(UiIcons().edit)
|
||||
# build the context menu
|
||||
self.menu = QtWidgets.QMenu()
|
||||
self.edit_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Edit Item'),
|
||||
icon=':/general/general_edit.png', triggers=self.remote_edit)
|
||||
icon=UiIcons().edit, triggers=self.remote_edit)
|
||||
self.rename_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Rename...'),
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_service_item_rename)
|
||||
self.maintain_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Reorder Item'),
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_service_item_edit_form)
|
||||
self.notes_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Notes'),
|
||||
icon=':/services/service_notes.png',
|
||||
icon=UiIcons().notes,
|
||||
triggers=self.on_service_item_note_form)
|
||||
self.time_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', '&Start Time'),
|
||||
icon=':/media/media_time.png', triggers=self.on_start_time_form)
|
||||
icon=UiIcons().time, triggers=self.on_start_time_form)
|
||||
self.auto_start_action = create_widget_action(self.menu, text='',
|
||||
icon=':/media/auto-start_active.png',
|
||||
icon=UiIcons().active,
|
||||
triggers=self.on_auto_start)
|
||||
# Add already existing delete action to the menu.
|
||||
self.menu.addAction(self.delete_action)
|
||||
self.create_custom_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ServiceManager', 'Create New &Custom '
|
||||
'Slide'),
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().clone,
|
||||
triggers=self.create_custom)
|
||||
self.menu.addSeparator()
|
||||
# Add AutoPlay menu actions
|
||||
@ -284,7 +285,7 @@ class Ui_ServiceManager(object):
|
||||
triggers=self.on_timed_slide_interval)
|
||||
self.menu.addSeparator()
|
||||
self.preview_action = create_widget_action(self.menu, text=translate('OpenLP.ServiceManager', 'Show &Preview'),
|
||||
icon=':/general/general_preview.png', triggers=self.make_preview)
|
||||
icon=UiIcons().preview, triggers=self.make_preview)
|
||||
# Add already existing make live action to the menu.
|
||||
self.menu.addAction(self.make_live_action)
|
||||
self.menu.addSeparator()
|
||||
@ -314,8 +315,6 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
Sets up the service manager, toolbars, list view, et al.
|
||||
"""
|
||||
super().__init__(parent)
|
||||
self.active = build_icon(':/media/auto-start_active.png')
|
||||
self.inactive = build_icon(':/media/auto-start_inactive.png')
|
||||
self.service_items = []
|
||||
self.suffixes = []
|
||||
self.drop_position = -1
|
||||
@ -798,11 +797,12 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
self.time_action.setVisible(True)
|
||||
if service_item['service_item'].is_capable(ItemCapabilities.CanAutoStartForLive):
|
||||
self.auto_start_action.setVisible(True)
|
||||
self.auto_start_action.setIcon(self.inactive)
|
||||
self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
|
||||
if service_item['service_item'].will_auto_start:
|
||||
self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - active'))
|
||||
self.auto_start_action.setIcon(self.active)
|
||||
self.auto_start_action.setIcon(UiIcons().active)
|
||||
else:
|
||||
self.auto_start_action.setIcon(UiIcons().inactive)
|
||||
self.auto_start_action.setText(translate('OpenLP.ServiceManager', '&Auto Start - inactive'))
|
||||
if service_item['service_item'].is_text():
|
||||
for plugin in self.plugin_manager.plugins:
|
||||
if plugin.name == 'custom' and plugin.status == PluginStatus.Active:
|
||||
@ -1167,27 +1167,27 @@ class ServiceManager(QtWidgets.QWidget, RegistryBase, Ui_ServiceManager, LogMixi
|
||||
tree_widget_item = QtWidgets.QTreeWidgetItem(self.service_manager_list)
|
||||
if service_item_from_item.is_valid:
|
||||
if service_item_from_item.notes:
|
||||
icon = QtGui.QImage(service_item_from_item.icon)
|
||||
icon = service_item_from_item.icon.pixmap(80, 80).toImage()
|
||||
icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
overlay = QtGui.QImage(':/services/service_item_notes.png')
|
||||
overlay = overlay.scaled(80, 80, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
overlay = UiIcons().notes.pixmap(40, 40).toImage()
|
||||
overlay = overlay.scaled(40, 40, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
painter = QtGui.QPainter(icon)
|
||||
painter.drawImage(0, 0, overlay)
|
||||
painter.end()
|
||||
tree_widget_item.setIcon(0, build_icon(icon))
|
||||
elif service_item_from_item.temporary_edit:
|
||||
icon = QtGui.QImage(service_item_from_item.icon)
|
||||
icon = service_item_from_item.icon.pixmap(80, 80).toImage()
|
||||
icon = icon.scaled(80, 80, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
overlay = QtGui.QImage(':/general/general_export.png')
|
||||
overlay = QtGui.QImage(UiIcons().upload)
|
||||
overlay = overlay.scaled(40, 40, QtCore.Qt.KeepAspectRatio, QtCore.Qt.SmoothTransformation)
|
||||
painter = QtGui.QPainter(icon)
|
||||
painter.drawImage(40, 0, overlay)
|
||||
painter.end()
|
||||
tree_widget_item.setIcon(0, build_icon(icon))
|
||||
else:
|
||||
tree_widget_item.setIcon(0, service_item_from_item.iconic_representation)
|
||||
tree_widget_item.setIcon(0, service_item_from_item.icon)
|
||||
else:
|
||||
tree_widget_item.setIcon(0, build_icon(':/general/general_delete.png'))
|
||||
tree_widget_item.setIcon(0, UiIcons().delete)
|
||||
tree_widget_item.setText(0, service_item_from_item.get_display_title())
|
||||
tips = []
|
||||
if service_item_from_item.temporary_edit:
|
||||
|
@ -25,8 +25,8 @@ The UI widgets of the settings dialog.
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_SettingsDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_SettingsDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
settings_dialog.setObjectName('settings_dialog')
|
||||
settings_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
settings_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
settings_dialog.resize(920, 625)
|
||||
self.dialog_layout = QtWidgets.QGridLayout(settings_dialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -25,8 +25,8 @@ The list of shortcuts within a dialog.
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class CaptureShortcutButton(QtWidgets.QPushButton):
|
||||
@ -72,7 +72,7 @@ class Ui_ShortcutListDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
shortcutListDialog.setObjectName('shortcutListDialog')
|
||||
shortcutListDialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
shortcutListDialog.setWindowIcon(UiIcons().main_icon)
|
||||
shortcutListDialog.resize(500, 438)
|
||||
self.shortcut_list_layout = QtWidgets.QVBoxLayout(shortcutListDialog)
|
||||
self.shortcut_list_layout.setObjectName('shortcut_list_layout')
|
||||
@ -101,23 +101,23 @@ class Ui_ShortcutListDialog(object):
|
||||
self.primary_push_button = CaptureShortcutButton(shortcutListDialog)
|
||||
self.primary_push_button.setObjectName('primary_push_button')
|
||||
self.primary_push_button.setMinimumSize(QtCore.QSize(84, 0))
|
||||
self.primary_push_button.setIcon(build_icon(':/system/system_configure_shortcuts.png'))
|
||||
self.primary_push_button.setIcon(UiIcons.shortcuts)
|
||||
self.primary_layout.addWidget(self.primary_push_button)
|
||||
self.clear_primary_button = QtWidgets.QToolButton(shortcutListDialog)
|
||||
self.clear_primary_button.setObjectName('clear_primary_button')
|
||||
self.clear_primary_button.setMinimumSize(QtCore.QSize(0, 16))
|
||||
self.clear_primary_button.setIcon(build_icon(':/system/clear_shortcut.png'))
|
||||
self.clear_primary_button.setIcon(UiIcons().settings)
|
||||
self.primary_layout.addWidget(self.clear_primary_button)
|
||||
self.details_layout.addLayout(self.primary_layout, 1, 1, 1, 1)
|
||||
self.alternate_layout = QtWidgets.QHBoxLayout()
|
||||
self.alternate_layout.setObjectName('alternate_layout')
|
||||
self.alternate_push_button = CaptureShortcutButton(shortcutListDialog)
|
||||
self.alternate_push_button.setObjectName('alternate_push_button')
|
||||
self.alternate_push_button.setIcon(build_icon(':/system/system_configure_shortcuts.png'))
|
||||
self.alternate_push_button.setIcon(UiIcons().settings)
|
||||
self.alternate_layout.addWidget(self.alternate_push_button)
|
||||
self.clear_alternate_button = QtWidgets.QToolButton(shortcutListDialog)
|
||||
self.clear_alternate_button.setObjectName('clear_alternate_button')
|
||||
self.clear_alternate_button.setIcon(build_icon(':/system/clear_shortcut.png'))
|
||||
self.clear_alternate_button.setIcon(UiIcons().settings)
|
||||
self.alternate_layout.addWidget(self.clear_alternate_button)
|
||||
self.details_layout.addLayout(self.alternate_layout, 1, 2, 1, 1)
|
||||
self.primary_label = QtWidgets.QLabel(shortcutListDialog)
|
||||
|
@ -39,6 +39,7 @@ from openlp.core.display.screens import ScreenList
|
||||
from openlp.core.lib import ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, build_icon, build_html
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.toolbar import OpenLPToolbar
|
||||
from openlp.core.widgets.views import ListPreviewWidget
|
||||
|
||||
@ -212,14 +213,14 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.toolbar.setSizePolicy(size_toolbar_policy)
|
||||
self.previous_item = create_action(self, 'previousItem_' + self.type_prefix,
|
||||
text=translate('OpenLP.SlideController', 'Previous Slide'),
|
||||
icon=':/slides/slide_previous.png',
|
||||
icon=UiIcons().arrow_left,
|
||||
tooltip=translate('OpenLP.SlideController', 'Move to previous.'),
|
||||
can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut,
|
||||
category=self.category, triggers=self.on_slide_selected_previous)
|
||||
self.toolbar.addAction(self.previous_item)
|
||||
self.next_item = create_action(self, 'nextItem_' + self.type_prefix,
|
||||
text=translate('OpenLP.SlideController', 'Next Slide'),
|
||||
icon=':/slides/slide_next.png',
|
||||
icon=UiIcons().arrow_right,
|
||||
tooltip=translate('OpenLP.SlideController', 'Move to next.'),
|
||||
can_shortcuts=True, context=QtCore.Qt.WidgetWithChildrenShortcut,
|
||||
category=self.category, triggers=self.on_slide_selected_next_action)
|
||||
@ -235,28 +236,28 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.hide_menu.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
|
||||
self.hide_menu.setMenu(QtWidgets.QMenu(translate('OpenLP.SlideController', 'Hide'), self.toolbar))
|
||||
self.toolbar.add_toolbar_widget(self.hide_menu)
|
||||
self.toolbar.add_toolbar_action('goPreview', icon=':/general/general_live.png',
|
||||
self.toolbar.add_toolbar_action('goPreview', icon=UiIcons().live,
|
||||
tooltip=translate('OpenLP.SlideController', 'Move to preview.'),
|
||||
triggers=self.on_go_preview)
|
||||
# The order of the blank to modes in Shortcuts list comes from here.
|
||||
self.desktop_screen_enable = create_action(self, 'desktopScreenEnable',
|
||||
text=translate('OpenLP.SlideController', 'Show Desktop'),
|
||||
icon=':/slides/slide_desktop.png', can_shortcuts=True,
|
||||
icon=UiIcons().desktop, can_shortcuts=True,
|
||||
context=QtCore.Qt.WidgetWithChildrenShortcut,
|
||||
category=self.category, triggers=self.on_hide_display_enable)
|
||||
self.desktop_screen = create_action(self, 'desktopScreen',
|
||||
text=translate('OpenLP.SlideController', 'Toggle Desktop'),
|
||||
icon=':/slides/slide_desktop.png',
|
||||
icon=UiIcons().desktop,
|
||||
checked=False, can_shortcuts=True, category=self.category,
|
||||
triggers=self.on_hide_display)
|
||||
self.theme_screen = create_action(self, 'themeScreen',
|
||||
text=translate('OpenLP.SlideController', 'Toggle Blank to Theme'),
|
||||
icon=':/slides/slide_theme.png',
|
||||
icon=UiIcons().blank_theme,
|
||||
checked=False, can_shortcuts=True, category=self.category,
|
||||
triggers=self.on_theme_display)
|
||||
self.blank_screen = create_action(self, 'blankScreen',
|
||||
text=translate('OpenLP.SlideController', 'Toggle Blank Screen'),
|
||||
icon=':/slides/slide_blank.png',
|
||||
icon=UiIcons().blank,
|
||||
checked=False, can_shortcuts=True, category=self.category,
|
||||
triggers=self.on_blank_display)
|
||||
self.hide_menu.setDefaultAction(self.blank_screen)
|
||||
@ -287,10 +288,10 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.toolbar))
|
||||
self.toolbar.add_toolbar_widget(self.play_slides_menu)
|
||||
self.play_slides_loop = create_action(self, 'playSlidesLoop', text=UiStrings().PlaySlidesInLoop,
|
||||
icon=':/media/media_time.png', checked=False, can_shortcuts=True,
|
||||
icon=UiIcons().clock, checked=False, can_shortcuts=True,
|
||||
category=self.category, triggers=self.on_play_slides_loop)
|
||||
self.play_slides_once = create_action(self, 'playSlidesOnce', text=UiStrings().PlaySlidesToEnd,
|
||||
icon=':/media/media_time.png', checked=False, can_shortcuts=True,
|
||||
icon=UiIcons().clock, checked=False, can_shortcuts=True,
|
||||
category=self.category, triggers=self.on_play_slides_once)
|
||||
if Settings().value(self.main_window.advanced_settings_section + '/slide limits') == SlideLimits.Wrap:
|
||||
self.play_slides_menu.setDefaultAction(self.play_slides_loop)
|
||||
@ -307,18 +308,18 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.receive_spin_delay()
|
||||
self.toolbar.add_toolbar_widget(self.delay_spin_box)
|
||||
else:
|
||||
self.toolbar.add_toolbar_action('goLive', icon=':/general/general_live.png',
|
||||
self.toolbar.add_toolbar_action('goLive', icon=UiIcons().live,
|
||||
tooltip=translate('OpenLP.SlideController', 'Move to live.'),
|
||||
triggers=self.on_go_live)
|
||||
self.toolbar.add_toolbar_action('addToService', icon=':/general/general_add.png',
|
||||
self.toolbar.add_toolbar_action('addToService', icon=UiIcons().add,
|
||||
tooltip=translate('OpenLP.SlideController', 'Add to Service.'),
|
||||
triggers=self.on_preview_add_to_service)
|
||||
self.toolbar.addSeparator()
|
||||
self.toolbar.add_toolbar_action('editSong', icon=':/general/general_edit.png',
|
||||
self.toolbar.add_toolbar_action('editSong', icon=UiIcons().edit,
|
||||
tooltip=translate('OpenLP.SlideController',
|
||||
'Edit and reload song preview.'),
|
||||
triggers=self.on_edit_song)
|
||||
self.toolbar.add_toolbar_action('clear', icon=':/general/general_delete.png',
|
||||
self.toolbar.add_toolbar_action('clear', icon=UiIcons().delete,
|
||||
tooltip=translate('OpenLP.SlideController',
|
||||
'Clear'),
|
||||
triggers=self.on_clear)
|
||||
@ -337,7 +338,7 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
# FIXME: object name should be changed. But this requires that we migrate the shortcut.
|
||||
self.audio_pause_item = self.toolbar.add_toolbar_action(
|
||||
'audioPauseItem',
|
||||
icon=':/slides/media_playback_pause.png', text=translate('OpenLP.SlideController', 'Pause Audio'),
|
||||
icon=UiIcons().pause, text=translate('OpenLP.SlideController', 'Pause Audio'),
|
||||
tooltip=translate('OpenLP.SlideController', 'Pause audio.'),
|
||||
checked=False, visible=False, category=self.category, context=QtCore.Qt.WindowShortcut,
|
||||
can_shortcuts=True, triggers=self.set_audio_pause_clicked)
|
||||
@ -346,7 +347,7 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.audio_pause_item.setParent(self.toolbar)
|
||||
self.toolbar.widgetForAction(self.audio_pause_item).setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
|
||||
self.next_track_item = create_action(self, 'nextTrackItem', text=UiStrings().NextTrack,
|
||||
icon=':/slides/media_playback_next.png',
|
||||
icon=UiIcons().arrow_right,
|
||||
tooltip=translate('OpenLP.SlideController',
|
||||
'Go to next audio track.'),
|
||||
category=self.category,
|
||||
@ -734,10 +735,10 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.toolbar.set_widget_visible('song_menu', False)
|
||||
# Reset the button
|
||||
self.play_slides_once.setChecked(False)
|
||||
self.play_slides_once.setIcon(build_icon(':/media/media_time.png'))
|
||||
self.play_slides_once.setIcon(UiIcons().clock)
|
||||
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
|
||||
self.play_slides_loop.setChecked(False)
|
||||
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png'))
|
||||
self.play_slides_loop.setIcon(UiIcons().clock)
|
||||
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
|
||||
if item.is_text():
|
||||
if (Settings().value(self.main_window.songs_settings_section + '/display songbar') and
|
||||
@ -1312,16 +1313,16 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.play_slides_loop.setChecked(checked)
|
||||
self.log_debug('on_play_slides_loop {text}'.format(text=checked))
|
||||
if checked:
|
||||
self.play_slides_loop.setIcon(build_icon(':/media/media_stop.png'))
|
||||
self.play_slides_loop.setIcon(UiIcons().stop)
|
||||
self.play_slides_loop.setText(UiStrings().StopPlaySlidesInLoop)
|
||||
self.play_slides_once.setIcon(build_icon(':/media/media_time.png'))
|
||||
self.play_slides_once.setIcon(UiIcons().clock)
|
||||
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
|
||||
self.play_slides_menu.setDefaultAction(self.play_slides_loop)
|
||||
self.play_slides_once.setChecked(False)
|
||||
if Settings().value('core/click live slide to unblank'):
|
||||
Registry().execute('slidecontroller_live_unblank')
|
||||
else:
|
||||
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png'))
|
||||
self.play_slides_loop.setIcon(UiIcons().clock)
|
||||
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
|
||||
self.on_toggle_loop()
|
||||
|
||||
@ -1337,16 +1338,16 @@ class SlideController(DisplayController, LogMixin, RegistryProperties):
|
||||
self.play_slides_once.setChecked(checked)
|
||||
self.log_debug('on_play_slides_once {text}'.format(text=checked))
|
||||
if checked:
|
||||
self.play_slides_once.setIcon(build_icon(':/media/media_stop.png'))
|
||||
self.play_slides_once.setIcon(UiIcons().stop)
|
||||
self.play_slides_once.setText(UiStrings().StopPlaySlidesToEnd)
|
||||
self.play_slides_loop.setIcon(build_icon(':/media/media_time.png'))
|
||||
self.play_slides_loop.setIcon(UiIcons().clock)
|
||||
self.play_slides_loop.setText(UiStrings().PlaySlidesInLoop)
|
||||
self.play_slides_menu.setDefaultAction(self.play_slides_once)
|
||||
self.play_slides_loop.setChecked(False)
|
||||
if Settings().value('core/click live slide to unblank'):
|
||||
Registry().execute('slidecontroller_live_unblank')
|
||||
else:
|
||||
self.play_slides_once.setIcon(build_icon(':/media/media_time'))
|
||||
self.play_slides_once.setIcon(UiIcons().clock)
|
||||
self.play_slides_once.setText(UiStrings().PlaySlidesToEnd)
|
||||
self.on_toggle_loop()
|
||||
|
||||
|
@ -25,8 +25,8 @@ The UI widgets for the time dialog
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_StartTimeDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_StartTimeDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
StartTimeDialog.setObjectName('StartTimeDialog')
|
||||
StartTimeDialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
StartTimeDialog.setWindowIcon(UiIcons().main_icon)
|
||||
StartTimeDialog.resize(350, 10)
|
||||
self.dialog_layout = QtWidgets.QGridLayout(StartTimeDialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -25,8 +25,8 @@ The layout of the theme
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_ThemeLayoutDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_ThemeLayoutDialog(object):
|
||||
Set up the UI
|
||||
"""
|
||||
themeLayoutDialog.setObjectName('themeLayoutDialogDialog')
|
||||
themeLayoutDialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
themeLayoutDialog.setWindowIcon(UiIcons().main_icon)
|
||||
self.preview_layout = QtWidgets.QVBoxLayout(themeLayoutDialog)
|
||||
self.preview_layout.setObjectName('preview_layout')
|
||||
self.preview_area = QtWidgets.QWidget(themeLayoutDialog)
|
||||
|
@ -31,6 +31,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from openlp.core.common import delete_file
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings, translate, get_locale_key
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import LogMixin, RegistryProperties
|
||||
from openlp.core.common.path import Path, copyfile, create_paths, path_to_str
|
||||
from openlp.core.common.registry import Registry, RegistryBase
|
||||
@ -61,30 +62,30 @@ class Ui_ThemeManager(object):
|
||||
self.toolbar = OpenLPToolbar(widget)
|
||||
self.toolbar.setObjectName('toolbar')
|
||||
self.toolbar.add_toolbar_action('newTheme',
|
||||
text=UiStrings().NewTheme, icon=':/themes/theme_new.png',
|
||||
text=UiStrings().NewTheme, icon=UiIcons().new,
|
||||
tooltip=translate('OpenLP.ThemeManager', 'Create a new theme.'),
|
||||
triggers=self.on_add_theme)
|
||||
self.toolbar.add_toolbar_action('editTheme',
|
||||
text=translate('OpenLP.ThemeManager', 'Edit Theme'),
|
||||
icon=':/themes/theme_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
tooltip=translate('OpenLP.ThemeManager', 'Edit a theme.'),
|
||||
triggers=self.on_edit_theme)
|
||||
self.delete_toolbar_action = self.toolbar.add_toolbar_action('delete_theme',
|
||||
text=translate('OpenLP.ThemeManager',
|
||||
'Delete Theme'),
|
||||
icon=':/general/general_delete.png',
|
||||
icon=UiIcons().delete,
|
||||
tooltip=translate('OpenLP.ThemeManager',
|
||||
'Delete a theme.'),
|
||||
triggers=self.on_delete_theme)
|
||||
self.toolbar.addSeparator()
|
||||
self.toolbar.add_toolbar_action('importTheme',
|
||||
text=translate('OpenLP.ThemeManager', 'Import Theme'),
|
||||
icon=':/general/general_import.png',
|
||||
icon=UiIcons().download,
|
||||
tooltip=translate('OpenLP.ThemeManager', 'Import a theme.'),
|
||||
triggers=self.on_import_theme)
|
||||
self.toolbar.add_toolbar_action('exportTheme',
|
||||
text=translate('OpenLP.ThemeManager', 'Export Theme'),
|
||||
icon=':/general/general_export.png',
|
||||
icon=UiIcons().upload,
|
||||
tooltip=translate('OpenLP.ThemeManager', 'Export a theme.'),
|
||||
triggers=self.on_export_theme)
|
||||
self.layout.addWidget(self.toolbar)
|
||||
@ -102,24 +103,24 @@ class Ui_ThemeManager(object):
|
||||
self.menu = QtWidgets.QMenu()
|
||||
self.edit_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', '&Edit Theme'),
|
||||
icon=':/themes/theme_edit.png', triggers=self.on_edit_theme)
|
||||
icon=UiIcons().edit, triggers=self.on_edit_theme)
|
||||
self.copy_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', '&Copy Theme'),
|
||||
icon=':/themes/theme_edit.png', triggers=self.on_copy_theme)
|
||||
icon=UiIcons().copy, triggers=self.on_copy_theme)
|
||||
self.rename_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', '&Rename Theme'),
|
||||
icon=':/themes/theme_edit.png', triggers=self.on_rename_theme)
|
||||
icon=UiIcons().edit, triggers=self.on_rename_theme)
|
||||
self.delete_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', '&Delete Theme'),
|
||||
icon=':/general/general_delete.png', triggers=self.on_delete_theme)
|
||||
icon=UiIcons().delete, triggers=self.on_delete_theme)
|
||||
self.menu.addSeparator()
|
||||
self.global_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', 'Set As &Global Default'),
|
||||
icon=':/general/general_export.png',
|
||||
icon=UiIcons().default,
|
||||
triggers=self.change_global_from_screen)
|
||||
self.export_action = create_widget_action(self.menu,
|
||||
text=translate('OpenLP.ThemeManager', '&Export Theme'),
|
||||
icon=':/general/general_export.png', triggers=self.on_export_theme)
|
||||
icon=UiIcons().upload, triggers=self.on_export_theme)
|
||||
# Signals
|
||||
self.theme_list_widget.doubleClicked.connect(self.change_global_from_screen)
|
||||
self.theme_list_widget.currentItemChanged.connect(self.check_list_state)
|
||||
|
@ -30,6 +30,7 @@ from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib.ui import find_and_set_in_combo_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class ThemesTab(SettingsTab):
|
||||
@ -40,7 +41,7 @@ class ThemesTab(SettingsTab):
|
||||
"""
|
||||
Constructor
|
||||
"""
|
||||
self.icon_path = ':/themes/theme_new.png'
|
||||
self.icon_path = UiIcons().theme
|
||||
theme_translated = translate('OpenLP.ThemesTab', 'Themes')
|
||||
super(ThemesTab, self).__init__(parent, 'Themes', theme_translated)
|
||||
|
||||
|
@ -26,9 +26,9 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import is_macosx
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.theme import HorizontalType, BackgroundType, BackgroundGradientType
|
||||
from openlp.core.lib.ui import add_welcome_page, create_valign_selection_widgets
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.buttons import ColorButton
|
||||
from openlp.core.widgets.edits import PathEdit
|
||||
|
||||
@ -42,7 +42,7 @@ class Ui_ThemeWizard(object):
|
||||
Set up the UI
|
||||
"""
|
||||
theme_wizard.setObjectName('OpenLP.ThemeWizard')
|
||||
theme_wizard.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
theme_wizard.setWindowIcon(UiIcons().main_icon)
|
||||
theme_wizard.setModal(True)
|
||||
theme_wizard.setOptions(QtWidgets.QWizard.IndependentPages |
|
||||
QtWidgets.QWizard.NoBackButtonOnStartPage | QtWidgets.QWizard.HaveCustomButton1)
|
||||
|
@ -141,7 +141,7 @@ def get_version():
|
||||
full_version = file_path.read_text().rstrip()
|
||||
except OSError:
|
||||
log.exception('Error in version file.')
|
||||
full_version = '0.0.0-bzr000'
|
||||
full_version = '0.0.0'
|
||||
bits = full_version.split('-')
|
||||
APPLICATION_VERSION = {
|
||||
'full': full_version,
|
||||
|
@ -49,7 +49,7 @@ class ColorButton(QtWidgets.QPushButton):
|
||||
"""
|
||||
Sets the _color variable and the background color.
|
||||
|
||||
:param color: String representation of a hexidecimal color
|
||||
:param color: String representation of a hexadecimal color
|
||||
"""
|
||||
self._color = color
|
||||
self.setStyleSheet('background-color: %s' % color)
|
||||
@ -59,7 +59,7 @@ class ColorButton(QtWidgets.QPushButton):
|
||||
"""
|
||||
Property method to return the color variable
|
||||
|
||||
:return: String representation of a hexidecimal color
|
||||
:return: String representation of a hexadecimal color
|
||||
"""
|
||||
return self._color
|
||||
|
||||
@ -68,7 +68,7 @@ class ColorButton(QtWidgets.QPushButton):
|
||||
"""
|
||||
Property setter to change the instance color
|
||||
|
||||
:param color: String representation of a hexidecimal color
|
||||
:param color: String representation of a hexadecimal color
|
||||
"""
|
||||
self.change_color(color)
|
||||
|
||||
|
@ -33,6 +33,7 @@ from openlp.core.common.path import Path, path_to_str, str_to_path
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import FormattingTags, build_icon
|
||||
from openlp.core.lib.ui import create_widget_action, create_action
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.dialogs import FileDialog
|
||||
from openlp.core.widgets.enums import PathEditType
|
||||
|
||||
@ -62,7 +63,7 @@ class SearchEdit(QtWidgets.QLineEdit):
|
||||
self.settings_section = settings_section
|
||||
self._current_search_type = -1
|
||||
self.clear_button = QtWidgets.QToolButton(self)
|
||||
self.clear_button.setIcon(build_icon(':/system/clear_shortcut.png'))
|
||||
self.clear_button.setIcon(UiIcons().shortcuts)
|
||||
self.clear_button.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.clear_button.setStyleSheet('QToolButton { border: none; padding: 0px; }')
|
||||
self.clear_button.resize(18, 18)
|
||||
@ -150,7 +151,7 @@ class SearchEdit(QtWidgets.QLineEdit):
|
||||
action.placeholder_text = placeholder
|
||||
if not hasattr(self, 'menu_button'):
|
||||
self.menu_button = QtWidgets.QToolButton(self)
|
||||
self.menu_button.setIcon(build_icon(':/system/clear_shortcut.png'))
|
||||
self.menu_button.setIcon(UiIcons().shortcuts)
|
||||
self.menu_button.setCursor(QtCore.Qt.ArrowCursor)
|
||||
self.menu_button.setPopupMode(QtWidgets.QToolButton.InstantPopup)
|
||||
self.menu_button.setStyleSheet('QToolButton { border: none; padding: 0px 10px 0px 0px; }')
|
||||
@ -229,10 +230,10 @@ class PathEdit(QtWidgets.QWidget):
|
||||
self.line_edit = QtWidgets.QLineEdit(self)
|
||||
widget_layout.addWidget(self.line_edit)
|
||||
self.browse_button = QtWidgets.QToolButton(self)
|
||||
self.browse_button.setIcon(build_icon(':/general/general_open.png'))
|
||||
self.browse_button.setIcon(UiIcons().open)
|
||||
widget_layout.addWidget(self.browse_button)
|
||||
self.revert_button = QtWidgets.QToolButton(self)
|
||||
self.revert_button.setIcon(build_icon(':/general/general_revert.png'))
|
||||
self.revert_button.setIcon(UiIcons().undo)
|
||||
self.revert_button.setVisible(show_revert)
|
||||
widget_layout.addWidget(self.revert_button)
|
||||
self.setLayout(widget_layout)
|
||||
|
@ -28,6 +28,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import is_macosx
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
@ -105,8 +106,8 @@ class OpenLPWizard(QtWidgets.QWizard, RegistryProperties):
|
||||
self.with_progress_page = add_progress_page
|
||||
self.setFixedWidth(640)
|
||||
self.setObjectName(name)
|
||||
self.open_icon = build_icon(':/general/general_open.png')
|
||||
self.delete_icon = build_icon(':/general/general_delete.png')
|
||||
self.open_icon = UiIcons().open
|
||||
self.delete_icon = UiIcons().delete
|
||||
self.finish_button = self.button(QtWidgets.QWizard.FinishButton)
|
||||
self.cancel_button = self.button(QtWidgets.QWizard.CancelButton)
|
||||
self.setupUi(image)
|
||||
@ -123,7 +124,7 @@ class OpenLPWizard(QtWidgets.QWizard, RegistryProperties):
|
||||
Set up the wizard UI.
|
||||
:param image: path to start up image
|
||||
"""
|
||||
self.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
self.setWindowIcon(UiIcons().main_icon)
|
||||
self.setModal(True)
|
||||
self.setOptions(QtWidgets.QWizard.IndependentPages |
|
||||
QtWidgets.QWizard.NoBackButtonOnStartPage | QtWidgets.QWizard.NoBackButtonOnLastPage)
|
||||
@ -192,12 +193,12 @@ class OpenLPWizard(QtWidgets.QWizard, RegistryProperties):
|
||||
self.error_copy_to_button = QtWidgets.QPushButton(self.progress_page)
|
||||
self.error_copy_to_button.setObjectName('error_copy_to_button')
|
||||
self.error_copy_to_button.setHidden(True)
|
||||
self.error_copy_to_button.setIcon(build_icon(':/system/system_edit_copy.png'))
|
||||
self.error_copy_to_button.setIcon(UiIcons().copy)
|
||||
self.error_button_layout.addWidget(self.error_copy_to_button)
|
||||
self.error_save_to_button = QtWidgets.QPushButton(self.progress_page)
|
||||
self.error_save_to_button.setObjectName('error_save_to_button')
|
||||
self.error_save_to_button.setHidden(True)
|
||||
self.error_save_to_button.setIcon(build_icon(':/general/general_save.png'))
|
||||
self.error_save_to_button.setIcon(UiIcons().save)
|
||||
self.error_button_layout.addWidget(self.error_save_to_button)
|
||||
self.progress_layout.addLayout(self.error_button_layout)
|
||||
self.addPage(self.progress_page)
|
||||
|
@ -28,11 +28,12 @@ from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.core.lib import Plugin, StringContent
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.core.lib.theme import VerticalType
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.ui import AlertLocation
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.alerts.endpoint import api_alerts_endpoint, alerts_endpoint
|
||||
from openlp.plugins.alerts.forms import AlertForm
|
||||
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
|
||||
@ -138,8 +139,8 @@ class AlertsPlugin(Plugin):
|
||||
"""
|
||||
super(AlertsPlugin, self).__init__('alerts', __default_settings__, settings_tab_class=AlertsTab)
|
||||
self.weight = -3
|
||||
self.icon_path = ':/plugins/plugin_alerts.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.icon_path = UiIcons().alert
|
||||
self.icon = self.icon_path
|
||||
AlertsManager(self)
|
||||
self.manager = Manager('alerts', init_schema)
|
||||
self.alert_form = AlertForm(self)
|
||||
@ -155,7 +156,7 @@ class AlertsPlugin(Plugin):
|
||||
log.info('add tools menu')
|
||||
self.tools_alert_item = create_action(tools_menu, 'toolsAlertItem',
|
||||
text=translate('AlertsPlugin', '&Alert'),
|
||||
icon=':/plugins/plugin_alerts.png',
|
||||
icon=UiIcons().alert,
|
||||
statustip=translate('AlertsPlugin', 'Show an alert message.'),
|
||||
visible=False, can_shortcuts=True, triggers=self.on_alerts_trigger)
|
||||
self.main_window.tools_menu.addAction(self.tools_alert_item)
|
||||
|
@ -23,7 +23,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class Ui_AlertDialog(object):
|
||||
"""
|
||||
alert_dialog.setObjectName('alert_dialog')
|
||||
alert_dialog.resize(400, 300)
|
||||
alert_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
alert_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
self.alert_dialog_layout = QtWidgets.QGridLayout(alert_dialog)
|
||||
self.alert_dialog_layout.setObjectName('alert_dialog_layout')
|
||||
self.alert_text_layout = QtWidgets.QFormLayout()
|
||||
@ -64,12 +64,12 @@ class Ui_AlertDialog(object):
|
||||
self.manage_button_layout = QtWidgets.QVBoxLayout()
|
||||
self.manage_button_layout.setObjectName('manage_button_layout')
|
||||
self.new_button = QtWidgets.QPushButton(alert_dialog)
|
||||
self.new_button.setIcon(build_icon(':/general/general_new.png'))
|
||||
self.new_button.setIcon(UiIcons().new)
|
||||
self.new_button.setObjectName('new_button')
|
||||
self.manage_button_layout.addWidget(self.new_button)
|
||||
self.save_button = QtWidgets.QPushButton(alert_dialog)
|
||||
self.save_button.setEnabled(False)
|
||||
self.save_button.setIcon(build_icon(':/general/general_save.png'))
|
||||
self.save_button.setIcon(UiIcons().save)
|
||||
self.save_button.setObjectName('save_button')
|
||||
self.manage_button_layout.addWidget(self.save_button)
|
||||
self.delete_button = create_button(alert_dialog, 'delete_button', role='delete', enabled=False,
|
||||
@ -77,9 +77,8 @@ class Ui_AlertDialog(object):
|
||||
self.manage_button_layout.addWidget(self.delete_button)
|
||||
self.manage_button_layout.addStretch()
|
||||
self.alert_dialog_layout.addLayout(self.manage_button_layout, 1, 1)
|
||||
display_icon = build_icon(':/general/general_live.png')
|
||||
self.display_button = create_button(alert_dialog, 'display_button', icon=display_icon, enabled=False)
|
||||
self.display_close_button = create_button(alert_dialog, 'display_close_button', icon=display_icon,
|
||||
self.display_button = create_button(alert_dialog, 'display_button', icon=UiIcons().live, enabled=False)
|
||||
self.display_close_button = create_button(alert_dialog, 'display_close_button', icon=UiIcons().live,
|
||||
enabled=False)
|
||||
self.button_box = create_button_box(alert_dialog, 'button_box', ['close'],
|
||||
[self.display_button, self.display_close_button])
|
||||
|
@ -25,6 +25,7 @@ import logging
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.plugins.bibles.endpoint import api_bibles_endpoint, bibles_endpoint
|
||||
@ -74,8 +75,8 @@ class BiblePlugin(Plugin):
|
||||
def __init__(self):
|
||||
super(BiblePlugin, self).__init__('bibles', __default_settings__, BibleMediaItem, BiblesTab)
|
||||
self.weight = -9
|
||||
self.icon_path = ':/plugins/plugin_bibles.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.icon_path = UiIcons().bible
|
||||
self.icon = UiIcons().bible
|
||||
self.manager = BibleManager(self)
|
||||
register_endpoint(bibles_endpoint)
|
||||
register_endpoint(api_bibles_endpoint)
|
||||
|
@ -23,14 +23,14 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_BookNameDialog(object):
|
||||
def setupUi(self, book_name_dialog):
|
||||
book_name_dialog.setObjectName('book_name_dialog')
|
||||
book_name_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
book_name_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
book_name_dialog.resize(400, 271)
|
||||
self.book_name_layout = QtWidgets.QVBoxLayout(book_name_dialog)
|
||||
self.book_name_layout.setSpacing(8)
|
||||
|
@ -23,16 +23,16 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.plugins.bibles.lib import LanguageSelection, BibleStrings
|
||||
from openlp.plugins.bibles.lib.db import BiblesResourcesDB
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_EditBibleDialog(object):
|
||||
def setupUi(self, edit_bible_dialog):
|
||||
edit_bible_dialog.setObjectName('edit_bible_dialog')
|
||||
edit_bible_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
edit_bible_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
edit_bible_dialog.resize(520, 400)
|
||||
edit_bible_dialog.setModal(True)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(edit_bible_dialog)
|
||||
|
@ -23,14 +23,14 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_LanguageDialog(object):
|
||||
def setupUi(self, language_dialog):
|
||||
language_dialog.setObjectName('language_dialog')
|
||||
language_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
language_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
language_dialog.resize(400, 165)
|
||||
self.language_layout = QtWidgets.QVBoxLayout(language_dialog)
|
||||
self.language_layout.setSpacing(8)
|
||||
|
@ -31,7 +31,8 @@ from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import MediaManagerItem, ItemCapabilities, ServiceItemContext
|
||||
from openlp.core.lib.ui import set_case_insensitive_completer, create_horizontal_adjusting_combo_box, \
|
||||
critical_error_message_box, find_and_set_in_combo_box, build_icon
|
||||
critical_error_message_box, find_and_set_in_combo_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import SearchEdit
|
||||
from openlp.plugins.bibles.forms.bibleimportform import BibleImportForm
|
||||
from openlp.plugins.bibles.forms.editbibleform import EditBibleForm
|
||||
@ -104,9 +105,9 @@ class BibleMediaItem(MediaManagerItem):
|
||||
:param args: Positional arguments to pass to the super method. (tuple)
|
||||
:param kwargs: Keyword arguments to pass to the super method. (dict)
|
||||
"""
|
||||
self.clear_icon = build_icon(':/bibles/bibles_search_clear.png')
|
||||
self.save_results_icon = build_icon(':/bibles/bibles_save_results.png')
|
||||
self.sort_icon = build_icon(':/bibles/bibles_book_sort.png')
|
||||
self.clear_icon = UiIcons().square
|
||||
self.save_results_icon = UiIcons.save
|
||||
self.sort_icon = UiIcons().sort
|
||||
self.bible = None
|
||||
self.second_bible = None
|
||||
self.saved_results = []
|
||||
@ -314,13 +315,13 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.plugin.manager.media = self
|
||||
self.populate_bible_combo_boxes()
|
||||
self.search_edit.set_search_types([
|
||||
(BibleSearch.Combined, ':/bibles/bibles_search_combined.png',
|
||||
(BibleSearch.Combined, UiIcons().search_comb,
|
||||
translate('BiblesPlugin.MediaItem', 'Text or Reference'),
|
||||
translate('BiblesPlugin.MediaItem', 'Text or Reference...')),
|
||||
(BibleSearch.Reference, ':/bibles/bibles_search_reference.png',
|
||||
(BibleSearch.Reference, UiIcons().search_ref,
|
||||
translate('BiblesPlugin.MediaItem', 'Scripture Reference'),
|
||||
translate('BiblesPlugin.MediaItem', 'Search Scripture Reference...')),
|
||||
(BibleSearch.Text, ':/bibles/bibles_search_text.png',
|
||||
(BibleSearch.Text, UiIcons().text,
|
||||
translate('BiblesPlugin.MediaItem', 'Text Search'),
|
||||
translate('BiblesPlugin.MediaItem', 'Search Text...'))
|
||||
])
|
||||
|
@ -28,6 +28,7 @@ import logging
|
||||
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.plugins.custom.endpoint import api_custom_endpoint, custom_endpoint
|
||||
@ -62,7 +63,7 @@ class CustomPlugin(Plugin):
|
||||
super(CustomPlugin, self).__init__('custom', __default_settings__, CustomMediaItem, CustomTab)
|
||||
self.weight = -5
|
||||
self.db_manager = Manager('custom', init_schema)
|
||||
self.icon_path = ':/plugins/plugin_custom.png'
|
||||
self.icon_path = UiIcons().clone
|
||||
self.icon = build_icon(self.icon_path)
|
||||
register_endpoint(custom_endpoint)
|
||||
register_endpoint(api_custom_endpoint)
|
||||
|
@ -22,8 +22,8 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box, create_button
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_CustomEditDialog(object):
|
||||
@ -33,7 +33,7 @@ class Ui_CustomEditDialog(object):
|
||||
:param custom_edit_dialog: The Dialog
|
||||
"""
|
||||
custom_edit_dialog.setObjectName('custom_edit_dialog')
|
||||
custom_edit_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
custom_edit_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
custom_edit_dialog.resize(450, 350)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(custom_edit_dialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -23,23 +23,22 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button, create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import SpellTextEdit
|
||||
|
||||
|
||||
class Ui_CustomSlideEditDialog(object):
|
||||
def setupUi(self, custom_slide_edit_dialog):
|
||||
custom_slide_edit_dialog.setObjectName('custom_slide_edit_dialog')
|
||||
custom_slide_edit_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
custom_slide_edit_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
custom_slide_edit_dialog.resize(350, 300)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(custom_slide_edit_dialog)
|
||||
self.slide_text_edit = SpellTextEdit(self)
|
||||
self.slide_text_edit.setObjectName('slide_text_edit')
|
||||
self.dialog_layout.addWidget(self.slide_text_edit)
|
||||
self.split_button = create_button(custom_slide_edit_dialog, 'splitButton', icon=':/general/general_add.png')
|
||||
self.insert_button = create_button(custom_slide_edit_dialog, 'insertButton',
|
||||
icon=':/general/general_add.png')
|
||||
self.split_button = create_button(custom_slide_edit_dialog, 'splitButton', icon=UiIcons().add)
|
||||
self.insert_button = create_button(custom_slide_edit_dialog, 'insertButton', icon=UiIcons().add)
|
||||
self.button_box = create_button_box(custom_slide_edit_dialog, 'button_box', ['cancel', 'save'],
|
||||
[self.split_button, self.insert_button])
|
||||
self.dialog_layout.addWidget(self.button_box)
|
||||
|
@ -31,6 +31,7 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import MediaManagerItem, ItemCapabilities, ServiceItemContext, PluginStatus, \
|
||||
check_item_selected
|
||||
from openlp.core.lib.ui import create_widget_action
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.custom.forms.editcustomform import EditCustomForm
|
||||
from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder
|
||||
from openlp.plugins.custom.lib.db import CustomSlide
|
||||
@ -88,7 +89,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
def add_custom_context_actions(self):
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(
|
||||
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=':/general/general_clone.png',
|
||||
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=UiIcons().clone,
|
||||
triggers=self.on_clone_click)
|
||||
|
||||
def config_update(self):
|
||||
@ -111,9 +112,9 @@ class CustomMediaItem(MediaManagerItem):
|
||||
Initialise the UI so it can provide Searches
|
||||
"""
|
||||
self.search_text_edit.set_search_types(
|
||||
[(CustomSearch.Titles, ':/songs/song_search_title.png', translate('SongsPlugin.MediaItem', 'Titles'),
|
||||
[(CustomSearch.Titles, UiIcons().search, translate('SongsPlugin.MediaItem', 'Titles'),
|
||||
translate('SongsPlugin.MediaItem', 'Search Titles...')),
|
||||
(CustomSearch.Themes, ':/slides/slide_theme.png', UiStrings().Themes, UiStrings().SearchThemes)])
|
||||
(CustomSearch.Themes, UiIcons().theme, UiStrings().Themes, UiStrings().SearchThemes)])
|
||||
self.load_list(self.plugin.db_manager.get_all_objects(CustomSlide, order_by_ref=CustomSlide.title))
|
||||
self.config_update()
|
||||
|
||||
|
@ -26,6 +26,7 @@ from PyQt5 import QtGui
|
||||
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import Plugin, StringContent, ImageSource, build_icon
|
||||
from openlp.core.lib.db import Manager
|
||||
@ -53,7 +54,7 @@ class ImagePlugin(Plugin):
|
||||
super(ImagePlugin, self).__init__('images', __default_settings__, ImageMediaItem, ImageTab)
|
||||
self.manager = Manager('images', init_schema, upgrade_mod=upgrade)
|
||||
self.weight = -7
|
||||
self.icon_path = ':/plugins/plugin_images.png'
|
||||
self.icon_path = UiIcons().picture
|
||||
self.icon = build_icon(self.icon_path)
|
||||
register_endpoint(images_endpoint)
|
||||
register_endpoint(api_images_endpoint)
|
||||
|
@ -33,6 +33,7 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import ItemCapabilities, MediaManagerItem, ServiceItemContext, StringContent, build_icon, \
|
||||
check_item_selected, create_thumb, validate_thumb
|
||||
from openlp.core.lib.ui import create_widget_action, critical_error_message_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.views import TreeWidgetWithDnD
|
||||
from openlp.plugins.images.forms import AddGroupForm, ChooseGroupForm
|
||||
from openlp.plugins.images.lib.db import ImageFilenames, ImageGroups
|
||||
@ -127,21 +128,21 @@ class ImageMediaItem(MediaManagerItem):
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
text=self.plugin.get_string(StringContent.Edit)['title'],
|
||||
icon=':/general/general_edit.png',
|
||||
icon=UiIcons().edit,
|
||||
triggers=self.on_edit_click)
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
'listView{name}{preview}Item'.format(name=self.plugin.name.title(), preview=StringContent.Preview.title()),
|
||||
text=self.plugin.get_string(StringContent.Preview)['title'],
|
||||
icon=':/general/general_preview.png',
|
||||
icon=UiIcons().preview,
|
||||
can_shortcuts=True,
|
||||
triggers=self.on_preview_click)
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
'listView{name}{live}Item'.format(name=self.plugin.name.title(), live=StringContent.Live.title()),
|
||||
text=self.plugin.get_string(StringContent.Live)['title'],
|
||||
icon=':/general/general_live.png',
|
||||
icon=UiIcons().live,
|
||||
can_shortcuts=True,
|
||||
triggers=self.on_live_click)
|
||||
create_widget_action(
|
||||
@ -149,14 +150,14 @@ class ImageMediaItem(MediaManagerItem):
|
||||
'listView{name}{service}Item'.format(name=self.plugin.name.title(), service=StringContent.Service.title()),
|
||||
can_shortcuts=True,
|
||||
text=self.plugin.get_string(StringContent.Service)['title'],
|
||||
icon=':/general/general_add.png',
|
||||
icon=UiIcons().add,
|
||||
triggers=self.on_add_click)
|
||||
if self.add_to_service_item:
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
text=translate('OpenLP.MediaManagerItem', '&Add to selected Service Item'),
|
||||
icon=':/general/general_add.png',
|
||||
icon=UiIcons().add,
|
||||
triggers=self.on_add_edit_click)
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
if self.has_delete_icon:
|
||||
@ -164,7 +165,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
self.list_view,
|
||||
'listView{name}{delete}Item'.format(name=self.plugin.name.title(), delete=StringContent.Delete.title()),
|
||||
text=self.plugin.get_string(StringContent.Delete)['title'],
|
||||
icon=':/general/general_delete.png',
|
||||
icon=UiIcons().delete,
|
||||
can_shortcuts=True, triggers=self.on_delete_click)
|
||||
self.add_custom_context_actions()
|
||||
# Create the context menu and add all actions from the list_view.
|
||||
@ -182,17 +183,16 @@ class ImageMediaItem(MediaManagerItem):
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
text=UiStrings().AddGroup, icon=':/images/image_new_group.png', triggers=self.on_add_group_click)
|
||||
text=UiStrings().AddGroup, icon=UiIcons().group, triggers=self.on_add_group_click)
|
||||
create_widget_action(
|
||||
self.list_view,
|
||||
text=translate('ImagePlugin', 'Add new image(s)'),
|
||||
icon=':/general/general_open.png', triggers=self.on_file_click)
|
||||
icon=UiIcons().open, triggers=self.on_file_click)
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
self.replace_action_context = create_widget_action(
|
||||
self.list_view, text=UiStrings().ReplaceBG, icon=':/slides/slide_theme.png',
|
||||
triggers=self.on_replace_click)
|
||||
self.list_view, text=UiStrings().ReplaceBG, icon=UiIcons().theme, triggers=self.on_replace_click)
|
||||
self.reset_action_context = create_widget_action(
|
||||
self.list_view, text=UiStrings().ReplaceLiveBG, icon=':/system/system_close.png',
|
||||
self.list_view, text=UiStrings().ReplaceLiveBG, icon=UiIcons().close,
|
||||
visible=False, triggers=self.on_reset_click)
|
||||
|
||||
def add_start_header_bar(self):
|
||||
@ -200,7 +200,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
Add custom buttons to the start of the toolbar.
|
||||
"""
|
||||
self.add_group_action = self.toolbar.add_toolbar_action('add_group_action',
|
||||
icon=':/images/image_new_group.png',
|
||||
icon=UiIcons().group,
|
||||
triggers=self.on_add_group_click)
|
||||
|
||||
def add_end_header_bar(self):
|
||||
@ -208,10 +208,10 @@ class ImageMediaItem(MediaManagerItem):
|
||||
Add custom buttons to the end of the toolbar
|
||||
"""
|
||||
self.replace_action = self.toolbar.add_toolbar_action('replace_action',
|
||||
icon=':/slides/slide_theme.png',
|
||||
icon=UiIcons().theme,
|
||||
triggers=self.on_replace_click)
|
||||
self.reset_action = self.toolbar.add_toolbar_action('reset_action',
|
||||
icon=':/system/system_close.png',
|
||||
icon=UiIcons().close,
|
||||
visible=False, triggers=self.on_reset_click)
|
||||
|
||||
def recursively_delete_group(self, image_group):
|
||||
@ -282,7 +282,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
"""
|
||||
image_groups = self.manager.get_all_objects(ImageGroups, ImageGroups.parent_id == parent_group_id)
|
||||
image_groups.sort(key=lambda group_object: get_natural_key(group_object.group_name))
|
||||
folder_icon = build_icon(':/images/image_group.png')
|
||||
folder_icon = UiIcons().group
|
||||
for image_group in image_groups:
|
||||
group = QtWidgets.QTreeWidgetItem()
|
||||
group.setText(0, image_group.group_name)
|
||||
@ -371,7 +371,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
file_name = image.file_path.name
|
||||
thumbnail_path = self.generate_thumbnail_path(image)
|
||||
if not image.file_path.exists():
|
||||
icon = build_icon(':/general/general_delete.png')
|
||||
icon = UiIcons().delete
|
||||
else:
|
||||
if validate_thumb(image.file_path, thumbnail_path):
|
||||
icon = build_icon(thumbnail_path)
|
||||
|
@ -24,7 +24,7 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_MediaClipSelector(object):
|
||||
@ -106,7 +106,7 @@ class Ui_MediaClipSelector(object):
|
||||
self.controls_layout = QtWidgets.QHBoxLayout()
|
||||
self.controls_layout.setObjectName('controls_layout')
|
||||
self.play_button = QtWidgets.QToolButton(media_clip_selector)
|
||||
self.play_button.setIcon(build_icon(':/slides/media_playback_start.png'))
|
||||
self.play_button.setIcon(UiIcons().play)
|
||||
self.play_button.setObjectName('play_button')
|
||||
self.controls_layout.addWidget(self.play_button)
|
||||
self.position_slider = QtWidgets.QSlider(media_clip_selector)
|
||||
|
@ -25,13 +25,14 @@ import re
|
||||
from datetime import datetime
|
||||
from time import sleep
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common import is_win, is_linux, is_macosx
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.mixins import RegistryProperties
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.ui.media.vlcplayer import get_vlc
|
||||
from openlp.plugins.media.forms.mediaclipselectordialog import Ui_MediaClipSelector
|
||||
|
||||
@ -66,12 +67,8 @@ class MediaClipSelectorForm(QtWidgets.QDialog, Ui_MediaClipSelector, RegistryPro
|
||||
self.media_item = media_item
|
||||
self.setupUi(self)
|
||||
# setup play/pause icon
|
||||
self.play_icon = QtGui.QIcon()
|
||||
self.play_icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_start.png"), QtGui.QIcon.Normal,
|
||||
QtGui.QIcon.Off)
|
||||
self.pause_icon = QtGui.QIcon()
|
||||
self.pause_icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_pause.png"), QtGui.QIcon.Normal,
|
||||
QtGui.QIcon.Off)
|
||||
self.play_icon = UiIcons().play
|
||||
self.pause_icon = UiIcons().pause
|
||||
|
||||
def reject(self):
|
||||
"""
|
||||
|
@ -32,9 +32,10 @@ from openlp.core.common.path import Path, path_to_str, create_paths
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import ItemCapabilities, MediaManagerItem, MediaType, ServiceItem, ServiceItemContext, \
|
||||
build_icon, check_item_selected
|
||||
check_item_selected
|
||||
from openlp.core.lib.ui import create_widget_action, critical_error_message_box, create_horizontal_adjusting_combo_box
|
||||
from openlp.core.ui import DisplayControllerType
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.ui.media import get_media_players, set_media_players, parse_optical_path, format_milliseconds
|
||||
from openlp.core.ui.media.vlcplayer import get_vlc
|
||||
|
||||
@ -45,7 +46,7 @@ if get_vlc() is not None:
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
CLAPPERBOARD = ':/media/slidecontroller_multimedia.png'
|
||||
CLAPPERBOARD = UiIcons().clapperboard
|
||||
|
||||
|
||||
class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
@ -67,10 +68,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
self.icon_path = 'images/image'
|
||||
self.background = False
|
||||
self.automatic = ''
|
||||
self.optical_icon = build_icon(':/media/media_optical.png')
|
||||
self.video_icon = build_icon(':/media/media_video.png')
|
||||
self.audio_icon = build_icon(':/media/media_audio.png')
|
||||
self.error_icon = build_icon(':/general/general_delete.png')
|
||||
self.error_icon = UiIcons().delete
|
||||
|
||||
def setup_item(self):
|
||||
"""
|
||||
@ -137,7 +135,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
optical_button_text = translate('MediaPlugin.MediaItem', 'Load CD/DVD')
|
||||
optical_button_tooltip = translate('MediaPlugin.MediaItem',
|
||||
'CD/DVD playback is only supported if VLC is installed and enabled.')
|
||||
self.load_optical = self.toolbar.add_toolbar_action('load_optical', icon=self.optical_icon,
|
||||
self.load_optical = self.toolbar.add_toolbar_action('load_optical', icon=UiIcons().optical,
|
||||
text=optical_button_text,
|
||||
tooltip=optical_button_tooltip,
|
||||
triggers=self.on_load_optical)
|
||||
@ -149,13 +147,13 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
Adds buttons to the end of the header bar.
|
||||
"""
|
||||
# Replace backgrounds do not work at present so remove functionality.
|
||||
self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=':/slides/slide_theme.png',
|
||||
self.replace_action = self.toolbar.add_toolbar_action('replace_action', icon=UiIcons().theme,
|
||||
triggers=self.on_replace_click)
|
||||
if 'webkit' not in get_media_players()[0]:
|
||||
self.replace_action.setDisabled(True)
|
||||
if hasattr(self, 'replace_action_context'):
|
||||
self.replace_action_context.setDisabled(True)
|
||||
self.reset_action = self.toolbar.add_toolbar_action('reset_action', icon=':/system/system_close.png',
|
||||
self.reset_action = self.toolbar.add_toolbar_action('reset_action', icon=UiIcons().close,
|
||||
visible=False, triggers=self.on_reset_click)
|
||||
self.media_widget = QtWidgets.QWidget(self)
|
||||
self.media_widget.setObjectName('media_widget')
|
||||
@ -179,7 +177,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
self.list_view, text=UiStrings().ReplaceBG, icon=':/slides/slide_theme.png',
|
||||
triggers=self.on_replace_click)
|
||||
self.reset_action_context = create_widget_action(
|
||||
self.list_view, text=UiStrings().ReplaceLiveBG, icon=':/system/system_close.png',
|
||||
self.list_view, text=UiStrings().ReplaceLiveBG, icon=UiIcons().close,
|
||||
visible=False, triggers=self.on_reset_click)
|
||||
|
||||
@staticmethod
|
||||
@ -369,7 +367,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
# Handle optical based item
|
||||
(file_name, title, audio_track, subtitle_track, start, end, clip_name) = parse_optical_path(track)
|
||||
item_name = QtWidgets.QListWidgetItem(clip_name)
|
||||
item_name.setIcon(self.optical_icon)
|
||||
item_name.setIcon(UiIcons().optical)
|
||||
item_name.setData(QtCore.Qt.UserRole, track)
|
||||
item_name.setToolTip('{name}@{start}-{end}'.format(name=file_name,
|
||||
start=format_milliseconds(start),
|
||||
@ -378,7 +376,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
# File doesn't exist, mark as error.
|
||||
file_name = os.path.split(str(track))[1]
|
||||
item_name = QtWidgets.QListWidgetItem(file_name)
|
||||
item_name.setIcon(self.error_icon)
|
||||
item_name.setIcon(UiIcons().error)
|
||||
item_name.setData(QtCore.Qt.UserRole, track)
|
||||
item_name.setToolTip(track)
|
||||
elif track_info.isFile():
|
||||
@ -387,9 +385,9 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
item_name = QtWidgets.QListWidgetItem(file_name)
|
||||
search = file_name.split('.')[-1].lower()
|
||||
if '*.{text}'.format(text=search) in self.media_controller.audio_extensions_list:
|
||||
item_name.setIcon(self.audio_icon)
|
||||
item_name.setIcon(UiIcons().audio)
|
||||
else:
|
||||
item_name.setIcon(self.video_icon)
|
||||
item_name.setIcon(UiIcons().video)
|
||||
item_name.setData(QtCore.Qt.UserRole, track)
|
||||
item_name.setToolTip(track)
|
||||
if item_name:
|
||||
|
@ -31,6 +31,7 @@ from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common import check_binary_exists
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.path import Path
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.plugins.media.endpoint import api_media_endpoint, media_endpoint
|
||||
@ -56,7 +57,7 @@ class MediaPlugin(Plugin):
|
||||
def __init__(self):
|
||||
super(MediaPlugin, self).__init__('media', __default_settings__, MediaMediaItem)
|
||||
self.weight = -6
|
||||
self.icon_path = ':/plugins/plugin_media.png'
|
||||
self.icon_path = UiIcons().video
|
||||
self.icon = build_icon(self.icon_path)
|
||||
# passed with drag and drop messages
|
||||
self.dnd_id = 'Media'
|
||||
|
@ -30,15 +30,13 @@ from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import MediaManagerItem, ItemCapabilities, ServiceItemContext, \
|
||||
build_icon, check_item_selected, create_thumb, validate_thumb
|
||||
from openlp.core.lib.ui import critical_error_message_box, create_horizontal_adjusting_combo_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.presentations.lib import MessageListener
|
||||
from openlp.plugins.presentations.lib.pdfcontroller import PDF_CONTROLLER_FILETYPES
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
ERROR_IMAGE = QtGui.QImage(':/general/general_delete.png')
|
||||
|
||||
|
||||
class PresentationMediaItem(MediaManagerItem):
|
||||
"""
|
||||
This is the Presentation media manager item for Presentation Items. It can present files using Openoffice and
|
||||
@ -174,7 +172,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
file_name = file_path.name
|
||||
if not file_path.exists():
|
||||
item_name = QtWidgets.QListWidgetItem(file_name)
|
||||
item_name.setIcon(build_icon(ERROR_IMAGE))
|
||||
item_name.setIcon(UiIcons().delete)
|
||||
item_name.setData(QtCore.Qt.UserRole, path_to_str(file_path))
|
||||
item_name.setToolTip(str(file_path))
|
||||
self.list_view.addItem(item_name)
|
||||
@ -196,7 +194,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
preview_path = doc.get_thumbnail_path(1, True)
|
||||
doc.close_presentation()
|
||||
if not (preview_path and preview_path.exists()):
|
||||
icon = build_icon(':/general/general_delete.png')
|
||||
icon = UiIcons().delete
|
||||
else:
|
||||
if validate_thumb(preview_path, thumbnail_path):
|
||||
icon = build_icon(thumbnail_path)
|
||||
@ -204,7 +202,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
icon = create_thumb(preview_path, thumbnail_path)
|
||||
else:
|
||||
if initial_load:
|
||||
icon = build_icon(':/general/general_delete.png')
|
||||
icon = UiIcons().delete
|
||||
else:
|
||||
critical_error_message_box(UiStrings().UnsupportedFile,
|
||||
translate('PresentationPlugin.MediaItem',
|
||||
|
@ -347,7 +347,7 @@ class MessageListener(object):
|
||||
# Some of the original serviceitem attributes is needed in the new serviceitem
|
||||
item.footer = item_cpy.footer
|
||||
item.from_service = item_cpy.from_service
|
||||
item.iconic_representation = item_cpy.iconic_representation
|
||||
item.iconic_representation = item_cpy.icon
|
||||
item.image_border = item_cpy.image_border
|
||||
item.main = item_cpy.main
|
||||
item.theme_data = item_cpy.theme_data
|
||||
|
@ -31,6 +31,7 @@ from PyQt5 import QtCore
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common import extension_loader
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.plugins.presentations.endpoint import api_presentations_endpoint, presentations_endpoint
|
||||
@ -68,7 +69,7 @@ class PresentationPlugin(Plugin):
|
||||
self.controllers = {}
|
||||
Plugin.__init__(self, 'presentations', __default_settings__, __default_settings__)
|
||||
self.weight = -8
|
||||
self.icon_path = ':/plugins/plugin_presentations.png'
|
||||
self.icon_path = UiIcons().presentation
|
||||
self.icon = build_icon(self.icon_path)
|
||||
register_endpoint(presentations_endpoint)
|
||||
register_endpoint(api_presentations_endpoint)
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_AuthorsDialog(object):
|
||||
@ -37,7 +37,7 @@ class Ui_AuthorsDialog(object):
|
||||
Set up the UI for the dialog.
|
||||
"""
|
||||
authors_dialog.setObjectName('authors_dialog')
|
||||
authors_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
authors_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
authors_dialog.resize(300, 10)
|
||||
authors_dialog.setModal(True)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(authors_dialog)
|
||||
|
@ -23,9 +23,9 @@
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box, create_button
|
||||
from openlp.core.ui import SingleColumnTableWidget
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.songs.lib.ui import SongStrings
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ class Ui_EditSongDialog(object):
|
||||
"""
|
||||
def setupUi(self, edit_song_dialog):
|
||||
edit_song_dialog.setObjectName('edit_song_dialog')
|
||||
edit_song_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
edit_song_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
edit_song_dialog.resize(900, 600)
|
||||
edit_song_dialog.setModal(True)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(edit_song_dialog)
|
||||
|
@ -24,8 +24,8 @@ from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import SpellTextEdit
|
||||
from openlp.plugins.songs.lib import VerseType
|
||||
|
||||
@ -33,7 +33,7 @@ from openlp.plugins.songs.lib import VerseType
|
||||
class Ui_EditVerseDialog(object):
|
||||
def setupUi(self, edit_verse_dialog):
|
||||
edit_verse_dialog.setObjectName('edit_verse_dialog')
|
||||
edit_verse_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
edit_verse_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
edit_verse_dialog.resize(400, 400)
|
||||
edit_verse_dialog.setModal(True)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(edit_verse_dialog)
|
||||
@ -44,11 +44,11 @@ class Ui_EditVerseDialog(object):
|
||||
self.verse_type_layout = QtWidgets.QHBoxLayout()
|
||||
self.verse_type_layout.setObjectName('verse_type_layout')
|
||||
self.forced_split_button = QtWidgets.QPushButton(edit_verse_dialog)
|
||||
self.forced_split_button.setIcon(build_icon(':/general/general_add.png'))
|
||||
self.forced_split_button.setIcon(UiIcons().add)
|
||||
self.forced_split_button.setObjectName('forced_split_button')
|
||||
self.verse_type_layout.addWidget(self.forced_split_button)
|
||||
self.overflow_split_button = QtWidgets.QPushButton(edit_verse_dialog)
|
||||
self.overflow_split_button.setIcon(build_icon(':/general/general_add.png'))
|
||||
self.overflow_split_button.setIcon(UiIcons().add)
|
||||
self.overflow_split_button.setObjectName('overflow_split_button')
|
||||
self.verse_type_layout.addWidget(self.overflow_split_button)
|
||||
self.verse_type_label = QtWidgets.QLabel(edit_verse_dialog)
|
||||
@ -64,7 +64,7 @@ class Ui_EditVerseDialog(object):
|
||||
self.verse_number_box.setObjectName('verse_number_box')
|
||||
self.verse_type_layout.addWidget(self.verse_number_box)
|
||||
self.insert_button = QtWidgets.QPushButton(edit_verse_dialog)
|
||||
self.insert_button.setIcon(build_icon(':/general/general_add.png'))
|
||||
self.insert_button.setIcon(UiIcons().add)
|
||||
self.insert_button.setObjectName('insert_button')
|
||||
self.verse_type_layout.addWidget(self.insert_button)
|
||||
self.verse_type_layout.addStretch()
|
||||
@ -76,11 +76,11 @@ class Ui_EditVerseDialog(object):
|
||||
self.transpose_label.setObjectName('transpose_label')
|
||||
self.transpose_layout.addWidget(self.transpose_label)
|
||||
self.transpose_up_button = QtWidgets.QPushButton(edit_verse_dialog)
|
||||
self.transpose_up_button.setIcon(build_icon(':/services/service_up.png'))
|
||||
self.transpose_up_button.setIcon(UiIcons().arrow_up)
|
||||
self.transpose_up_button.setObjectName('transpose_up')
|
||||
self.transpose_layout.addWidget(self.transpose_up_button)
|
||||
self.transpose_down_button = QtWidgets.QPushButton(edit_verse_dialog)
|
||||
self.transpose_down_button.setIcon(build_icon(':/services/service_down.png'))
|
||||
self.transpose_down_button.setIcon(UiIcons().arrow_down)
|
||||
self.transpose_down_button.setObjectName('transpose_down')
|
||||
self.transpose_layout.addWidget(self.transpose_down_button)
|
||||
self.dialog_layout.addLayout(self.transpose_layout)
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_MediaFilesDialog(object):
|
||||
@ -36,7 +36,7 @@ class Ui_MediaFilesDialog(object):
|
||||
Set up the user interface.
|
||||
"""
|
||||
media_files_dialog.setObjectName('media_files_dialog')
|
||||
media_files_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
media_files_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
media_files_dialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
media_files_dialog.resize(400, 300)
|
||||
media_files_dialog.setModal(True)
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_SongBookDialog(object):
|
||||
@ -36,7 +36,7 @@ class Ui_SongBookDialog(object):
|
||||
Set up the user interface.
|
||||
"""
|
||||
song_book_dialog.setObjectName('song_book_dialog')
|
||||
song_book_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
song_book_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
song_book_dialog.resize(300, 10)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(song_book_dialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import UiStrings
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.songs.lib.ui import SongStrings
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ class Ui_SongMaintenanceDialog(object):
|
||||
Set up the user interface for the song maintenance dialog
|
||||
"""
|
||||
song_maintenance_dialog.setObjectName('song_maintenance_dialog')
|
||||
song_maintenance_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
song_maintenance_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
song_maintenance_dialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
song_maintenance_dialog.resize(600, 600)
|
||||
self.dialog_layout = QtWidgets.QGridLayout(song_maintenance_dialog)
|
||||
@ -47,11 +47,11 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.type_list_widget.setUniformItemSizes(True)
|
||||
self.type_list_widget.setObjectName('type_list_widget')
|
||||
self.authors_list_item = QtWidgets.QListWidgetItem(self.type_list_widget)
|
||||
self.authors_list_item.setIcon(build_icon(':/songs/author_maintenance.png'))
|
||||
self.authors_list_item.setIcon(UiIcons().usermo)
|
||||
self.topics_list_item = QtWidgets.QListWidgetItem(self.type_list_widget)
|
||||
self.topics_list_item.setIcon(build_icon(':/songs/topic_maintenance.png'))
|
||||
self.topics_list_item.setIcon(UiIcons().light_bulb)
|
||||
self.books_list_item = QtWidgets.QListWidgetItem(self.type_list_widget)
|
||||
self.books_list_item.setIcon(build_icon(':/songs/book_maintenance.png'))
|
||||
self.books_list_item.setIcon(UiIcons().book)
|
||||
self.dialog_layout.addWidget(self.type_list_widget, 0, 0)
|
||||
self.stacked_layout = QtWidgets.QStackedLayout()
|
||||
self.stacked_layout.setObjectName('stacked_layout')
|
||||
@ -67,15 +67,15 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.authors_buttons_layout.setObjectName('authors_buttons_layout')
|
||||
self.authors_buttons_layout.addStretch()
|
||||
self.add_author_button = QtWidgets.QPushButton(self.authors_page)
|
||||
self.add_author_button.setIcon(build_icon(':/songs/author_add.png'))
|
||||
self.add_author_button.setIcon(UiIcons().add)
|
||||
self.add_author_button.setObjectName('add_author_button')
|
||||
self.authors_buttons_layout.addWidget(self.add_author_button)
|
||||
self.edit_author_button = QtWidgets.QPushButton(self.authors_page)
|
||||
self.edit_author_button.setIcon(build_icon(':/songs/author_edit.png'))
|
||||
self.edit_author_button.setIcon(UiIcons().edit)
|
||||
self.edit_author_button.setObjectName('edit_author_button')
|
||||
self.authors_buttons_layout.addWidget(self.edit_author_button)
|
||||
self.delete_author_button = QtWidgets.QPushButton(self.authors_page)
|
||||
self.delete_author_button.setIcon(build_icon(':/songs/author_delete.png'))
|
||||
self.delete_author_button.setIcon(UiIcons().delete)
|
||||
self.delete_author_button.setObjectName('delete_author_button')
|
||||
self.authors_buttons_layout.addWidget(self.delete_author_button)
|
||||
self.authors_layout.addLayout(self.authors_buttons_layout)
|
||||
@ -92,15 +92,15 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.topics_buttons_layout.setObjectName('topicsButtonLayout')
|
||||
self.topics_buttons_layout.addStretch()
|
||||
self.add_topic_button = QtWidgets.QPushButton(self.topics_page)
|
||||
self.add_topic_button.setIcon(build_icon(':/songs/topic_add.png'))
|
||||
self.add_topic_button.setIcon(UiIcons().add)
|
||||
self.add_topic_button.setObjectName('add_topic_button')
|
||||
self.topics_buttons_layout.addWidget(self.add_topic_button)
|
||||
self.edit_topic_button = QtWidgets.QPushButton(self.topics_page)
|
||||
self.edit_topic_button.setIcon(build_icon(':/songs/topic_edit.png'))
|
||||
self.edit_topic_button.setIcon(UiIcons().edit)
|
||||
self.edit_topic_button.setObjectName('edit_topic_button')
|
||||
self.topics_buttons_layout.addWidget(self.edit_topic_button)
|
||||
self.delete_topic_button = QtWidgets.QPushButton(self.topics_page)
|
||||
self.delete_topic_button.setIcon(build_icon(':/songs/topic_delete.png'))
|
||||
self.delete_topic_button.setIcon(UiIcons().delete)
|
||||
self.delete_topic_button.setObjectName('delete_topic_button')
|
||||
self.topics_buttons_layout.addWidget(self.delete_topic_button)
|
||||
self.topics_layout.addLayout(self.topics_buttons_layout)
|
||||
@ -117,15 +117,15 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.books_buttons_layout.setObjectName('booksButtonLayout')
|
||||
self.books_buttons_layout.addStretch()
|
||||
self.add_book_button = QtWidgets.QPushButton(self.books_page)
|
||||
self.add_book_button.setIcon(build_icon(':/songs/book_add.png'))
|
||||
self.add_book_button.setIcon(UiIcons().add)
|
||||
self.add_book_button.setObjectName('add_book_button')
|
||||
self.books_buttons_layout.addWidget(self.add_book_button)
|
||||
self.edit_book_button = QtWidgets.QPushButton(self.books_page)
|
||||
self.edit_book_button.setIcon(build_icon(':/songs/book_edit.png'))
|
||||
self.edit_book_button.setIcon(UiIcons().edit)
|
||||
self.edit_book_button.setObjectName('edit_book_button')
|
||||
self.books_buttons_layout.addWidget(self.edit_book_button)
|
||||
self.delete_book_button = QtWidgets.QPushButton(self.books_page)
|
||||
self.delete_book_button.setIcon(build_icon(':/songs/book_delete.png'))
|
||||
self.delete_book_button.setIcon(UiIcons().delete)
|
||||
self.delete_book_button.setObjectName('delete_book_button')
|
||||
self.books_buttons_layout.addWidget(self.delete_book_button)
|
||||
self.books_layout.addLayout(self.books_buttons_layout)
|
||||
|
@ -24,7 +24,7 @@ A widget representing a song in the duplicate song removal wizard review page.
|
||||
"""
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.songs.lib import VerseType
|
||||
from openlp.plugins.songs.lib.openlyricsxml import SongXML
|
||||
|
||||
@ -182,7 +182,7 @@ class SongReviewWidget(QtWidgets.QWidget):
|
||||
self.song_vertical_layout.addWidget(self.song_group_box)
|
||||
self.song_remove_button = QtWidgets.QPushButton(self)
|
||||
self.song_remove_button.setObjectName('song_remove_button')
|
||||
self.song_remove_button.setIcon(build_icon(':/general/general_delete.png'))
|
||||
self.song_remove_button.setIcon(UiIcons().delete)
|
||||
self.song_remove_button.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
|
||||
self.song_vertical_layout.addWidget(self.song_remove_button, alignment=QtCore.Qt.AlignHCenter)
|
||||
|
||||
|
@ -26,8 +26,8 @@ The :mod:`~openlp.plugins.songs.forms.songselectdialog` module contains the user
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.ui import SingleColumnTableWidget
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import HistoryComboBox
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ class Ui_SongSelectDialog(object):
|
||||
self.login_progress_bar.setVisible(False)
|
||||
self.login_button_layout.addWidget(self.login_progress_bar)
|
||||
self.login_button = QtWidgets.QPushButton(self.login_page)
|
||||
self.login_button.setIcon(build_icon(':/songs/song_author_edit.png'))
|
||||
self.login_button.setIcon(UiIcons().edit)
|
||||
self.login_button.setObjectName('login_button')
|
||||
self.login_button_layout.addWidget(self.login_button)
|
||||
self.login_layout.setLayout(4, QtWidgets.QFormLayout.SpanningRole, self.login_button_layout)
|
||||
@ -111,7 +111,7 @@ class Ui_SongSelectDialog(object):
|
||||
self.search_combobox.setObjectName('search_combobox')
|
||||
self.search_input_layout.addWidget(self.search_combobox)
|
||||
self.search_button = QtWidgets.QPushButton(self.search_page)
|
||||
self.search_button.setIcon(build_icon(':/general/general_find.png'))
|
||||
self.search_button.setIcon(UiIcons().search)
|
||||
self.search_button.setObjectName('search_button')
|
||||
self.search_input_layout.addWidget(self.search_button)
|
||||
self.search_layout.addLayout(self.search_input_layout)
|
||||
@ -124,7 +124,7 @@ class Ui_SongSelectDialog(object):
|
||||
self.search_progress_bar.setValue(0)
|
||||
self.search_progress_layout.addWidget(self.search_progress_bar)
|
||||
self.stop_button = QtWidgets.QPushButton(self.search_page)
|
||||
self.stop_button.setIcon(build_icon(':/songs/song_search_stop.png'))
|
||||
self.stop_button.setIcon(UiIcons().stop)
|
||||
self.stop_button.setObjectName('stop_button')
|
||||
self.search_progress_layout.addWidget(self.stop_button)
|
||||
self.search_layout.addLayout(self.search_progress_layout)
|
||||
@ -143,12 +143,12 @@ class Ui_SongSelectDialog(object):
|
||||
self.view_layout.setSpacing(8)
|
||||
self.view_layout.setObjectName('view_layout')
|
||||
self.logout_button = QtWidgets.QPushButton(self.search_page)
|
||||
self.logout_button.setIcon(build_icon(':/songs/song_author_edit.png'))
|
||||
self.logout_button.setIcon(UiIcons().edit)
|
||||
self.view_layout.addWidget(self.logout_button)
|
||||
self.view_spacer = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.view_layout.addItem(self.view_spacer)
|
||||
self.view_button = QtWidgets.QPushButton(self.search_page)
|
||||
self.view_button.setIcon(build_icon(':/songs/song_search_all.png'))
|
||||
self.view_button.setIcon(UiIcons().search)
|
||||
self.view_button.setObjectName('view_button')
|
||||
self.view_layout.addWidget(self.view_button)
|
||||
self.search_layout.addLayout(self.view_layout)
|
||||
@ -203,14 +203,14 @@ class Ui_SongSelectDialog(object):
|
||||
self.import_layout = QtWidgets.QHBoxLayout()
|
||||
self.import_layout.setObjectName('import_layout')
|
||||
self.back_button = QtWidgets.QPushButton(self.song_page)
|
||||
self.back_button.setIcon(build_icon(':/general/general_back.png'))
|
||||
self.back_button.setIcon(UiIcons().back)
|
||||
self.back_button.setObjectName('back_button')
|
||||
self.import_layout.addWidget(self.back_button)
|
||||
self.import_spacer = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding,
|
||||
QtWidgets.QSizePolicy.Minimum)
|
||||
self.import_layout.addItem(self.import_spacer)
|
||||
self.import_button = QtWidgets.QPushButton(self.song_page)
|
||||
self.import_button.setIcon(build_icon(':/general/general_import.png'))
|
||||
self.import_button.setIcon(UiIcons().download)
|
||||
self.import_button.setObjectName('import_button')
|
||||
self.import_layout.addWidget(self.import_button)
|
||||
self.song_layout.addLayout(self.import_layout, 5, 0, 1, 5)
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_TopicsDialog(object):
|
||||
@ -36,7 +36,7 @@ class Ui_TopicsDialog(object):
|
||||
Set up the user interface for the topics dialog.
|
||||
"""
|
||||
topics_dialog.setObjectName('topics_dialog')
|
||||
topics_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
topics_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
topics_dialog.resize(300, 10)
|
||||
self.dialog_layout = QtWidgets.QVBoxLayout(topics_dialog)
|
||||
self.dialog_layout.setObjectName('dialog_layout')
|
||||
|
@ -27,6 +27,7 @@ from sqlalchemy.sql import and_, or_
|
||||
|
||||
from openlp.core.common.applocation import AppLocation
|
||||
from openlp.core.common.i18n import UiStrings, translate, get_natural_key
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.path import copyfile, create_paths
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
@ -99,7 +100,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.toolbar.addSeparator()
|
||||
# Song Maintenance Button
|
||||
self.maintenance_action = self.toolbar.add_toolbar_action('maintenance_action',
|
||||
icon=':/songs/song_maintenance.png',
|
||||
icon=UiIcons().database,
|
||||
triggers=self.on_song_maintenance_click)
|
||||
self.add_search_to_toolbar()
|
||||
# Signals and slots
|
||||
@ -111,7 +112,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
def add_custom_context_actions(self):
|
||||
create_widget_action(self.list_view, separator=True)
|
||||
create_widget_action(
|
||||
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=':/general/general_clone.png',
|
||||
self.list_view, text=translate('OpenLP.MediaManagerItem', '&Clone'), icon=UiIcons().clone,
|
||||
triggers=self.on_clone_click)
|
||||
|
||||
def on_focus(self):
|
||||
@ -145,26 +146,26 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.edit_song_form = EditSongForm(self, self.main_window, self.plugin.manager)
|
||||
self.open_lyrics = OpenLyrics(self.plugin.manager)
|
||||
self.search_text_edit.set_search_types([
|
||||
(SongSearch.Entire, ':/songs/song_search_all.png',
|
||||
(SongSearch.Entire, UiIcons().music,
|
||||
translate('SongsPlugin.MediaItem', 'Entire Song'),
|
||||
translate('SongsPlugin.MediaItem', 'Search Entire Song...')),
|
||||
(SongSearch.Titles, ':/songs/song_search_title.png',
|
||||
(SongSearch.Titles, UiIcons().search_text,
|
||||
translate('SongsPlugin.MediaItem', 'Titles'),
|
||||
translate('SongsPlugin.MediaItem', 'Search Titles...')),
|
||||
(SongSearch.Lyrics, ':/songs/song_search_lyrics.png',
|
||||
(SongSearch.Lyrics, UiIcons().search_lyrcs,
|
||||
translate('SongsPlugin.MediaItem', 'Lyrics'),
|
||||
translate('SongsPlugin.MediaItem', 'Search Lyrics...')),
|
||||
(SongSearch.Authors, ':/songs/song_search_author.png', SongStrings.Authors,
|
||||
(SongSearch.Authors, UiIcons().user, SongStrings.Authors,
|
||||
translate('SongsPlugin.MediaItem', 'Search Authors...')),
|
||||
(SongSearch.Topics, ':/songs/song_search_topic.png', SongStrings.Topics,
|
||||
(SongSearch.Topics, UiIcons().theme, SongStrings.Topics,
|
||||
translate('SongsPlugin.MediaItem', 'Search Topics...')),
|
||||
(SongSearch.Books, ':/songs/song_book_edit.png', SongStrings.SongBooks,
|
||||
(SongSearch.Books, UiIcons().address, SongStrings.SongBooks,
|
||||
translate('SongsPlugin.MediaItem', 'Search Songbooks...')),
|
||||
(SongSearch.Themes, ':/slides/slide_theme.png', UiStrings().Themes, UiStrings().SearchThemes),
|
||||
(SongSearch.Copyright, ':/songs/song_search_copy.png',
|
||||
(SongSearch.Themes, UiIcons().theme, UiStrings().Themes, UiStrings().SearchThemes),
|
||||
(SongSearch.Copyright, UiIcons().copyright,
|
||||
translate('SongsPlugin.MediaItem', 'Copyright'),
|
||||
translate('SongsPlugin.MediaItem', 'Search Copyright...')),
|
||||
(SongSearch.CCLInumber, ':/songs/song_search_ccli.png',
|
||||
(SongSearch.CCLInumber, UiIcons().search_ccli,
|
||||
translate('SongsPlugin.MediaItem', 'CCLI number'),
|
||||
translate('SongsPlugin.MediaItem', 'Search CCLI number...'))
|
||||
])
|
||||
|
@ -34,6 +34,7 @@ from PyQt5 import QtCore, QtWidgets
|
||||
from openlp.core.api.http import register_endpoint
|
||||
from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import UiStrings, translate
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.core.lib.db import Manager
|
||||
@ -92,7 +93,7 @@ class SongsPlugin(Plugin):
|
||||
super(SongsPlugin, self).__init__('songs', __default_settings__, SongMediaItem, SongsTab)
|
||||
self.manager = Manager('songs', init_schema, upgrade_mod=upgrade)
|
||||
self.weight = -10
|
||||
self.icon_path = ':/plugins/plugin_songs.png'
|
||||
self.icon_path = UiIcons().music
|
||||
self.icon = build_icon(self.icon_path)
|
||||
self.songselect_form = None
|
||||
register_endpoint(songs_endpoint)
|
||||
@ -170,7 +171,7 @@ class SongsPlugin(Plugin):
|
||||
self.tools_reindex_item = create_action(
|
||||
tools_menu, 'toolsReindexItem',
|
||||
text=translate('SongsPlugin', '&Re-index Songs'),
|
||||
icon=':/plugins/plugin_songs.png',
|
||||
icon=UiIcons().music,
|
||||
statustip=translate('SongsPlugin', 'Re-index the songs database to improve searching and ordering.'),
|
||||
triggers=self.on_tools_reindex_item_triggered)
|
||||
self.tools_find_duplicates = create_action(
|
||||
|
@ -23,8 +23,8 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
|
||||
|
||||
class Ui_SongUsageDeleteDialog(object):
|
||||
@ -38,7 +38,7 @@ class Ui_SongUsageDeleteDialog(object):
|
||||
:param song_usage_delete_dialog:
|
||||
"""
|
||||
song_usage_delete_dialog.setObjectName('song_usage_delete_dialog')
|
||||
song_usage_delete_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
song_usage_delete_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
song_usage_delete_dialog.resize(291, 243)
|
||||
self.vertical_layout = QtWidgets.QVBoxLayout(song_usage_delete_dialog)
|
||||
self.vertical_layout.setSpacing(8)
|
||||
|
@ -22,8 +22,8 @@
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib.ui import create_button_box
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.core.widgets.edits import PathEdit
|
||||
from openlp.core.widgets.enums import PathEditType
|
||||
|
||||
@ -39,7 +39,7 @@ class Ui_SongUsageDetailDialog(object):
|
||||
:param song_usage_detail_dialog:
|
||||
"""
|
||||
song_usage_detail_dialog.setObjectName('song_usage_detail_dialog')
|
||||
song_usage_detail_dialog.setWindowIcon(build_icon(':/icon/openlp-logo.svg'))
|
||||
song_usage_detail_dialog.setWindowIcon(UiIcons().main_icon)
|
||||
song_usage_detail_dialog.resize(609, 413)
|
||||
self.vertical_layout = QtWidgets.QVBoxLayout(song_usage_detail_dialog)
|
||||
self.vertical_layout.setSpacing(8)
|
||||
|
@ -29,9 +29,10 @@ from openlp.core.common.actions import ActionList
|
||||
from openlp.core.common.i18n import translate
|
||||
from openlp.core.common.registry import Registry
|
||||
from openlp.core.common.settings import Settings
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon
|
||||
from openlp.core.lib import Plugin, StringContent
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.ui.icons import UiIcons
|
||||
from openlp.plugins.songusage.forms import SongUsageDetailForm, SongUsageDeleteForm
|
||||
from openlp.plugins.songusage.lib import upgrade
|
||||
from openlp.plugins.songusage.lib.db import init_schema, SongUsageItem
|
||||
@ -63,9 +64,7 @@ class SongUsagePlugin(Plugin):
|
||||
super(SongUsagePlugin, self).__init__('songusage', __default_settings__)
|
||||
self.manager = Manager('songusage', init_schema, upgrade_mod=upgrade)
|
||||
self.weight = -4
|
||||
self.icon = build_icon(':/plugins/plugin_songusage.png')
|
||||
self.active_icon = build_icon(':/songusage/song_usage_active.png')
|
||||
self.inactive_icon = build_icon(':/songusage/song_usage_inactive.png')
|
||||
self.icon = UiIcons().song_usage
|
||||
self.song_usage_active = False
|
||||
|
||||
def check_pre_conditions(self):
|
||||
@ -169,12 +168,12 @@ class SongUsagePlugin(Plugin):
|
||||
self.song_usage_active_button.blockSignals(True)
|
||||
self.song_usage_status.blockSignals(True)
|
||||
if self.song_usage_active:
|
||||
self.song_usage_active_button.setIcon(self.active_icon)
|
||||
self.song_usage_active_button.setIcon(UiIcons().song_usage_active)
|
||||
self.song_usage_status.setChecked(True)
|
||||
self.song_usage_active_button.setChecked(True)
|
||||
self.song_usage_active_button.setToolTip(translate('SongUsagePlugin', 'Song usage tracking is active.'))
|
||||
else:
|
||||
self.song_usage_active_button.setIcon(self.inactive_icon)
|
||||
self.song_usage_active_button.setIcon(UiIcons().song_usage_inactive)
|
||||
self.song_usage_status.setChecked(False)
|
||||
self.song_usage_active_button.setChecked(False)
|
||||
self.song_usage_active_button.setToolTip(translate('SongUsagePlugin', 'Song usage tracking is inactive.'))
|
||||
|
Before Width: | Height: | Size: 836 B |
Before Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 632 B |
Before Width: | Height: | Size: 735 B |
Before Width: | Height: | Size: 802 B |
Before Width: | Height: | Size: 720 B |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 744 B |
Before Width: | Height: | Size: 776 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 531 B |
Before Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 907 B |