Projector imports to fully-qualified, renamed projector dock

This commit is contained in:
Ken Roberts 2017-11-16 15:53:53 -08:00
parent d50029c636
commit c46cd951ef
10 changed files with 24 additions and 27 deletions

View File

@ -20,27 +20,17 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
""" """
:mod:`openlp.core.ui.projector` :mod:`openlp.core.projectors`
Initialization for the openlp.core.ui.projector modules. Initialization for the openlp.core.projectors modules.
""" """
__all__ = ['PJLINK_PORT', 'ERROR_MSG', 'ERROR_STRING', 'DialogSourceStyle', 'PJLink', 'Projector', from openlp.core.projectors.constants import PJLINK_PORT, ERROR_MSG, ERROR_STRING
'ProjectorDB', 'ProjectorEditForm', 'ProjectorManager', 'ProjectorTab']
# Due to circular dependencies, put the imports after defines
class DialogSourceStyle(object): class DialogSourceStyle(object):
""" """
An enumeration for projector dialog box type. An enumeration for projector dialog box type.
""" """
Tabbed = 0 Tabbed = 0
Single = 1 Single = 1
from .constants import PJLINK_PORT, ERROR_MSG, ERROR_STRING
from .db import Projector, ProjectorDB
from .editform import ProjectorEditForm
from .manager import ProjectorManager
from .pjlink import PJLink
from .tab import ProjectorTab

View File

@ -116,9 +116,9 @@ from .shortcutlistform import ShortcutListForm
from .servicemanager import ServiceManager from .servicemanager import ServiceManager
from .thememanager import ThemeManager from .thememanager import ThemeManager
from openlp.core.projectors import ProjectorManager from openlp.core.projectors.editform import ProjectorEditForm
from openlp.core.projectors import ProjectorTab from openlp.core.projectors.manager import ProjectorManager
from openlp.core.projectors import ProjectorEditForm from openlp.core.projectors.tab import ProjectorTab
__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeForm', __all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeForm',
'ThemeManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm', 'Display', 'AudioPlayer', 'ThemeManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm', 'Display', 'AudioPlayer',

View File

@ -261,8 +261,8 @@ class UiFirstTimeWizard(object):
self.alert_check_box.setText(translate('OpenLP.FirstTimeWizard', self.alert_check_box.setText(translate('OpenLP.FirstTimeWizard',
'Alerts Display informative messages while showing other slides')) 'Alerts Display informative messages while showing other slides'))
self.projectors_check_box.setText(translate('OpenLP.FirstTimeWizard', self.projectors_check_box.setText(translate('OpenLP.FirstTimeWizard',
'Projectors Control PJLink compatible projects on your network' 'Projector Controller Control PJLink compatible projects on your'
' from OpenLP')) ' network from OpenLP'))
self.no_internet_page.setTitle(translate('OpenLP.FirstTimeWizard', 'No Internet Connection')) self.no_internet_page.setTitle(translate('OpenLP.FirstTimeWizard', 'No Internet Connection'))
self.no_internet_page.setSubTitle( self.no_internet_page.setSubTitle(
translate('OpenLP.FirstTimeWizard', 'Unable to detect an Internet connection.')) translate('OpenLP.FirstTimeWizard', 'Unable to detect an Internet connection.'))

View File

@ -48,6 +48,7 @@ from openlp.core.display.screens import ScreenList
from openlp.core.display.renderer import Renderer from openlp.core.display.renderer import Renderer
from openlp.core.lib import PluginManager, ImageManager, PluginStatus, build_icon from openlp.core.lib import PluginManager, ImageManager, PluginStatus, build_icon
from openlp.core.lib.ui import create_action 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, \ from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \
ShortcutListForm, FormattingTagForm, PreviewController ShortcutListForm, FormattingTagForm, PreviewController
from openlp.core.ui.firsttimeform import FirstTimeForm from openlp.core.ui.firsttimeform import FirstTimeForm
@ -55,7 +56,6 @@ from openlp.core.widgets.dialogs import FileDialog
from openlp.core.widgets.docks import OpenLPDockWidget, MediaDockManager from openlp.core.widgets.docks import OpenLPDockWidget, MediaDockManager
from openlp.core.ui.media import MediaController from openlp.core.ui.media import MediaController
from openlp.core.ui.printserviceform import PrintServiceForm from openlp.core.ui.printserviceform import PrintServiceForm
from openlp.core.projectors import ProjectorManager
from openlp.core.ui.style import PROGRESSBAR_STYLE, get_library_stylesheet from openlp.core.ui.style import PROGRESSBAR_STYLE, get_library_stylesheet
from openlp.core.version import get_version from openlp.core.version import get_version
@ -375,7 +375,7 @@ class Ui_MainWindow(object):
self.media_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Library')) self.media_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Library'))
self.service_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Service')) self.service_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Service'))
self.theme_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Themes')) self.theme_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Themes'))
self.projector_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Projectors')) self.projector_manager_dock.setWindowTitle(translate('OpenLP.MainWindow', 'Projector Controller'))
self.file_new_item.setText(translate('OpenLP.MainWindow', '&New Service')) self.file_new_item.setText(translate('OpenLP.MainWindow', '&New Service'))
self.file_new_item.setToolTip(UiStrings().NewService) self.file_new_item.setToolTip(UiStrings().NewService)
self.file_new_item.setStatusTip(UiStrings().CreateService) self.file_new_item.setStatusTip(UiStrings().CreateService)
@ -407,7 +407,7 @@ class Ui_MainWindow(object):
translate('OpenLP.MainWindow', 'Import settings from a *.config file previously exported from ' translate('OpenLP.MainWindow', 'Import settings from a *.config file previously exported from '
'this or another machine.')) 'this or another machine.'))
self.settings_import_item.setText(translate('OpenLP.MainWindow', 'Settings')) self.settings_import_item.setText(translate('OpenLP.MainWindow', 'Settings'))
self.view_projector_manager_item.setText(translate('OpenLP.MainWindow', '&Projectors')) self.view_projector_manager_item.setText(translate('OpenLP.MainWindow', '&Projector Controller'))
self.view_projector_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Hide or show Projectors.')) self.view_projector_manager_item.setToolTip(translate('OpenLP.MainWindow', 'Hide or show Projectors.'))
self.view_projector_manager_item.setStatusTip(translate('OpenLP.MainWindow', self.view_projector_manager_item.setStatusTip(translate('OpenLP.MainWindow',
'Toggle visibility of the Projectors.')) 'Toggle visibility of the Projectors.'))

View File

@ -30,9 +30,9 @@ from openlp.core.api import ApiTab
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
from openlp.core.lib import build_icon from openlp.core.lib import build_icon
from openlp.core.projectors.tab import ProjectorTab
from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab from openlp.core.ui import AdvancedTab, GeneralTab, ThemesTab
from openlp.core.ui.media import PlayerTab from openlp.core.ui.media import PlayerTab
from openlp.core.projectors import ProjectorTab
from openlp.core.ui.settingsdialog import Ui_SettingsDialog from openlp.core.ui.settingsdialog import Ui_SettingsDialog
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -25,8 +25,9 @@ Package to test the openlp.core.projectors.pjlink base package.
from unittest import TestCase from unittest import TestCase
from unittest.mock import call, patch, MagicMock from unittest.mock import call, patch, MagicMock
from openlp.core.projectors import PJLink, Projector
from openlp.core.projectors.constants import E_PARAMETER, ERROR_STRING, S_ON, S_CONNECTED from openlp.core.projectors.constants import E_PARAMETER, ERROR_STRING, S_ON, S_CONNECTED
from openlp.core.projectors.db import Projector
from openlp.core.projectors.pjlink import PJLink
from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_CONNECT_AUTHENTICATE, TEST_HASH, TEST1_DATA from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_CONNECT_AUTHENTICATE, TEST_HASH, TEST1_DATA

View File

@ -27,9 +27,10 @@ from unittest import TestCase
from unittest.mock import patch, MagicMock from unittest.mock import patch, MagicMock
import openlp.core.projectors.pjlink import openlp.core.projectors.pjlink
from openlp.core.projectors import PJLink, Projector
from openlp.core.projectors.constants import PJLINK_ERRORS, \ from openlp.core.projectors.constants import PJLINK_ERRORS, \
E_AUTHENTICATION, E_PARAMETER, E_PROJECTOR, E_UNAVAILABLE, E_UNDEFINED E_AUTHENTICATION, E_PARAMETER, E_PROJECTOR, E_UNAVAILABLE, E_UNDEFINED
from openlp.core.projectors.db import Projector
from openlp.core.projectors.pjlink import PJLink
''' '''
from openlp.core.projectors.constants import ERROR_STRING, PJLINK_ERST_DATA, PJLINK_ERST_STATUS, \ from openlp.core.projectors.constants import ERROR_STRING, PJLINK_ERST_DATA, PJLINK_ERST_STATUS, \

View File

@ -26,11 +26,12 @@ from unittest import TestCase
from unittest.mock import patch from unittest.mock import patch
import openlp.core.projectors.pjlink import openlp.core.projectors.pjlink
from openlp.core.projectors import PJLink, Projector
from openlp.core.projectors.constants import ERROR_STRING, PJLINK_ERST_DATA, PJLINK_ERST_STATUS, \ from openlp.core.projectors.constants import ERROR_STRING, PJLINK_ERST_DATA, PJLINK_ERST_STATUS, \
PJLINK_POWR_STATUS, \ PJLINK_POWR_STATUS, \
E_ERROR, E_NOT_CONNECTED, E_SOCKET_ADDRESS_NOT_AVAILABLE, E_UNKNOWN_SOCKET_ERROR, E_WARN, \ E_ERROR, E_NOT_CONNECTED, E_SOCKET_ADDRESS_NOT_AVAILABLE, E_UNKNOWN_SOCKET_ERROR, E_WARN, \
S_CONNECTED, S_OFF, S_ON, S_NOT_CONNECTED, S_CONNECTING, S_STANDBY S_CONNECTED, S_OFF, S_ON, S_NOT_CONNECTED, S_CONNECTING, S_STANDBY
from openlp.core.projectors.db import Projector
from openlp.core.projectors.pjlink import PJLink
from tests.resources.projector.data import TEST_PIN, TEST1_DATA from tests.resources.projector.data import TEST_PIN, TEST1_DATA

View File

@ -28,7 +28,9 @@ from unittest import TestCase
from unittest.mock import patch from unittest.mock import patch
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
from openlp.core.projectors import Projector, ProjectorDB, ProjectorEditForm, ProjectorManager from openlp.core.projectors.db import Projector, ProjectorDB
from openlp.core.projectors.editform import ProjectorEditForm
from openlp.core.projectors.manager import ProjectorManager
from tests.helpers.testmixin import TestMixin from tests.helpers.testmixin import TestMixin
from tests.resources.projector.data import TEST_DB, TEST1_DATA, TEST2_DATA from tests.resources.projector.data import TEST_DB, TEST1_DATA, TEST2_DATA

View File

@ -27,7 +27,9 @@ from unittest import TestCase
from unittest.mock import patch, MagicMock from unittest.mock import patch, MagicMock
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
from openlp.core.projectors import ProjectorDB, ProjectorEditForm, ProjectorManager from openlp.core.projectors.db import ProjectorDB
from openlp.core.projectors.editform import ProjectorEditForm
from openlp.core.projectors.manager import ProjectorManager
from tests.helpers.testmixin import TestMixin from tests.helpers.testmixin import TestMixin
from tests.resources.projector.data import TEST_DB from tests.resources.projector.data import TEST_DB