当前位置: 首页>>代码示例>>Python>>正文


Python Receiver.get_receiver方法代码示例

本文整理汇总了Python中openlp.core.lib.Receiver.get_receiver方法的典型用法代码示例。如果您正苦于以下问题:Python Receiver.get_receiver方法的具体用法?Python Receiver.get_receiver怎么用?Python Receiver.get_receiver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在openlp.core.lib.Receiver的用法示例。


在下文中一共展示了Receiver.get_receiver方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, parent):
     QtCore.QObject.__init__(self, parent)
     self.screen = None
     self.timer_id = 0
     self.alertList = []
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'live_display_active'), self.generateAlert)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'alerts_text'), self.onAlertText)
开发者ID:marmyshev,项目名称:transitions,代码行数:9,代码来源:alertsmanager.py

示例2: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
    def __init__(self, name, default_settings, media_item_class=None, settings_tab_class=None, version=None):
        """
        This is the constructor for the plugin object. This provides an easy
        way for descendent plugins to populate common data. This method *must*
        be overridden, like so::

            class MyPlugin(Plugin):
                def __init__(self):
                    Plugin.__init__(self, u'MyPlugin', version=u'0.1')

        ``name``
            Defaults to *None*. The name of the plugin.

        ``default_settings``
            A dict containing the plugin's settings. The value to each key is the default value to be used.

        ``media_item_class``
            The class name of the plugin's media item.

        ``settings_tab_class``
            The class name of the plugin's settings tab.

        ``version``
            Defaults to *None*, which means that the same version number is used as OpenLP's version number.
        """
        log.debug(u'Plugin %s initialised' % name)
        QtCore.QObject.__init__(self)
        self.name = name
        self.textStrings = {}
        self.setPluginTextStrings()
        self.nameStrings = self.textStrings[StringContent.Name]
        if version:
            self.version = version
        else:
            self.version = get_application_version()[u'version']
        self.settingsSection = self.name
        self.icon = None
        self.mediaItemClass = media_item_class
        self.settingsTabClass = settings_tab_class
        self.settingsTab = None
        self.mediaItem = None
        self.weight = 0
        self.status = PluginStatus.Inactive
        # Add the default status to the default settings.
        default_settings[name + u'/status'] = PluginStatus.Inactive
        default_settings[name + u'/last directory'] = u''
        # Append a setting for files in the mediamanager (note not all plugins
        # which have a mediamanager need this).
        if media_item_class is not None:
            default_settings[u'%s/%s files' % (name, name)] = []
        # Add settings to the dict of all settings.
        Settings.extend_default_settings(default_settings)
        QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_add_service_item' % self.name),
            self.processAddServiceEvent)
        QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_config_updated' % self.name),
            self.configUpdated)
开发者ID:marmyshev,项目名称:transitions,代码行数:58,代码来源:plugin.py

示例3: addEndHeaderBar

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def addEndHeaderBar(self):
     self.toolbar.addSeparator()
     self.addSearchToToolBar()
     # Signals and slots
     QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'cleared()'), self.onClearTextButtonClick)
     QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'searchTypeChanged(int)'),
         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_preview'), self.onPreviewClick)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'config_updated'), self.config_updated)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'custom_create_from_service'),
         self.create_from_service_item)
开发者ID:marmyshev,项目名称:transitions,代码行数:14,代码来源:mediaitem.py

示例4: addEndHeaderBar

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def addEndHeaderBar(self):
     self.toolbar.addSeparator()
     ## Song Maintenance Button ##
     self.maintenanceAction = self.toolbar.addToolbarAction('maintenanceAction',
         icon=':/songs/song_maintenance.png',
         triggers=self.onSongMaintenanceClick)
     self.addSearchToToolBar()
     # 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'config_updated'), self.configUpdated)
     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'searchTypeChanged(int)'),
         self.onSearchTextButtonClicked)
开发者ID:marmyshev,项目名称:transitions,代码行数:16,代码来源:mediaitem.py

示例5: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, parent, plugin, icon, controllers):
     """
     Constructor. Setup defaults
     """
     self.controllers = controllers
     self.IconPath = u'presentations/presentation'
     self.Automatic = u''
     MediaManagerItem.__init__(self, parent, plugin, icon)
     self.message_listener = MessageListener(self)
     self.hasSearch = True
     self.singleServiceItem = False
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'mediaitem_presentation_rebuild'),
         self.populateDisplayTypes)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'mediaitem_suffixes'), self.buildFileMaskString)
     # Allow DnD from the desktop
     self.listView.activateDnD()
开发者ID:marmyshev,项目名称:transitions,代码行数:18,代码来源:mediaitem.py

示例6: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
    def __init__(self, manager, **kwargs):
        """
        Initialise and create defaults for properties

        ``manager``
            An instance of a SongManager, through which all database access is
            performed.

        """
        self.manager = manager
        QtCore.QObject.__init__(self)
        if u'filename' in kwargs:
            self.importSource = kwargs[u'filename']
        elif u'filenames' in kwargs:
            self.importSource = kwargs[u'filenames']
        elif u'folder' in kwargs:
            self.importSource = kwargs[u'folder']
        else:
            raise KeyError(u'Keyword arguments "filename[s]" or "folder" not supplied.')
        log.debug(self.importSource)
        self.importWizard = None
        self.song = None
        self.stopImportFlag = False
        self.setDefaults()
        QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlp_stop_wizard'), self.stopImport)
开发者ID:marmyshev,项目名称:transitions,代码行数:27,代码来源:songimport.py

示例7: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
    def __init__(self):
        """
        Initialise the renderer.

        ``image_manager``
            A image_manager instance which takes care of e. g. caching and
            resizing images.

        ``theme_manager``
            The theme_manager instance, used to get the current theme details.
        """
        log.debug(u'Initialisation started')
        self.screens = ScreenList()
        Registry().register(u'renderer', self)
        self.theme_level = ThemeLevel.Global
        self.global_theme_name = u''
        self.service_theme_name = u''
        self.item_theme_name = u''
        self.force_page = False
        self.display = MainDisplay(None, False, self)
        self.display.setup()
        self._theme_dimensions = {}
        self._calculate_default()
        QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'theme_update_global'), self.set_global_theme)
        self.web = QtWebKit.QWebView()
        self.web.setVisible(False)
        self.web_frame = self.web.page().mainFrame()
开发者ID:marmyshev,项目名称:transitions,代码行数:29,代码来源:renderer.py

示例8: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, parent=None, plugin=None, icon=None):
     """
     Constructor to create the media manager item.
     """
     QtGui.QWidget.__init__(self)
     self.hide()
     self.whitespace = re.compile(r'[\W_]+', re.UNICODE)
     self.plugin = plugin
     visible_title = self.plugin.getString(StringContent.VisibleName)
     self.title = unicode(visible_title[u'title'])
     Registry().register(self.plugin.name, self)
     self.settingsSection = self.plugin.name
     self.icon = None
     if icon:
         self.icon = build_icon(icon)
     self.toolbar = None
     self.remoteTriggered = None
     self.singleServiceItem = True
     self.quickPreviewAllowed = False
     self.hasSearch = False
     self.pageLayout = QtGui.QVBoxLayout(self)
     self.pageLayout.setSpacing(0)
     self.pageLayout.setMargin(0)
     self.requiredIcons()
     self.setupUi()
     self.retranslateUi()
     self.autoSelectId = -1
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_service_load' % self.plugin.name),
         self.serviceLoad)
开发者ID:marmyshev,项目名称:transitions,代码行数:31,代码来源:mediamanageritem.py

示例9: activateDnD

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def activateDnD(self):
     """
     Activate DnD of widget
     """
     self.setAcceptDrops(True)
     self.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_dnd' % self.mimeDataText),
         self.parent().loadFile)
开发者ID:marmyshev,项目名称:transitions,代码行数:10,代码来源:listwidgetwithdnd.py

示例10: start_tcp

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def start_tcp(self):
     """
     Start the http server, use the port in the settings default to 4316.
     Listen out for slide and song changes so they can be broadcast to
     clients. Listen out for socket connections.
     """
     log.debug(u'Start TCP server')
     port = Settings().value(self.plugin.settingsSection + u'/port')
     address = Settings().value(self.plugin.settingsSection + u'/ip address')
     self.server = QtNetwork.QTcpServer()
     self.server.listen(QtNetwork.QHostAddress(address), port)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'slidecontroller_live_changed'),
         self.slide_change)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'slidecontroller_live_started'),
         self.item_change)
     QtCore.QObject.connect(self.server, QtCore.SIGNAL(u'newConnection()'), self.new_connection)
     log.debug(u'TCP listening on port %d' % port)
开发者ID:marmyshev,项目名称:transitions,代码行数:19,代码来源:httpserver.py

示例11: setupUi

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def setupUi(self):
     """
     Set up the UI
     """
     self.setObjectName(u'ThemesTab')
     SettingsTab.setupUi(self)
     self.GlobalGroupBox = QtGui.QGroupBox(self.leftColumn)
     self.GlobalGroupBox.setObjectName(u'GlobalGroupBox')
     self.GlobalGroupBoxLayout = QtGui.QVBoxLayout(self.GlobalGroupBox)
     self.GlobalGroupBoxLayout.setObjectName(u'GlobalGroupBoxLayout')
     self.DefaultComboBox = QtGui.QComboBox(self.GlobalGroupBox)
     self.DefaultComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToMinimumContentsLength)
     self.DefaultComboBox.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
     self.DefaultComboBox.setObjectName(u'DefaultComboBox')
     self.GlobalGroupBoxLayout.addWidget(self.DefaultComboBox)
     self.DefaultListView = QtGui.QLabel(self.GlobalGroupBox)
     self.DefaultListView.setObjectName(u'DefaultListView')
     self.GlobalGroupBoxLayout.addWidget(self.DefaultListView)
     self.leftLayout.addWidget(self.GlobalGroupBox)
     self.leftLayout.addStretch()
     self.LevelGroupBox = QtGui.QGroupBox(self.rightColumn)
     self.LevelGroupBox.setObjectName(u'LevelGroupBox')
     self.LevelLayout = QtGui.QFormLayout(self.LevelGroupBox)
     self.LevelLayout.setLabelAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
     self.LevelLayout.setFormAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
     self.LevelLayout.setObjectName(u'LevelLayout')
     self.SongLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
     self.SongLevelRadioButton.setObjectName(u'SongLevelRadioButton')
     self.SongLevelLabel = QtGui.QLabel(self.LevelGroupBox)
     self.SongLevelLabel.setObjectName(u'SongLevelLabel')
     self.LevelLayout.addRow(self.SongLevelRadioButton, self.SongLevelLabel)
     self.ServiceLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
     self.ServiceLevelRadioButton.setObjectName(u'ServiceLevelRadioButton')
     self.ServiceLevelLabel = QtGui.QLabel(self.LevelGroupBox)
     self.ServiceLevelLabel.setObjectName(u'ServiceLevelLabel')
     self.LevelLayout.addRow(self.ServiceLevelRadioButton, self.ServiceLevelLabel)
     self.GlobalLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox)
     self.GlobalLevelRadioButton.setObjectName(u'GlobalLevelRadioButton')
     self.GlobalLevelLabel = QtGui.QLabel(self.LevelGroupBox)
     self.GlobalLevelLabel.setObjectName(u'GlobalLevelLabel')
     self.LevelLayout.addRow(self.GlobalLevelRadioButton, self.GlobalLevelLabel)
     label_top_margin = (self.SongLevelRadioButton.sizeHint().height() -
         self.SongLevelLabel.sizeHint().height()) / 2
     for label in [self.SongLevelLabel, self.ServiceLevelLabel, self.GlobalLevelLabel]:
         rect = label.rect()
         rect.setTop(rect.top() + label_top_margin)
         label.setFrameRect(rect)
         label.setWordWrap(True)
     self.rightLayout.addWidget(self.LevelGroupBox)
     self.rightLayout.addStretch()
     QtCore.QObject.connect(self.SongLevelRadioButton, QtCore.SIGNAL(u'clicked()'), self.onSongLevelButtonClicked)
     QtCore.QObject.connect(self.ServiceLevelRadioButton, QtCore.SIGNAL(u'clicked()'),
         self.onServiceLevelButtonClicked)
     QtCore.QObject.connect(self.GlobalLevelRadioButton, QtCore.SIGNAL(u'clicked()'),
         self.onGlobalLevelButtonClicked)
     QtCore.QObject.connect(self.DefaultComboBox, QtCore.SIGNAL(u'activated(int)'), self.onDefaultComboBoxChanged)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
开发者ID:marmyshev,项目名称:transitions,代码行数:59,代码来源:themestab.py

示例12: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, mediaitem):
     self.controllers = mediaitem.controllers
     self.mediaitem = mediaitem
     self.preview_handler = Controller(False)
     self.live_handler = Controller(True)
     # messages are sent from core.ui.slidecontroller
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_start'), self.startup)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_stop'), self.shutdown)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_hide'), self.hide)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_first'), self.first)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_previous'), self.previous)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_next'), self.next)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_last'), self.last)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_slide'), self.slide)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_blank'), self.blank)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'presentations_unblank'), self.unblank)
     self.timer = QtCore.QTimer()
     self.timer.setInterval(500)
     QtCore.QObject.connect(self.timer, QtCore.SIGNAL(u'timeout()'), self.timeout)
开发者ID:marmyshev,项目名称:transitions,代码行数:21,代码来源:messagelistener.py

示例13: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, parent, plugin, icon):
     self.IconPath = u'songs/song'
     self.lockIcon = build_icon(u':/bibles/bibles_search_lock.png')
     self.unlockIcon = build_icon(u':/bibles/bibles_search_unlock.png')
     MediaManagerItem.__init__(self, parent, plugin, icon)
     # Place to store the search results for both bibles.
     self.settings = self.plugin.settingsTab
     self.quickPreviewAllowed = True
     self.hasSearch = True
     self.search_results = {}
     self.second_search_results = {}
     self.checkSearchResult()
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'bibles_load_list'), self.reloadBibles)
开发者ID:marmyshev,项目名称:transitions,代码行数:15,代码来源:mediaitem.py

示例14: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
    def __init__(self, parent, plugin):
        """
        Instantiate the wizard, and run any extra setup we need to.

        ``parent``
            The QWidget-derived parent of the wizard.

        ``plugin``
            The songs plugin.
        """
        OpenLPWizard.__init__(self, parent, plugin, u'songExportWizard', u':/wizards/wizard_exportsong.bmp')
        self.stop_export_flag = False
        QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'openlp_stop_wizard'), self.stop_export)
开发者ID:marmyshev,项目名称:transitions,代码行数:15,代码来源:songexportform.py

示例15: __init__

# 需要导入模块: from openlp.core.lib import Receiver [as 别名]
# 或者: from openlp.core.lib.Receiver import get_receiver [as 别名]
 def __init__(self, parent, plugin, icon):
     self.iconPath = u'images/image'
     self.background = False
     self.automatic = u''
     MediaManagerItem.__init__(self, parent, plugin, icon)
     self.singleServiceItem = False
     self.hasSearch = True
     self.mediaObject = None
     self.displayController = DisplayController(parent)
     self.displayController.controllerLayout = QtGui.QVBoxLayout()
     self.media_controller.register_controller(self.displayController)
     self.media_controller.set_controls_visible(self.displayController, False)
     self.displayController.previewDisplay = Display(self.displayController, False, self.displayController)
     self.displayController.previewDisplay.hide()
     self.displayController.previewDisplay.setGeometry(QtCore.QRect(0, 0, 300, 300))
     self.displayController.previewDisplay.screen = {u'size':self.displayController.previewDisplay.geometry()}
     self.displayController.previewDisplay.setup()
     self.media_controller.setup_display(self.displayController.previewDisplay, False)
     QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'video_background_replaced'),
         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'config_screen_changed'), self.displaySetup)
     # Allow DnD from the desktop
     self.listView.activateDnD()
开发者ID:marmyshev,项目名称:transitions,代码行数:26,代码来源:mediaitem.py


注:本文中的openlp.core.lib.Receiver.get_receiver方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。