Service Management

ServiceItem
A ServiceItem contains the data for an item in the Service, be it images, text or anything else. It also contains the instructions necessary to render said data on a drawing surface.

Service
The Service is a class that holds a list of ServiceItems which can be saved to or loaded from disk.

ServiceManager
The ServiceManager manages the list of items in the Service. The ServiceManager is used to save and load Services from disk, and passes the current ServiceItem to the SlideController for controlling and displaying. The ServiceManager works closely with the ServiceView, to show the user what ServiceItems are in the Service.

ServiceView
The ServiceView displays all the ServiceItems in a Service, via the ServiceManager.

Service Manager (subsystem)
The Service Manager is a group of components which deal with managing a service.

Plugin
The Plugin creates a descendant class of ServiceItem, such as SongServiceItem. This ServiceItem descendant re-implements a number of core methods/properties so that other components can retrieve information from the ServiceItem. The plugin gives the ServiceManager an instance of the ServiceItem descendant when you drag and drop the media item in the plugin into the ServiceView.

SlideController
The SlideController controls which slide is being displayed at any current moment. It receives a ServiceItem from the ServiceManager and uses the slide information in the ServiceItem to draw its list of slides, and then it uses the render function of the ServiceItem to draw a slide onto a drawing object, and then passes this drawing object into the render signal, to be processed by a slot.

Service Management Process
This is the two-part process that takes place when a user drags and drops an item into the Service Manager, and then double-clicks on the item to make it appear on the live screen.

User Action
The user drags an item (or group of items) from a plugin across to the service manager and drops it.

Program Action

 * 1) A new ServiceItem descendant object is created.
 * 2) The item or group of items which was dropped on the service manager is added to this new ServiceItem.
 * 3) The ServiceItem is added to the ServiceManager object.
 * 4) The ServiceManager adds the ServiceItem to the currently active Service object.
 * 5) The ServiceManager sends an updated list of ServiceItems to the ServiceView object.
 * 6) The ServiceView redraws itself according to the information in the list of ServiceItem objects.
 * 7) The ServiceManager sets the Service state to "modified."

User Action
The user double-clicks on an item in the service manager, and it appears in the Live controller.

Program Action

 * 1) The ServiceManager object notes which ServiceItem was double-clicked, and which slide was double-clicked.
 * 2) The ServiceManager passes the ServiceItem object, plus the slide number, to the SlideController object.
 * 3) The SlideController loads the ServiceItem, displaying the slides.
 * 4) The SlideController calls the ServiceItem's   method.
 * 5) The SlideController fires the   signal, passing the rendered output to the slot.
 * 6) openlp.org decides if, where, and how to display the rendered output.