forked from openlp/openlp
More Receiver to Registry migrations
This commit is contained in:
parent
d491997ca7
commit
1430559205
@ -44,20 +44,11 @@ class EventReceiver(QtCore.QObject):
|
|||||||
|
|
||||||
**Mainwindow related and generic signals**
|
**Mainwindow related and generic signals**
|
||||||
|
|
||||||
``openlp_version_check``
|
|
||||||
Version has changed so pop up window.
|
|
||||||
|
|
||||||
``openlp_stop_wizard``
|
``openlp_stop_wizard``
|
||||||
Stops a wizard before completion.
|
Stops a wizard before completion.
|
||||||
|
|
||||||
**Setting related signals**
|
**Setting related signals**
|
||||||
|
|
||||||
``config_updated``
|
|
||||||
Informs components that the config has changed.
|
|
||||||
|
|
||||||
``config_screen_changed``
|
|
||||||
The display monitor has been changed.
|
|
||||||
|
|
||||||
**Slidecontroller signals**
|
**Slidecontroller signals**
|
||||||
|
|
||||||
``slidecontroller_{live|preview}_next``
|
``slidecontroller_{live|preview}_next``
|
||||||
|
@ -39,7 +39,7 @@ import Queue
|
|||||||
|
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import resize_image, image_to_byte, Receiver, Registry, ScreenList
|
from openlp.core.lib import resize_image, image_to_byte, Registry, ScreenList
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ class ImageManager(QtCore.QObject):
|
|||||||
self.image_thread = ImageThread(self)
|
self.image_thread = ImageThread(self)
|
||||||
self._conversion_queue = PriorityQueue()
|
self._conversion_queue = PriorityQueue()
|
||||||
self.stop_manager = False
|
self.stop_manager = False
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.process_updates)
|
Registry().register_function(u'config_updated', self.process_updates)
|
||||||
|
|
||||||
def update_display(self):
|
def update_display(self):
|
||||||
"""
|
"""
|
||||||
|
@ -173,8 +173,7 @@ class Plugin(QtCore.QObject):
|
|||||||
Settings.extend_default_settings(default_settings)
|
Settings.extend_default_settings(default_settings)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||||
self.processAddServiceEvent)
|
self.processAddServiceEvent)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_config_updated' % self.name),
|
Registry().register_function(u'%s_config_updated' % self.name, self.configUpdated)
|
||||||
self.configUpdated)
|
|
||||||
|
|
||||||
def checkPreConditions(self):
|
def checkPreConditions(self):
|
||||||
"""
|
"""
|
||||||
|
@ -35,7 +35,7 @@ import copy
|
|||||||
|
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, translate
|
from openlp.core.lib import Registry, translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ class ScreenList(object):
|
|||||||
if screen == self.override:
|
if screen == self.override:
|
||||||
self.override = copy.deepcopy(newScreen)
|
self.override = copy.deepcopy(newScreen)
|
||||||
self.set_override_display()
|
self.set_override_display()
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Registry().execute(u'config_screen_changed')
|
||||||
break
|
break
|
||||||
|
|
||||||
def screen_count_changed(self, changed_screen=-1):
|
def screen_count_changed(self, changed_screen=-1):
|
||||||
@ -128,7 +128,7 @@ class ScreenList(object):
|
|||||||
# We do not want to send this message at start up.
|
# We do not want to send this message at start up.
|
||||||
if changed_screen != -1:
|
if changed_screen != -1:
|
||||||
# Reload setting tabs to apply possible changes.
|
# Reload setting tabs to apply possible changes.
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Registry().execute(u'config_screen_changed')
|
||||||
|
|
||||||
def get_screen_list(self):
|
def get_screen_list(self):
|
||||||
"""
|
"""
|
||||||
|
@ -36,7 +36,7 @@ import sys
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, Receiver, Settings, UiStrings, translate, build_icon
|
from openlp.core.lib import Registry, SettingsTab, Receiver, Settings, UiStrings, translate, build_icon
|
||||||
from openlp.core.utils import get_images_filter, AppLocation, format_time
|
from openlp.core.utils import get_images_filter, AppLocation, format_time
|
||||||
from openlp.core.lib import SlideLimits
|
from openlp.core.lib import SlideLimits
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ class AdvancedTab(SettingsTab):
|
|||||||
settings.setValue(u'slide limits', self.slide_limits)
|
settings.setValue(u'slide limits', self.slide_limits)
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
if self.display_changed:
|
if self.display_changed:
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Registry().execute(u'config_screen_changed')
|
||||||
self.display_changed = False
|
self.display_changed = False
|
||||||
Receiver.send_message(u'slidecontroller_update_slide_limits')
|
Receiver.send_message(u'slidecontroller_update_slide_limits')
|
||||||
|
|
||||||
|
@ -103,8 +103,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
QtCore.QObject.connect(self.noInternetFinishButton, QtCore.SIGNAL('clicked()'),
|
QtCore.QObject.connect(self.noInternetFinishButton, QtCore.SIGNAL('clicked()'),
|
||||||
self.onNoInternetFinishButtonClicked)
|
self.onNoInternetFinishButtonClicked)
|
||||||
QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
|
QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'),
|
Registry().register_function(u'config_screen_changed', self.updateScreenListCombo)
|
||||||
self.updateScreenListCombo)
|
|
||||||
|
|
||||||
def exec_(self):
|
def exec_(self):
|
||||||
"""
|
"""
|
||||||
|
@ -33,7 +33,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, Settings, SettingsTab, translate, ScreenList, UiStrings
|
from openlp.core.lib import Registry, Receiver, Settings, SettingsTab, translate, ScreenList, UiStrings
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ class GeneralTab(SettingsTab):
|
|||||||
QtCore.QObject.connect(self.customXValueEdit, QtCore.SIGNAL(u'valueChanged(int)'), self.onDisplayChanged)
|
QtCore.QObject.connect(self.customXValueEdit, QtCore.SIGNAL(u'valueChanged(int)'), self.onDisplayChanged)
|
||||||
QtCore.QObject.connect(self.monitorComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.onDisplayChanged)
|
QtCore.QObject.connect(self.monitorComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.onDisplayChanged)
|
||||||
# Reload the tab, as the screen resolution/count may have changed.
|
# Reload the tab, as the screen resolution/count may have changed.
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'), self.load)
|
Registry().register_function(u'config_screen_changed', self.load)
|
||||||
# Remove for now
|
# Remove for now
|
||||||
self.usernameLabel.setVisible(False)
|
self.usernameLabel.setVisible(False)
|
||||||
self.usernameEdit.setVisible(False)
|
self.usernameEdit.setVisible(False)
|
||||||
@ -331,7 +331,7 @@ class GeneralTab(SettingsTab):
|
|||||||
else:
|
else:
|
||||||
self.screens.reset_current_display()
|
self.screens.reset_current_display()
|
||||||
if self.display_changed:
|
if self.display_changed:
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Registry().execute(u'config_screen_changed')
|
||||||
self.display_changed = False
|
self.display_changed = False
|
||||||
|
|
||||||
def onOverrideRadioButtonPressed(self, checked):
|
def onOverrideRadioButtonPressed(self, checked):
|
||||||
|
@ -161,7 +161,7 @@ class MainDisplay(Display):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_hide'), self.hideDisplay)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_hide'), self.hideDisplay)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_show'), self.showDisplay)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_show'), self.showDisplay)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'update_display_css'), self.cssChanged)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'update_display_css'), self.cssChanged)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.configChanged)
|
Registry().register_function(u'config_updated', self.configChanged)
|
||||||
|
|
||||||
def setTransparency(self, enabled):
|
def setTransparency(self, enabled):
|
||||||
"""
|
"""
|
||||||
|
@ -529,9 +529,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.QObject.connect(self.modeSetupItem, QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
|
QtCore.QObject.connect(self.modeSetupItem, QtCore.SIGNAL(u'triggered()'), self.onModeSetupItemClicked)
|
||||||
QtCore.QObject.connect(self.modeLiveItem, QtCore.SIGNAL(u'triggered()'), self.onModeLiveItemClicked)
|
QtCore.QObject.connect(self.modeLiveItem, QtCore.SIGNAL(u'triggered()'), self.onModeLiveItemClicked)
|
||||||
Registry().register_function(u'theme_update_global', self.defaultThemeChanged)
|
Registry().register_function(u'theme_update_global', self.defaultThemeChanged)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlp_version_check'), self.versionNotice)
|
Registry().register_function(u'openlp_version_check', self.versionNotice)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_blank_check'), self.blankCheck)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_blank_check'), self.blankCheck)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
Registry().register_function(u'config_screen_changed', self.screenChanged)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'cleanup'), self.clean_up)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'cleanup'), self.clean_up)
|
||||||
# Media Manager
|
# Media Manager
|
||||||
QtCore.QObject.connect(self.mediaToolBox, QtCore.SIGNAL(u'currentChanged(int)'), self.onMediaToolBoxChanged)
|
QtCore.QObject.connect(self.mediaToolBox, QtCore.SIGNAL(u'currentChanged(int)'), self.onMediaToolBoxChanged)
|
||||||
@ -539,9 +539,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
# Simple message boxes
|
# Simple message boxes
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'set_new_data_path'), self.setNewDataPath)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'set_new_data_path'), self.setNewDataPath)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'set_copy_data'), self.setCopyData)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'set_copy_data'), self.setCopyData)
|
||||||
# warning cyclic dependency
|
Registry().register_function(u'theme_update_global', self.defaultThemeChanged)
|
||||||
# renderer needs to call ThemeManager and
|
Registry().register_function(u'openlp_version_check', self.versionNotice)
|
||||||
# ThemeManager needs to call Renderer
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_blank_check'), self.blankCheck)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'cleanup'), self.clean_up)
|
||||||
self.renderer = Renderer()
|
self.renderer = Renderer()
|
||||||
# Define the media Dock Manager
|
# Define the media Dock Manager
|
||||||
self.mediaDockManager = MediaDockManager(self.mediaToolBox)
|
self.mediaDockManager = MediaDockManager(self.mediaToolBox)
|
||||||
|
@ -31,7 +31,7 @@ The :mod:`~openlp.core.ui.media.playertab` module holds the configuration tab fo
|
|||||||
"""
|
"""
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, translate, Receiver, Settings, UiStrings
|
from openlp.core.lib import Registry, SettingsTab, translate, Receiver, Settings, UiStrings
|
||||||
from openlp.core.lib.ui import create_button
|
from openlp.core.lib.ui import create_button
|
||||||
from openlp.core.ui.media import get_media_players, set_media_players
|
from openlp.core.ui.media import get_media_players, set_media_players
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ class PlayerTab(SettingsTab):
|
|||||||
if player_string_changed:
|
if player_string_changed:
|
||||||
self.service_manager.reset_supported_suffixes()
|
self.service_manager.reset_supported_suffixes()
|
||||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Registry().execute(u'config_screen_changed')
|
||||||
|
|
||||||
def postSetUp(self, postUpdate=False):
|
def postSetUp(self, postUpdate=False):
|
||||||
"""
|
"""
|
||||||
|
@ -211,9 +211,8 @@ class ServiceManagerDialog(object):
|
|||||||
QtCore.QObject.connect(self.service_manager_list, QtCore.SIGNAL(u'itemExpanded(QTreeWidgetItem*)'),
|
QtCore.QObject.connect(self.service_manager_list, QtCore.SIGNAL(u'itemExpanded(QTreeWidgetItem*)'),
|
||||||
self.expanded)
|
self.expanded)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'theme_update_list'), self.update_theme_list)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'theme_update_list'), self.update_theme_list)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.config_updated)
|
Registry().register_function(u'config_updated', self.config_updated)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'),
|
Registry().register_function(u'config_screen_changed', self.regenerate_service_Items)
|
||||||
self.regenerate_service_Items)
|
|
||||||
Registry().register_function(u'theme_update_global', self.theme_change)
|
Registry().register_function(u'theme_update_global', self.theme_change)
|
||||||
# Last little bits of setting up
|
# Last little bits of setting up
|
||||||
self.service_theme = Settings().value(self.main_window.serviceManagerSettingsSection + u'/service theme')
|
self.service_theme = Settings().value(self.main_window.serviceManagerSettingsSection + u'/service theme')
|
||||||
|
@ -107,7 +107,7 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
for tabIndex in range(self.stackedLayout.count()):
|
for tabIndex in range(self.stackedLayout.count()):
|
||||||
self.stackedLayout.widget(tabIndex).save()
|
self.stackedLayout.widget(tabIndex).save()
|
||||||
# Must go after all settings are save
|
# Must go after all settings are save
|
||||||
Receiver.send_message(u'config_updated')
|
Registry().execute(u'config_updated')
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
|
@ -135,7 +135,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
QtCore.QObject.connect(self.theme_list_widget,
|
QtCore.QObject.connect(self.theme_list_widget,
|
||||||
QtCore.SIGNAL(u'currentItemChanged(QListWidgetItem *, QListWidgetItem *)'), self.check_list_state)
|
QtCore.SIGNAL(u'currentItemChanged(QListWidgetItem *, QListWidgetItem *)'), self.check_list_state)
|
||||||
Registry().register_function(u'theme_update_global', self.change_global_from_tab)
|
Registry().register_function(u'theme_update_global', self.change_global_from_tab)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.config_updated)
|
Registry().register_function(u'config_updated', self.config_updated)
|
||||||
# Variables
|
# Variables
|
||||||
self.theme_list = []
|
self.theme_list = []
|
||||||
self.path = AppLocation.get_section_data_path(self.settingsSection)
|
self.path = AppLocation.get_section_data_path(self.settingsSection)
|
||||||
|
@ -51,7 +51,7 @@ if sys.platform != u'win32' and sys.platform != u'darwin':
|
|||||||
XDG_BASE_AVAILABLE = False
|
XDG_BASE_AVAILABLE = False
|
||||||
|
|
||||||
import openlp
|
import openlp
|
||||||
from openlp.core.lib import Receiver, translate, check_directory_exists
|
from openlp.core.lib import translate, check_directory_exists
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
APPLICATION_VERSION = {}
|
APPLICATION_VERSION = {}
|
||||||
@ -75,7 +75,7 @@ class VersionThread(QtCore.QThread):
|
|||||||
app_version = get_application_version()
|
app_version = get_application_version()
|
||||||
version = check_latest_version(app_version)
|
version = check_latest_version(app_version)
|
||||||
if LooseVersion(str(version)) > LooseVersion(str(app_version[u'full'])):
|
if LooseVersion(str(version)) > LooseVersion(str(app_version[u'full'])):
|
||||||
Receiver.send_message(u'openlp_version_check', u'%s' % version)
|
Registry().execute(u'openlp_version_check', u'%s' % version)
|
||||||
|
|
||||||
|
|
||||||
class AppLocation(object):
|
class AppLocation(object):
|
||||||
|
@ -31,7 +31,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, translate, create_separated_list, \
|
from openlp.core.lib import Registry, MediaManagerItem, Receiver, ItemCapabilities, translate, create_separated_list, \
|
||||||
ServiceItemContext, Settings, UiStrings
|
ServiceItemContext, Settings, UiStrings
|
||||||
from openlp.core.lib.searchedit import SearchEdit
|
from openlp.core.lib.searchedit import SearchEdit
|
||||||
from openlp.core.lib.ui import set_case_insensitive_completer, create_horizontal_adjusting_combo_box, \
|
from openlp.core.lib.ui import set_case_insensitive_completer, create_horizontal_adjusting_combo_box, \
|
||||||
@ -246,7 +246,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
# Buttons
|
# Buttons
|
||||||
QtCore.QObject.connect(self.advancedSearchButton, QtCore.SIGNAL(u'clicked()'), self.onAdvancedSearchButton)
|
QtCore.QObject.connect(self.advancedSearchButton, QtCore.SIGNAL(u'clicked()'), self.onAdvancedSearchButton)
|
||||||
QtCore.QObject.connect(self.quickSearchButton, QtCore.SIGNAL(u'clicked()'), self.onQuickSearchButton)
|
QtCore.QObject.connect(self.quickSearchButton, QtCore.SIGNAL(u'clicked()'), self.onQuickSearchButton)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.configUpdated)
|
Registry().register_function(u'config_updated', self.configUpdated)
|
||||||
# Other stuff
|
# Other stuff
|
||||||
QtCore.QObject.connect(self.quickSearchEdit, QtCore.SIGNAL(u'returnPressed()'), self.onQuickSearchButton)
|
QtCore.QObject.connect(self.quickSearchEdit, QtCore.SIGNAL(u'returnPressed()'), self.onQuickSearchButton)
|
||||||
QtCore.QObject.connect(self.searchTabBar, QtCore.SIGNAL(u'currentChanged(int)'),
|
QtCore.QObject.connect(self.searchTabBar, QtCore.SIGNAL(u'currentChanged(int)'),
|
||||||
|
@ -32,7 +32,7 @@ import logging
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from sqlalchemy.sql import or_, func, and_
|
from sqlalchemy.sql import or_, func, and_
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, check_item_selected, translate, \
|
from openlp.core.lib import Registry, MediaManagerItem, Receiver, ItemCapabilities, check_item_selected, translate, \
|
||||||
ServiceItemContext, Settings, PluginStatus, UiStrings
|
ServiceItemContext, Settings, PluginStatus, UiStrings
|
||||||
from openlp.plugins.custom.forms import EditCustomForm
|
from openlp.plugins.custom.forms import EditCustomForm
|
||||||
from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder
|
from openlp.plugins.custom.lib import CustomXMLParser, CustomXMLBuilder
|
||||||
@ -75,7 +75,7 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
self.onSearchTextButtonClicked)
|
self.onSearchTextButtonClicked)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_load_list'), self.loadList)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_load_list'), self.loadList)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.config_updated)
|
Registry().register_function(u'config_updated', self.config_updated)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_create_from_service'),
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_create_from_service'),
|
||||||
self.create_from_service_item)
|
self.create_from_service_item)
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'video_background_replaced'),
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'video_background_replaced'),
|
||||||
self.videobackgroundReplaced)
|
self.videobackgroundReplaced)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'mediaitem_media_rebuild'), self.rebuild_players)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'mediaitem_media_rebuild'), self.rebuild_players)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_screen_changed'), self.displaySetup)
|
Registry().register_function(u'config_screen_changed', self.displaySetup)
|
||||||
# Allow DnD from the desktop
|
# Allow DnD from the desktop
|
||||||
self.listView.activateDnD()
|
self.listView.activateDnD()
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui, QtNetwork
|
from PyQt4 import QtCore, QtGui, QtNetwork
|
||||||
|
|
||||||
from openlp.core.lib import Settings, SettingsTab, translate, Receiver
|
from openlp.core.lib import Registry, Settings, SettingsTab, translate
|
||||||
|
|
||||||
|
|
||||||
ZERO_URL = u'0.0.0.0'
|
ZERO_URL = u'0.0.0.0'
|
||||||
@ -152,7 +152,7 @@ class RemoteTab(SettingsTab):
|
|||||||
Settings().setValue(self.settingsSection + u'/ip address', self.addressEdit.text())
|
Settings().setValue(self.settingsSection + u'/ip address', self.addressEdit.text())
|
||||||
Settings().setValue(self.settingsSection + u'/twelve hour', self.twelveHour)
|
Settings().setValue(self.settingsSection + u'/twelve hour', self.twelveHour)
|
||||||
if changed:
|
if changed:
|
||||||
Receiver.send_message(u'remotes_config_updated')
|
Registry().register_function(u'remotes_config_updated')
|
||||||
|
|
||||||
def onTwelveHourCheckBoxChanged(self, check_state):
|
def onTwelveHourCheckBoxChanged(self, check_state):
|
||||||
self.twelveHour = False
|
self.twelveHour = False
|
||||||
|
@ -35,7 +35,7 @@ import shutil
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from sqlalchemy.sql import or_
|
from sqlalchemy.sql import or_
|
||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, translate, check_item_selected, \
|
from openlp.core.lib import Registry, MediaManagerItem, Receiver, ItemCapabilities, translate, check_item_selected, \
|
||||||
PluginStatus, create_separated_list, check_directory_exists, ServiceItemContext, Settings, UiStrings
|
PluginStatus, create_separated_list, check_directory_exists, ServiceItemContext, Settings, UiStrings
|
||||||
from openlp.core.lib.ui import create_widget_action
|
from openlp.core.lib.ui import create_widget_action
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
@ -100,7 +100,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
self.addSearchToToolBar()
|
self.addSearchToToolBar()
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'songs_load_list'), self.onSongListLoad)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'songs_load_list'), self.onSongListLoad)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.configUpdated)
|
Registry().register_function(u'config_updated', self.configUpdated)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'songs_preview'), self.onPreviewClick)
|
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'songs_preview'), self.onPreviewClick)
|
||||||
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'cleared()'), self.onClearTextButtonClick)
|
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'cleared()'), self.onClearTextButtonClick)
|
||||||
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'searchTypeChanged(int)'),
|
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'searchTypeChanged(int)'),
|
||||||
|
Loading…
Reference in New Issue
Block a user