forked from openlp/openlp
Started splitting out the service manager
bzr-revno: 366
This commit is contained in:
parent
c451048355
commit
bef8369e86
@ -41,7 +41,7 @@ class ServiceItem():
|
|||||||
def get_parent_node(self):
|
def get_parent_node(self):
|
||||||
"""
|
"""
|
||||||
This method returns a parent node to be inserted into the Service
|
This method returns a parent node to be inserted into the Service
|
||||||
Manager.
|
Manager. At the moment this has to be a QAbstractListModel based class
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -22,14 +22,23 @@ import os
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
from PyQt4 import *
|
from PyQt4 import *
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
from PyQt4.QtCore import *
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
# from openlp.core.resources import *
|
# from openlp.core.resources import *
|
||||||
# from openlp.core.ui import AboutForm, AlertForm, SettingsForm, SlideController
|
# from openlp.core.ui import AboutForm, AlertForm, SettingsForm, SlideController
|
||||||
from openlp.core.lib import OpenLPToolbar
|
from openlp.core.lib import OpenLPToolbar
|
||||||
|
from openlp.core.lib import ServiceItem
|
||||||
|
|
||||||
# from openlp.core import PluginManager
|
# from openlp.core import PluginManager
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
class ServiceData(QAbstractListModel):
|
||||||
|
"""
|
||||||
|
Tree of items for an order of service.
|
||||||
|
Includes methods for reading and writing the contents to an OOS file
|
||||||
|
Root contains a list of ServiceItems
|
||||||
|
"""
|
||||||
|
|
||||||
class ServiceManager(QWidget):
|
class ServiceManager(QWidget):
|
||||||
|
|
||||||
"""Manages the orders of service. Currently this involves taking
|
"""Manages the orders of service. Currently this involves taking
|
||||||
@ -63,3 +72,11 @@ class ServiceManager(QWidget):
|
|||||||
self.Layout.addWidget(self.Toolbar)
|
self.Layout.addWidget(self.Toolbar)
|
||||||
self.ListView = QtGui.QListView(self)
|
self.ListView = QtGui.QListView(self)
|
||||||
self.Layout.addWidget(self.ListView)
|
self.Layout.addWidget(self.ListView)
|
||||||
|
|
||||||
|
|
||||||
|
def addServiceItem(self, item):
|
||||||
|
"""Adds service item"""
|
||||||
|
|
||||||
|
def removeServiceItem(self):
|
||||||
|
"""Remove currently selected item"""
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class ListWithPreviews(QtCore.QAbstractListModel):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
QtCore.QAbstractListModel.__init__(self)
|
QtCore.QAbstractListModel.__init__(self)
|
||||||
self.items=[] # will be a list of (filename, QPixmap) tuples
|
self.items=[] # will be a list of (full filename, QPixmap, shortname) tuples
|
||||||
self.rowheight=50
|
self.rowheight=50
|
||||||
self.maximagewidth=self.rowheight*16/9.0;
|
self.maximagewidth=self.rowheight*16/9.0;
|
||||||
|
|
||||||
@ -156,8 +156,7 @@ class ImagePlugin(Plugin, PluginUtils):
|
|||||||
self.MediaManagerItem.PageLayout.addWidget(self.ImageListPreview)
|
self.MediaManagerItem.PageLayout.addWidget(self.ImageListPreview)
|
||||||
self.ImageListView.setGeometry(QtCore.QRect(10, 100, 256, 591))
|
self.ImageListView.setGeometry(QtCore.QRect(10, 100, 256, 591))
|
||||||
|
|
||||||
|
# return self.MediaManagerItem
|
||||||
return self.MediaManagerItem
|
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.info("Plugin Initialising")
|
log.info("Plugin Initialising")
|
||||||
|
Loading…
Reference in New Issue
Block a user