Finish moving things around

bzr-revno: 2649
This commit is contained in:
Tim Bentley 2016-04-23 14:46:59 +01:00
commit 071a4438e9
44 changed files with 113 additions and 90 deletions

View File

@ -312,12 +312,9 @@ def create_separated_list(string_list):
return translate('OpenLP.core.lib', '%s, %s', 'Locale list separator: start') % (string_list[0], merged) return translate('OpenLP.core.lib', '%s, %s', 'Locale list separator: start') % (string_list[0], merged)
from .colorbutton import ColorButton
from .exceptions import ValidationError from .exceptions import ValidationError
from .filedialog import FileDialog from .filedialog import FileDialog
from .screen import ScreenList from .screen import ScreenList
from .listwidgetwithdnd import ListWidgetWithDnD
from .treewidgetwithdnd import TreeWidgetWithDnD
from .formattingtags import FormattingTags from .formattingtags import FormattingTags
from .spelltextedit import SpellTextEdit from .spelltextedit import SpellTextEdit
from .plugin import PluginStatus, StringContent, Plugin from .plugin import PluginStatus, StringContent, Plugin
@ -325,8 +322,6 @@ from .pluginmanager import PluginManager
from .settingstab import SettingsTab from .settingstab import SettingsTab
from .serviceitem import ServiceItem, ServiceItemType, ItemCapabilities from .serviceitem import ServiceItem, ServiceItemType, ItemCapabilities
from .htmlbuilder import build_html, build_lyrics_format_css, build_lyrics_outline_css from .htmlbuilder import build_html, build_lyrics_format_css, build_lyrics_outline_css
from .toolbar import OpenLPToolbar
from .dockwidget import OpenLPDockWidget
from .imagemanager import ImageManager from .imagemanager import ImageManager
from .renderer import Renderer from .renderer import Renderer
from .mediamanageritem import MediaManagerItem from .mediamanageritem import MediaManagerItem

View File

@ -29,10 +29,11 @@ import re
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, RegistryProperties, Settings, UiStrings, translate from openlp.core.common import Registry, RegistryProperties, Settings, UiStrings, translate
from openlp.core.lib import FileDialog, OpenLPToolbar, ServiceItem, StringContent, ListWidgetWithDnD, \ from openlp.core.lib import FileDialog, ServiceItem, StringContent, ServiceItemContext
ServiceItemContext
from openlp.core.lib.searchedit import SearchEdit from openlp.core.lib.searchedit import SearchEdit
from openlp.core.lib.ui import create_widget_action, critical_error_message_box from openlp.core.lib.ui import create_widget_action, critical_error_message_box
from openlp.core.ui.lib.listwidgetwithdnd import ListWidgetWithDnD
from openlp.core.ui.lib.toolbar import OpenLPToolbar
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -113,7 +113,6 @@ from .settingsform import SettingsForm
from .formattingtagform import FormattingTagForm from .formattingtagform import FormattingTagForm
from .formattingtagcontroller import FormattingTagController from .formattingtagcontroller import FormattingTagController
from .shortcutlistform import ShortcutListForm from .shortcutlistform import ShortcutListForm
from .mediadockmanager import MediaDockManager
from .servicemanager import ServiceManager from .servicemanager import ServiceManager
from .thememanager import ThemeManager from .thememanager import ThemeManager
from .projector.manager import ProjectorManager from .projector.manager import ProjectorManager
@ -121,7 +120,7 @@ from .projector.tab import ProjectorTab
from .projector.editform import ProjectorEditForm from .projector.editform import ProjectorEditForm
__all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeForm', __all__ = ['SplashScreen', 'AboutForm', 'SettingsForm', 'MainDisplay', 'SlideController', 'ServiceManager', 'ThemeForm',
'ThemeManager', 'MediaDockManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm', 'ThemeManager', 'ServiceItemEditForm', 'FirstTimeForm', 'FirstTimeLanguageForm',
'Display', 'ServiceNoteForm', 'ThemeLayoutForm', 'FileRenameForm', 'StartTimeForm', 'MainDisplay', 'Display', 'ServiceNoteForm', 'ThemeLayoutForm', 'FileRenameForm', 'StartTimeForm', 'MainDisplay',
'SlideController', 'DisplayController', 'GeneralTab', 'ThemesTab', 'AdvancedTab', 'PluginForm', 'SlideController', 'DisplayController', 'GeneralTab', 'ThemesTab', 'AdvancedTab', 'PluginForm',
'FormattingTagForm', 'ShortcutListForm', 'FormattingTagController', 'SingleColumnTableWidget', 'FormattingTagForm', 'ShortcutListForm', 'FormattingTagController', 'SingleColumnTableWidget',

View File

@ -27,7 +27,8 @@ import logging
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, Settings, UiStrings, translate, get_images_filter from openlp.core.common import Registry, Settings, UiStrings, translate, get_images_filter
from openlp.core.lib import SettingsTab, ScreenList, ColorButton, build_icon from openlp.core.lib import SettingsTab, ScreenList, build_icon
from openlp.core.ui.lib.colorbutton import ColorButton
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -19,3 +19,15 @@
# with this program; if not, write to the Free Software Foundation, Inc., 59 # # with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
from .colorbutton import ColorButton
from .listwidgetwithdnd import ListWidgetWithDnD
from .treewidgetwithdnd import TreeWidgetWithDnD
from .toolbar import OpenLPToolbar
from .dockwidget import OpenLPDockWidget
from .wizard import OpenLPWizard, WizardStrings
from .mediadockmanager import MediaDockManager
from .listpreviewwidget import ListPreviewWidget
__all__ = ['ColorButton', 'ListPreviewWidget', 'ListWidgetWithDnD', 'OpenLPToolbar', 'OpenLPDockWidget',
'OpenLPWizard', 'WizardStrings', 'MediaDockManager', 'ListPreviewWidget']

View File

@ -38,15 +38,17 @@ from openlp.core.common import Registry, RegistryProperties, AppLocation, Langua
check_directory_exists, translate, is_win, is_macosx, add_actions check_directory_exists, translate, is_win, is_macosx, add_actions
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
from openlp.core.common.versionchecker import get_application_version from openlp.core.common.versionchecker import get_application_version
from openlp.core.lib import Renderer, OpenLPDockWidget, PluginManager, ImageManager, PluginStatus, ScreenList, \ from openlp.core.lib import Renderer, PluginManager, ImageManager, PluginStatus, ScreenList, build_icon
build_icon
from openlp.core.lib.ui import UiStrings, create_action from openlp.core.lib.ui import UiStrings, create_action
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \ from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, ThemeManager, LiveController, PluginForm, \
MediaDockManager, ShortcutListForm, FormattingTagForm, PreviewController ShortcutListForm, FormattingTagForm, PreviewController
from openlp.core.ui.firsttimeform import FirstTimeForm from openlp.core.ui.firsttimeform import FirstTimeForm
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.ui.projector.manager import ProjectorManager from openlp.core.ui.projector.manager import ProjectorManager
from openlp.core.ui.lib.toolbar import OpenLPToolbar
from openlp.core.ui.lib.dockwidget import OpenLPDockWidget
from openlp.core.ui.lib.mediadockmanager import MediaDockManager
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -29,14 +29,16 @@ import datetime
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets
from openlp.core.common import OpenLPMixin, Registry, RegistryMixin, RegistryProperties, Settings, UiStrings, translate from openlp.core.common import OpenLPMixin, Registry, RegistryMixin, RegistryProperties, Settings, UiStrings, translate
from openlp.core.lib import OpenLPToolbar, ItemCapabilities from openlp.core.lib import ItemCapabilities
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, get_media_players, set_media_players,\
parse_optical_path
from openlp.core.ui.media.vendor.mediainfoWrapper import MediaInfoWrapper
from openlp.core.ui.media.mediaplayer import MediaPlayer
from openlp.core.common import AppLocation from openlp.core.common import AppLocation
from openlp.core.ui import DisplayControllerType from openlp.core.ui import DisplayControllerType
from openlp.core.ui.media.vendor.mediainfoWrapper import MediaInfoWrapper
from openlp.core.ui.media.mediaplayer import MediaPlayer
from openlp.core.ui.media import MediaState, MediaInfo, MediaType, get_media_players, set_media_players,\
parse_optical_path
from openlp.core.ui.lib.toolbar import OpenLPToolbar
from openlp.core.ui.lib.dockwidget import OpenLPDockWidget
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -26,9 +26,10 @@ import platform
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, Settings, UiStrings, translate from openlp.core.common import Registry, Settings, UiStrings, translate
from openlp.core.lib import ColorButton, SettingsTab from openlp.core.lib import SettingsTab
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
from openlp.core.ui.lib.colorbutton import ColorButton
class MediaQCheckBox(QtWidgets.QCheckBox): class MediaQCheckBox(QtWidgets.QCheckBox):

View File

@ -35,7 +35,7 @@ from PyQt5.QtWidgets import QWidget
from openlp.core.common import RegistryProperties, Settings, OpenLPMixin, \ from openlp.core.common import RegistryProperties, Settings, OpenLPMixin, \
RegistryMixin, translate RegistryMixin, translate
from openlp.core.lib import OpenLPToolbar from openlp.core.ui.lib import OpenLPToolbar
from openlp.core.lib.ui import create_widget_action from openlp.core.lib.ui import create_widget_action
from openlp.core.lib.projector import DialogSourceStyle from openlp.core.lib.projector import DialogSourceStyle
from openlp.core.lib.projector.constants import * from openlp.core.lib.projector.constants import *

View File

@ -35,9 +35,10 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, RegistryProperties, AppLocation, Settings, ThemeLevel, OpenLPMixin, \ from openlp.core.common import Registry, RegistryProperties, AppLocation, Settings, ThemeLevel, OpenLPMixin, \
RegistryMixin, check_directory_exists, UiStrings, translate, split_filename, delete_file RegistryMixin, check_directory_exists, UiStrings, translate, split_filename, delete_file
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
from openlp.core.lib import OpenLPToolbar, ServiceItem, ItemCapabilities, PluginStatus, build_icon from openlp.core.lib import ServiceItem, ItemCapabilities, PluginStatus, build_icon
from openlp.core.lib.ui import critical_error_message_box, create_widget_action, find_and_set_in_combo_box from openlp.core.lib.ui import critical_error_message_box, create_widget_action, find_and_set_in_combo_box
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm
from openlp.core.ui.lib import OpenLPToolbar
from openlp.core.common.languagemanager import format_time from openlp.core.common.languagemanager import format_time

View File

@ -33,11 +33,14 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, RegistryProperties, Settings, SlideLimits, UiStrings, translate, \ from openlp.core.common import Registry, RegistryProperties, Settings, SlideLimits, UiStrings, translate, \
RegistryMixin, OpenLPMixin RegistryMixin, OpenLPMixin
from openlp.core.common.actions import ActionList, CategoryOrder from openlp.core.common.actions import ActionList, CategoryOrder
from openlp.core.lib import OpenLPToolbar, ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, \ from openlp.core.lib import ItemCapabilities, ServiceItem, ImageSource, ServiceItemAction, ScreenList, build_icon, \
ScreenList, build_icon, build_html build_html
from openlp.core.lib.ui import create_action from openlp.core.lib.ui import create_action
from openlp.core.ui.lib.toolbar import OpenLPToolbar
from openlp.core.ui.lib.dockwidget import OpenLPDockWidget
from openlp.core.ui.lib.listpreviewwidget import ListPreviewWidget
from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType from openlp.core.ui import HideMode, MainDisplay, Display, DisplayControllerType
from openlp.core.ui.listpreviewwidget import ListPreviewWidget
# Threshold which has to be trespassed to toggle. # Threshold which has to be trespassed to toggle.
HIDE_MENU_THRESHOLD = 27 HIDE_MENU_THRESHOLD = 27

View File

@ -31,6 +31,7 @@ from openlp.core.common import Registry, RegistryProperties, UiStrings, translat
from openlp.core.lib.theme import BackgroundType, BackgroundGradientType from openlp.core.lib.theme import BackgroundType, BackgroundGradientType
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui import ThemeLayoutForm from openlp.core.ui import ThemeLayoutForm
from openlp.core.ui.lib.colorbutton import ColorButton
from .themewizard import Ui_ThemeWizard from .themewizard import Ui_ThemeWizard
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -31,11 +31,12 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, RegistryProperties, AppLocation, Settings, OpenLPMixin, RegistryMixin, \ from openlp.core.common import Registry, RegistryProperties, AppLocation, Settings, OpenLPMixin, RegistryMixin, \
check_directory_exists, UiStrings, translate, is_win, get_filesystem_encoding, delete_file check_directory_exists, UiStrings, translate, is_win, get_filesystem_encoding, delete_file
from openlp.core.lib import FileDialog, ImageSource, OpenLPToolbar, ValidationError, get_text_file_string, build_icon, \ from openlp.core.lib import FileDialog, ImageSource, ValidationError, get_text_file_string, build_icon, \
check_item_selected, create_thumb, validate_thumb check_item_selected, create_thumb, validate_thumb
from openlp.core.lib.theme import ThemeXML, BackgroundType from openlp.core.lib.theme import ThemeXML, BackgroundType
from openlp.core.lib.ui import critical_error_message_box, create_widget_action from openlp.core.lib.ui import critical_error_message_box, create_widget_action
from openlp.core.ui import FileRenameForm, ThemeForm from openlp.core.ui import FileRenameForm, ThemeForm
from openlp.core.ui.lib import OpenLPToolbar
from openlp.core.common.languagemanager import get_locale_key from openlp.core.common.languagemanager import get_locale_key

View File

@ -25,9 +25,10 @@ The Create/Edit theme wizard
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import UiStrings, translate, is_macosx from openlp.core.common import UiStrings, translate, is_macosx
from openlp.core.lib import build_icon, ColorButton from openlp.core.lib import build_icon
from openlp.core.lib.theme import HorizontalType, BackgroundType, BackgroundGradientType 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.lib.ui import add_welcome_page, create_valign_selection_widgets
from openlp.core.ui.lib.colorbutton import ColorButton
class Ui_ThemeWizard(object): class Ui_ThemeWizard(object):

View File

@ -23,8 +23,9 @@
from PyQt5 import QtGui, QtWidgets from PyQt5 import QtGui, QtWidgets
from openlp.core.common import Settings, UiStrings, translate from openlp.core.common import Settings, UiStrings, translate
from openlp.core.lib import ColorButton, SettingsTab from openlp.core.lib import SettingsTab
from openlp.core.lib.ui import create_valign_selection_widgets from openlp.core.lib.ui import create_valign_selection_widgets
from openlp.core.ui.lib.colorbutton import ColorButton
class AlertsTab(SettingsTab): class AlertsTab(SettingsTab):

View File

@ -31,7 +31,7 @@ from PyQt5 import QtWidgets
from openlp.core.common import AppLocation, Settings, UiStrings, translate, clean_filename from openlp.core.common import AppLocation, Settings, UiStrings, translate, clean_filename
from openlp.core.lib.db import delete_database from openlp.core.lib.db import delete_database
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.lib.wizard import OpenLPWizard, WizardStrings
from openlp.core.common.languagemanager import get_locale_key from openlp.core.common.languagemanager import get_locale_key
from openlp.plugins.bibles.lib.manager import BibleFormat from openlp.plugins.bibles.lib.manager import BibleFormat
from openlp.plugins.bibles.lib.db import BiblesResourcesDB, clean_filename from openlp.plugins.bibles.lib.db import BiblesResourcesDB, clean_filename

View File

@ -32,7 +32,7 @@ from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, AppLocation, UiStrings, Settings, check_directory_exists, translate, \ from openlp.core.common import Registry, AppLocation, UiStrings, Settings, check_directory_exists, translate, \
delete_file delete_file
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.lib.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, OldBibleDB, BiblesResourcesDB from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta, OldBibleDB, BiblesResourcesDB
from openlp.plugins.bibles.lib.http import BSExtract, BGExtract, CWExtract from openlp.plugins.bibles.lib.http import BSExtract, BGExtract, CWExtract

View File

@ -23,7 +23,8 @@
from PyQt5 import QtWidgets from PyQt5 import QtWidgets
from openlp.core.common import Settings, UiStrings, translate from openlp.core.common import Settings, UiStrings, translate
from openlp.core.lib import ColorButton, SettingsTab from openlp.core.lib import SettingsTab
from openlp.core.ui.lib.colorbutton import ColorButton
class ImageTab(SettingsTab): class ImageTab(SettingsTab):

View File

@ -27,9 +27,10 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry, AppLocation, Settings, UiStrings, check_directory_exists, translate, \ from openlp.core.common import Registry, AppLocation, Settings, UiStrings, check_directory_exists, translate, \
delete_file, get_images_filter delete_file, get_images_filter
from openlp.core.lib import ItemCapabilities, MediaManagerItem, ServiceItemContext, StringContent, TreeWidgetWithDnD,\ from openlp.core.lib import ItemCapabilities, MediaManagerItem, ServiceItemContext, StringContent, build_icon, \
build_icon, check_item_selected, create_thumb, validate_thumb check_item_selected, create_thumb, validate_thumb
from openlp.core.lib.ui import create_widget_action, critical_error_message_box from openlp.core.lib.ui import create_widget_action, critical_error_message_box
from openlp.core.ui.lib.treewidgetwithdnd import TreeWidgetWithDnD
from openlp.core.common.languagemanager import get_locale_key from openlp.core.common.languagemanager import get_locale_key
from openlp.plugins.images.forms import AddGroupForm, ChooseGroupForm from openlp.plugins.images.forms import AddGroupForm, ChooseGroupForm
from openlp.plugins.images.lib.db import ImageFilenames, ImageGroups from openlp.plugins.images.lib.db import ImageFilenames, ImageGroups

View File

@ -30,7 +30,7 @@ import os
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, RegistryProperties, translate from openlp.core.common import Registry, RegistryProperties, translate
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.lib.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.songs.lib import delete_song from openlp.plugins.songs.lib import delete_song
from openlp.plugins.songs.lib.db import Song, MediaFile from openlp.plugins.songs.lib.db import Song, MediaFile
from openlp.plugins.songs.forms.songreviewwidget import SongReviewWidget from openlp.plugins.songs.forms.songreviewwidget import SongReviewWidget

View File

@ -30,7 +30,7 @@ from PyQt5 import QtCore, QtWidgets
from openlp.core.common import Registry, UiStrings, translate from openlp.core.common import Registry, UiStrings, translate
from openlp.core.lib import create_separated_list, build_icon from openlp.core.lib import create_separated_list, build_icon
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.lib.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.songs.lib.db import Song from openlp.plugins.songs.lib.db import Song
from openlp.plugins.songs.lib.openlyricsexport import OpenLyricsExport from openlp.plugins.songs.lib.openlyricsexport import OpenLyricsExport

View File

@ -31,7 +31,7 @@ from PyQt5 import QtCore, QtWidgets
from openlp.core.common import RegistryProperties, Settings, UiStrings, translate from openlp.core.common import RegistryProperties, Settings, UiStrings, translate
from openlp.core.lib import FileDialog from openlp.core.lib import FileDialog
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard, WizardStrings from openlp.core.ui.lib.wizard import OpenLPWizard, WizardStrings
from openlp.plugins.songs.lib.importer import SongFormat, SongFormatSelect from openlp.plugins.songs.lib.importer import SongFormat, SongFormatSelect
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@ -26,7 +26,7 @@ import os
import logging import logging
from openlp.core.common import translate, UiStrings, is_win from openlp.core.common import translate, UiStrings, is_win
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from .importers.opensong import OpenSongImport from .importers.opensong import OpenSongImport
from .importers.easyslides import EasySlidesImport from .importers.easyslides import EasySlidesImport
from .importers.openlp import OpenLPSongImport from .importers.openlp import OpenLPSongImport

View File

@ -90,7 +90,7 @@ import os
from lxml import etree, objectify from lxml import etree, objectify
from openlp.core.lib import translate from openlp.core.lib import translate
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib import clean_song, VerseType from openlp.plugins.songs.lib import clean_song, VerseType
from openlp.plugins.songs.lib.importers.songimport import SongImport from openlp.plugins.songs.lib.importers.songimport import SongImport
from openlp.plugins.songs.lib.db import Author, Book, Song, Topic from openlp.plugins.songs.lib.db import Author, Book, Song, Topic

View File

@ -31,7 +31,7 @@ from sqlalchemy.orm.exc import UnmappedClassError
from openlp.core.common import translate from openlp.core.common import translate
from openlp.core.lib.db import BaseModel from openlp.core.lib.db import BaseModel
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib import clean_song from openlp.plugins.songs.lib import clean_song
from openlp.plugins.songs.lib.db import Author, Book, Song, Topic, MediaFile from openlp.plugins.songs.lib.db import Author, Book, Song, Topic, MediaFile
from .songimport import SongImport from .songimport import SongImport

View File

@ -29,7 +29,7 @@ import os
from lxml import etree from lxml import etree
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib.importers.songimport import SongImport from openlp.plugins.songs.lib.importers.songimport import SongImport
from openlp.plugins.songs.lib.ui import SongStrings from openlp.plugins.songs.lib.ui import SongStrings
from openlp.plugins.songs.lib.openlyricsxml import OpenLyrics, OpenLyricsError from openlp.plugins.songs.lib.openlyricsxml import OpenLyrics, OpenLyricsError

View File

@ -27,7 +27,7 @@ Powerpraise song files into the current database.
import os import os
from lxml import objectify from lxml import objectify
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from .songimport import SongImport from .songimport import SongImport

View File

@ -26,10 +26,11 @@ Presentationmanager song files into the current database.
import os import os
import re import re
import chardet import chardet
from lxml import objectify, etree from lxml import objectify, etree
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from .songimport import SongImport from .songimport import SongImport

View File

@ -29,7 +29,7 @@ import base64
import logging import logging
from lxml import objectify from lxml import objectify
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib import strip_rtf from openlp.plugins.songs.lib import strip_rtf
from .songimport import SongImport from .songimport import SongImport

View File

@ -28,7 +28,7 @@ import os
from PyQt5 import QtCore from PyQt5 import QtCore
from openlp.core.common import Registry, AppLocation, check_directory_exists, translate from openlp.core.common import Registry, AppLocation, check_directory_exists, translate
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib import clean_song, VerseType from openlp.plugins.songs.lib import clean_song, VerseType
from openlp.plugins.songs.lib.db import Song, Author, Topic, Book, MediaFile from openlp.plugins.songs.lib.db import Song, Author, Topic, Book, MediaFile
from openlp.plugins.songs.lib.ui import SongStrings from openlp.plugins.songs.lib.ui import SongStrings

View File

@ -29,7 +29,7 @@ import logging
import re import re
import struct import struct
from openlp.core.ui.wizard import WizardStrings from openlp.core.ui.lib.wizard import WizardStrings
from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding from openlp.plugins.songs.lib import VerseType, retrieve_windows_encoding
from openlp.plugins.songs.lib.importers.songimport import SongImport from openlp.plugins.songs.lib.importers.songimport import SongImport

View File

@ -23,13 +23,12 @@
Package to test the openlp.core.ui.projector.networkutils package. Package to test the openlp.core.ui.projector.networkutils package.
""" """
import os
from unittest import TestCase from unittest import TestCase
from openlp.core.common import verify_ip_address, md5_hash, qmd5_hash from openlp.core.common import verify_ip_address, md5_hash, qmd5_hash
from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_HASH from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_HASH
salt = TEST_SALT salt = TEST_SALT
pin = TEST_PIN pin = TEST_PIN
test_hash = TEST_HASH test_hash = TEST_HASH

View File

@ -24,7 +24,7 @@ This module contains tests for the openlp.core.lib.filedialog module
""" """
from unittest import TestCase from unittest import TestCase
from openlp.core.lib.colorbutton import ColorButton from openlp.core.ui.lib.colorbutton import ColorButton
from tests.functional import MagicMock, call, patch from tests.functional import MagicMock, call, patch
@ -33,11 +33,11 @@ class TestColorDialog(TestCase):
Test the :class:`~openlp.core.lib.colorbutton.ColorButton` class Test the :class:`~openlp.core.lib.colorbutton.ColorButton` class
""" """
def setUp(self): def setUp(self):
self.change_color_patcher = patch('openlp.core.lib.colorbutton.ColorButton.change_color') self.change_color_patcher = patch('openlp.core.ui.lib.colorbutton.ColorButton.change_color')
self.clicked_patcher = patch('openlp.core.lib.colorbutton.ColorButton.clicked') self.clicked_patcher = patch('openlp.core.ui.lib.colorbutton.ColorButton.clicked')
self.color_changed_patcher = patch('openlp.core.lib.colorbutton.ColorButton.colorChanged') self.color_changed_patcher = patch('openlp.core.ui.lib.colorbutton.ColorButton.colorChanged')
self.qt_gui_patcher = patch('openlp.core.lib.colorbutton.QtWidgets') self.qt_gui_patcher = patch('openlp.core.ui.lib.colorbutton.QtWidgets')
self.translate_patcher = patch('openlp.core.lib.colorbutton.translate', **{'return_value': 'Tool Tip Text'}) self.translate_patcher = patch('openlp.core.ui.lib.colorbutton.translate', **{'return_value': 'Tool Tip Text'})
self.addCleanup(self.change_color_patcher.stop) self.addCleanup(self.change_color_patcher.stop)
self.addCleanup(self.clicked_patcher.stop) self.addCleanup(self.clicked_patcher.stop)
self.addCleanup(self.color_changed_patcher.stop) self.addCleanup(self.color_changed_patcher.stop)
@ -55,7 +55,7 @@ class TestColorDialog(TestCase):
""" """
# GIVEN: The ColorButton class, a mocked change_color, setToolTip methods and clicked signal # GIVEN: The ColorButton class, a mocked change_color, setToolTip methods and clicked signal
with patch('openlp.core.lib.colorbutton.ColorButton.setToolTip') as mocked_set_tool_tip: with patch('openlp.core.ui.lib.colorbutton.ColorButton.setToolTip') as mocked_set_tool_tip:
# WHEN: The ColorButton object is instantiated # WHEN: The ColorButton object is instantiated
widget = ColorButton() widget = ColorButton()
@ -74,7 +74,7 @@ class TestColorDialog(TestCase):
self.change_color_patcher.stop() self.change_color_patcher.stop()
# GIVEN: An instance of the ColorButton object, and a mocked out setStyleSheet # GIVEN: An instance of the ColorButton object, and a mocked out setStyleSheet
with patch('openlp.core.lib.colorbutton.ColorButton.setStyleSheet') as mocked_set_style_sheet: with patch('openlp.core.ui.lib.colorbutton.ColorButton.setStyleSheet') as mocked_set_style_sheet:
widget = ColorButton() widget = ColorButton()
# WHEN: Changing the color # WHEN: Changing the color
@ -123,7 +123,7 @@ class TestColorDialog(TestCase):
""" """
# GIVEN: An instance of ColorButton, with a mocked __init__ # GIVEN: An instance of ColorButton, with a mocked __init__
with patch('openlp.core.lib.colorbutton.ColorButton.__init__', **{'return_value': None}): with patch('openlp.core.ui.lib.colorbutton.ColorButton.__init__', **{'return_value': None}):
widget = ColorButton() widget = ColorButton()
# WHEN: Setting the color property # WHEN: Setting the color property

View File

@ -20,12 +20,12 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
""" """
Package to test the openlp.core.ui.listpreviewwidget package. Package to test the openlp.core.ui.lib.listpreviewwidget package.
""" """
from unittest import TestCase from unittest import TestCase
from openlp.core.common import Settings from openlp.core.common import Settings
from openlp.core.ui.listpreviewwidget import ListPreviewWidget from openlp.core.ui.lib.listpreviewwidget import ListPreviewWidget
from openlp.core.lib import ServiceItem from openlp.core.lib import ServiceItem
from tests.functional import MagicMock, patch, call from tests.functional import MagicMock, patch, call
@ -38,13 +38,13 @@ class TestListPreviewWidget(TestCase):
Mock out stuff for all the tests Mock out stuff for all the tests
""" """
# Mock self.parent().width() # Mock self.parent().width()
self.parent_patcher = patch('openlp.core.ui.listpreviewwidget.ListPreviewWidget.parent') self.parent_patcher = patch('openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.parent')
self.mocked_parent = self.parent_patcher.start() self.mocked_parent = self.parent_patcher.start()
self.mocked_parent.width.return_value = 100 self.mocked_parent.width.return_value = 100
self.addCleanup(self.parent_patcher.stop) self.addCleanup(self.parent_patcher.stop)
# Mock Settings().value() # Mock Settings().value()
self.Settings_patcher = patch('openlp.core.ui.listpreviewwidget.Settings') self.Settings_patcher = patch('openlp.core.ui.lib.listpreviewwidget.Settings')
self.mocked_Settings = self.Settings_patcher.start() self.mocked_Settings = self.Settings_patcher.start()
self.mocked_Settings_obj = MagicMock() self.mocked_Settings_obj = MagicMock()
self.mocked_Settings_obj.value.return_value = None self.mocked_Settings_obj.value.return_value = None
@ -52,7 +52,7 @@ class TestListPreviewWidget(TestCase):
self.addCleanup(self.Settings_patcher.stop) self.addCleanup(self.Settings_patcher.stop)
# Mock self.viewport().width() # Mock self.viewport().width()
self.viewport_patcher = patch('openlp.core.ui.listpreviewwidget.ListPreviewWidget.viewport') self.viewport_patcher = patch('openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.viewport')
self.mocked_viewport = self.viewport_patcher.start() self.mocked_viewport = self.viewport_patcher.start()
self.mocked_viewport_obj = MagicMock() self.mocked_viewport_obj = MagicMock()
self.mocked_viewport_obj.width.return_value = 200 self.mocked_viewport_obj.width.return_value = 200
@ -72,8 +72,8 @@ class TestListPreviewWidget(TestCase):
self.assertIsNotNone(list_preview_widget, 'The ListPreviewWidget object should not be None') self.assertIsNotNone(list_preview_widget, 'The ListPreviewWidget object should not be None')
self.assertEquals(list_preview_widget.screen_ratio, 1, 'Should not be called') self.assertEquals(list_preview_widget.screen_ratio, 1, 'Should not be called')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
def replace_recalculate_layout_test_text(self, mocked_setRowHeight, mocked_resizeRowsToContents): def replace_recalculate_layout_test_text(self, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." enabled, txt slides unchanged in replace_service_item & __recalc... Test if "Max height for non-text slides..." enabled, txt slides unchanged in replace_service_item & __recalc...
@ -104,8 +104,8 @@ class TestListPreviewWidget(TestCase):
self.assertEquals(mocked_resizeRowsToContents.call_count, 2, 'Should be called') self.assertEquals(mocked_resizeRowsToContents.call_count, 2, 'Should be called')
self.assertEquals(mocked_setRowHeight.call_count, 0, 'Should not be called') self.assertEquals(mocked_setRowHeight.call_count, 0, 'Should not be called')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
def replace_recalculate_layout_test_img(self, mocked_setRowHeight, mocked_resizeRowsToContents): def replace_recalculate_layout_test_img(self, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." disabled, img slides unchanged in replace_service_item & __recalc... Test if "Max height for non-text slides..." disabled, img slides unchanged in replace_service_item & __recalc...
@ -140,8 +140,8 @@ class TestListPreviewWidget(TestCase):
calls = [call(0, 200), call(1, 200), call(0, 400), call(1, 400), call(0, 400), call(1, 400)] calls = [call(0, 200), call(1, 200), call(0, 400), call(1, 400), call(0, 400), call(1, 400)]
mocked_setRowHeight.assert_has_calls(calls) mocked_setRowHeight.assert_has_calls(calls)
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
def replace_recalculate_layout_test_img_max(self, mocked_setRowHeight, mocked_resizeRowsToContents): def replace_recalculate_layout_test_img_max(self, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." enabled, img slides resized in replace_service_item & __recalc... Test if "Max height for non-text slides..." enabled, img slides resized in replace_service_item & __recalc...
@ -174,9 +174,9 @@ class TestListPreviewWidget(TestCase):
calls = [call(0, 100), call(1, 100), call(0, 100), call(1, 100)] calls = [call(0, 100), call(1, 100), call(0, 100), call(1, 100)]
mocked_setRowHeight.assert_has_calls(calls) mocked_setRowHeight.assert_has_calls(calls)
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.cellWidget') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')
def row_resized_test_text(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents): def row_resized_test_text(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." enabled, text-based slides not affected in row_resized. Test if "Max height for non-text slides..." enabled, text-based slides not affected in row_resized.
@ -208,9 +208,9 @@ class TestListPreviewWidget(TestCase):
# THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should not be called # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should not be called
self.assertEquals(mocked_cellWidget_child.setMaximumWidth.call_count, 0, 'Should not be called') self.assertEquals(mocked_cellWidget_child.setMaximumWidth.call_count, 0, 'Should not be called')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.cellWidget') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')
def row_resized_test_img(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents): def row_resized_test_img(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." disabled, image-based slides not affected in row_resized. Test if "Max height for non-text slides..." disabled, image-based slides not affected in row_resized.
@ -244,9 +244,9 @@ class TestListPreviewWidget(TestCase):
# THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should not be called # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should not be called
self.assertEquals(mocked_cellWidget_child.setMaximumWidth.call_count, 0, 'Should not be called') self.assertEquals(mocked_cellWidget_child.setMaximumWidth.call_count, 0, 'Should not be called')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.resizeRowsToContents') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.resizeRowsToContents')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.setRowHeight') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.setRowHeight')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.cellWidget') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.cellWidget')
def row_resized_test_img_max(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents): def row_resized_test_img_max(self, mocked_cellWidget, mocked_setRowHeight, mocked_resizeRowsToContents):
""" """
Test if "Max height for non-text slides..." enabled, image-based slides are scaled in row_resized. Test if "Max height for non-text slides..." enabled, image-based slides are scaled in row_resized.
@ -278,10 +278,10 @@ class TestListPreviewWidget(TestCase):
# THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should be called # THEN: self.cellWidget(row, 0).children()[1].setMaximumWidth() should be called
mocked_cellWidget_child.setMaximumWidth.assert_called_once_with(150) mocked_cellWidget_child.setMaximumWidth.assert_called_once_with(150)
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.selectRow') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.selectRow')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.scrollToItem') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.scrollToItem')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.item') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.item')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.slide_count') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.slide_count')
def autoscroll_test_setting_invalid(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow): def autoscroll_test_setting_invalid(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow):
""" """
Test if 'advanced/autoscrolling' setting None or invalid, that no autoscrolling occurs on change_slide(). Test if 'advanced/autoscrolling' setting None or invalid, that no autoscrolling occurs on change_slide().
@ -314,10 +314,10 @@ class TestListPreviewWidget(TestCase):
self.assertEquals(mocked_selectRow.call_count, 0, 'Should not be called') self.assertEquals(mocked_selectRow.call_count, 0, 'Should not be called')
self.assertEquals(mocked_item.call_count, 0, 'Should not be called') self.assertEquals(mocked_item.call_count, 0, 'Should not be called')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.selectRow') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.selectRow')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.scrollToItem') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.scrollToItem')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.item') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.item')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.slide_count') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.slide_count')
def autoscroll_test_dist_bounds(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow): def autoscroll_test_dist_bounds(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow):
""" """
Test if 'advanced/autoscrolling' setting asks to scroll beyond list bounds, that it does not beyond. Test if 'advanced/autoscrolling' setting asks to scroll beyond list bounds, that it does not beyond.
@ -344,10 +344,10 @@ class TestListPreviewWidget(TestCase):
calls = [call(0, 0), call(0, 0)] calls = [call(0, 0), call(0, 0)]
mocked_item.assert_has_calls(calls) mocked_item.assert_has_calls(calls)
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.selectRow') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.selectRow')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.scrollToItem') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.scrollToItem')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.item') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.item')
@patch(u'openlp.core.ui.listpreviewwidget.ListPreviewWidget.slide_count') @patch(u'openlp.core.ui.lib.listpreviewwidget.ListPreviewWidget.slide_count')
def autoscroll_test_normal(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow): def autoscroll_test_normal(self, mocked_slide_count, mocked_item, mocked_scrollToItem, mocked_selectRow):
""" """
Test if 'advanced/autoscrolling' setting valid, autoscrolling called as expected. Test if 'advanced/autoscrolling' setting valid, autoscrolling called as expected.

View File

@ -20,7 +20,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
""" """
Package to test the openlp.core.ui.listpreviewwidget. Package to test the openlp.core.ui.lib.listpreviewwidget.
""" """
from unittest import TestCase from unittest import TestCase
@ -29,7 +29,7 @@ from PyQt5 import QtGui, QtWidgets
from openlp.core.common import Registry from openlp.core.common import Registry
from openlp.core.lib import ServiceItem from openlp.core.lib import ServiceItem
from openlp.core.ui import listpreviewwidget from openlp.core.ui.lib import ListWidgetWithDnD, ListPreviewWidget
from tests.interfaces import MagicMock, patch from tests.interfaces import MagicMock, patch
from tests.utils.osdinteraction import read_service_from_file from tests.utils.osdinteraction import read_service_from_file
from tests.helpers.testmixin import TestMixin from tests.helpers.testmixin import TestMixin
@ -48,7 +48,7 @@ class TestListPreviewWidget(TestCase, TestMixin):
self.image_manager = MagicMock() self.image_manager = MagicMock()
self.image_manager.get_image.return_value = self.image self.image_manager.get_image.return_value = self.image
Registry().register('image_manager', self.image_manager) Registry().register('image_manager', self.image_manager)
self.preview_widget = listpreviewwidget.ListPreviewWidget(self.main_window, 2) self.preview_widget = ListPreviewWidget(self.main_window, 2)
def tearDown(self): def tearDown(self):
""" """