From db2efd386de76c74d1cbd78bc9584b957437b48e Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 8 Jul 2009 18:18:48 +0100 Subject: [PATCH] Start to add ServiceManager --- openlp/core/__init__.py | 8 ++++---- openlp/core/lib/__init__.py | 7 ++++--- openlp/core/{ => lib}/settingsmanager.py | 6 +++++- openlp/core/ui/mainwindow.py | 4 ++-- 4 files changed, 15 insertions(+), 10 deletions(-) rename openlp/core/{ => lib}/settingsmanager.py (80%) diff --git a/openlp/core/__init__.py b/openlp/core/__init__.py index e123886b5..ca1042fac 100644 --- a/openlp/core/__init__.py +++ b/openlp/core/__init__.py @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -from settingsmanager import SettingsManager -from openlp.core.lib.pluginmanager import PluginManager - -__all__ = ['SettingsManager', 'PluginManager' ] +#from settingsmanager import SettingsManager +#from openlp.core.lib.pluginmanager import PluginManager +# +#__all__ = ['SettingsManager', 'PluginManager' ] diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index d442e3c2b..c940bd649 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -57,13 +57,15 @@ def contextMenuSeparator(base): action.setSeparator(True) return action +from settingsmanager import SettingsManager from pluginconfig import PluginConfig from plugin import Plugin +from eventmanager import EventManager +from pluginmanager import PluginManager from settingstab import SettingsTab from mediamanageritem import MediaManagerItem from event import Event from event import EventType -from eventmanager import EventManager from xmlrootclass import XmlRootClass from serviceitem import ServiceItem from eventreceiver import Receiver @@ -79,5 +81,4 @@ from baselistwithdnd import BaseListWithDnD from listwithpreviews import ListWithPreviews __all__ = [ 'translate', 'file_to_xml', 'str_to_bool', - 'contextMenuAction', 'contextMenuSeparator','ServiceItem' -] + 'contextMenuAction', 'contextMenuSeparator','ServiceItem'] diff --git a/openlp/core/settingsmanager.py b/openlp/core/lib/settingsmanager.py similarity index 80% rename from openlp/core/settingsmanager.py rename to openlp/core/lib/settingsmanager.py index 84ff69765..9272c3035 100644 --- a/openlp/core/settingsmanager.py +++ b/openlp/core/lib/settingsmanager.py @@ -19,5 +19,9 @@ Place, Suite 330, Boston, MA 02111-1307 USA """ class SettingsManager(object): - def __init__(self): + """ + Class to control the size of the UI components so they size correctly + This class is created by the main window and then calculates the size of individual components + """ + def __init__(self, screen): pass diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 504b351aa..f501ab85d 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -25,8 +25,7 @@ from PyQt4 import QtCore, QtGui from openlp.core.ui import AboutForm, SettingsForm, AlertForm, ServiceManager, \ ThemeManager, MainDisplay, SlideController from openlp.core.lib import translate, Plugin, MediaManagerItem, SettingsTab, \ - EventManager, RenderManager, PluginConfig -from openlp.core import PluginManager + EventManager, RenderManager, PluginConfig, SettingsManager, PluginManager class MainWindow(object): """ @@ -42,6 +41,7 @@ class MainWindow(object): plugins. """ self.oosNotSaved = False + self.settingsmanager = SettingsManager(screens) self.mainWindow = QtGui.QMainWindow() self.mainWindow.__class__.closeEvent = self.onCloseEvent self.mainDisplay = MainDisplay(None, screens)