forked from openlp/openlp
Added copyright to all files.
bzr-revno: 36
This commit is contained in:
parent
a1bc7f9e83
commit
8f8053d706
@ -0,0 +1,17 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
@ -0,0 +1,17 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
@ -1,31 +0,0 @@
|
||||
import wx
|
||||
|
||||
class Canvas(wx.Window):
|
||||
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
|
||||
wx.Window.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
self.SetBackgroundColour(wx.Colour(150,150,150))
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
|
||||
def OnPaint(self, event):
|
||||
DC = wx.PaintDC(self)
|
||||
if (self.GetSize().GetWidth()*3/4) > self.GetSize().GetHeight():
|
||||
Height = self.GetSize().GetHeight()-40
|
||||
Width = (Height*4)/3
|
||||
|
||||
x = (self.GetSize().GetWidth()-Width)/2
|
||||
Rectangle = wx.Rect(x, 20, Width, Height)
|
||||
else:
|
||||
Width = self.GetSize().GetWidth()-40
|
||||
Height = (Width*3)/4
|
||||
|
||||
y = (self.GetSize().GetHeight()-Height)/2
|
||||
Rectangle = wx.Rect(20, y, Width, Height)
|
||||
DC.SetBrush(wx.Brush(wx.Colour(0,0,0)))
|
||||
DC.SetPen(wx.Pen(wx.Colour(255,255,255)))
|
||||
|
||||
if self.IsExposedRect(Rectangle):
|
||||
DC.DrawRectangleRect(Rectangle)
|
||||
|
@ -1,65 +0,0 @@
|
||||
"""
|
||||
|
||||
The openlp.org Control Panel
|
||||
|
||||
"""
|
||||
|
||||
import wx
|
||||
|
||||
from openlp.controls import slidepanel
|
||||
|
||||
class ControlPanel(wx.Window):
|
||||
|
||||
Title = ""
|
||||
Heading1 = ""
|
||||
Heading2 = ""
|
||||
Loaded = False;
|
||||
|
||||
def __init__(self, parent, title, *args, **kwargs):
|
||||
|
||||
wx.Window.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
MainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
MainSizer.AddSpacer(60)
|
||||
|
||||
self.Title = title
|
||||
|
||||
self.SlidePanel = slidepanel.SlidePanel(self)
|
||||
|
||||
MainSizer.Add(self.SlidePanel, flag=wx.EXPAND)
|
||||
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||
|
||||
self.SetSizer(MainSizer)
|
||||
self.SetAutoLayout(True)
|
||||
self.Layout()
|
||||
|
||||
def OnPaint(self, event):
|
||||
|
||||
DC = wx.PaintDC(self)
|
||||
DC.SetFont(wx.Font(pointSize=16, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD,underline=False,face="Tahoma"))
|
||||
DC.DrawText(text=self.Title,x=(self.GetSize().GetWidth()-DC.GetTextExtent(self.Title)[0])/2,y=0)
|
||||
|
||||
y = DC.GetTextExtent(self.Title)[1]
|
||||
DC.SetFont(wx.Font(pointSize=12, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_BOLD,underline=False,face="Tahoma"))
|
||||
DC.SetBrush(wx.Brush(wx.Colour(55,102,255)))
|
||||
DC.SetPen(wx.Pen(wx.Colour(55,102,255)))
|
||||
|
||||
fontHeight = DC.GetTextExtent("by")[1]
|
||||
DC.DrawRectangle(0,y,self.GetSize().GetWidth(),fontHeight);
|
||||
DC.SetTextForeground(wx.Colour(255,255,255))
|
||||
|
||||
if self.Heading1 == "":
|
||||
DC.DrawText("No media item loaded",5,y)
|
||||
else:
|
||||
DC.DrawText(self.Heading1,5,y)
|
||||
|
||||
DC.SetFont(wx.Font(pointSize=10, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL,underline=False,face="Tahoma"))
|
||||
DC.DrawRectangle(0,fontHeight+y,self.GetSize().GetWidth(),fontHeight)
|
||||
DC.DrawText(self.Heading2,5,fontHeight+y)
|
||||
self.SlidePanel.Refresh()
|
||||
|
||||
def OnSize(self, event):
|
||||
self.Layout()
|
@ -1,32 +0,0 @@
|
||||
import wx
|
||||
|
||||
class MediaManager(wx.Window):
|
||||
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
wx.Window.__init__(self, parent, *args, **kwargs)
|
||||
MainSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
MainSizer.AddSpacer(20)
|
||||
|
||||
if wx.Platform == "__WXMAC__":
|
||||
self.Notebook = wx.Choicebook(self, size=wx.Size(200,200))
|
||||
else:
|
||||
self.Notebook = wx.Notebook(self, size=wx.Size(200,200))
|
||||
|
||||
MainSizer.Add(self.Notebook, proportion=1, flag=wx.EXPAND)
|
||||
|
||||
self.SetSizer(MainSizer)
|
||||
self.SetAutoLayout(True)
|
||||
self.Layout()
|
||||
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||
|
||||
def OnPaint(self, event):
|
||||
DC = wx.PaintDC(self)
|
||||
DC.SetFont(wx.Font(pointSize=9, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL,underline=False,face="Tahoma"))
|
||||
DC.GradientFillLinear(wx.Rect(1,1,self.GetSize().GetWidth()-2,DC.GetTextExtent("by")[1]+2), wx.Colour(220,220,220), wx.Colour(255,255,255))
|
||||
DC.DrawText("Media Manager", 6, 2)
|
||||
|
||||
def OnSize(self, event):
|
||||
self.Layout()
|
@ -1,80 +0,0 @@
|
||||
import wx
|
||||
|
||||
class Slide(wx.Window):
|
||||
|
||||
SlideNum = 0
|
||||
Selected = False
|
||||
SlideText = ""
|
||||
SlideType = ""
|
||||
|
||||
def __init__(self, parent, slideText, slideNum, slideType, *args, **kwargs):
|
||||
wx.Window.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
self.SlideText = slideText
|
||||
self.SlideNum = slideNum
|
||||
self.SlideType = slideType
|
||||
|
||||
self.Bind(wx.EVT_MOUSEDOWN, self.OnMouseDown)
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
|
||||
def GetHeight(self):
|
||||
DC = wx.ClientDC(self)
|
||||
|
||||
DC.SetFont(wx.Font(pointSize=8, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL,underline=False,face="Tahoma"))
|
||||
FontHeight = DC.GetTextExtent("by")[1]
|
||||
Tokenizer = wx.StringTokenizer(self.SlideText,"\n")
|
||||
ArrayString = wx.ArrayString()
|
||||
|
||||
while Tokenizer.HasMoreTokens():
|
||||
Token = Tokenizer.GetNextToken()
|
||||
ArrayString.Add(Token)
|
||||
|
||||
return FontHeight*(ArrayString.Count()+1)
|
||||
|
||||
def GetIndex(self):
|
||||
return self.SlideNum
|
||||
|
||||
def SetSelected(self):
|
||||
if not self.Selected:
|
||||
self.Selected = True
|
||||
Refresh()
|
||||
|
||||
def DropSelected(self):
|
||||
if self.Selected:
|
||||
self.Selected = False
|
||||
Refresh()
|
||||
|
||||
def OnPaint(self, event):
|
||||
DC = wx.PaintDC(self)
|
||||
DC.SetFont(wx.Font(pointSize=9, family=wx.FONTFAMILY_MODERN, style=wx.FONTSTYLE_NORMAL, weight=wx.FONTWEIGHT_NORMAL,underline=False,face="Tahoma"))
|
||||
if self.Selected:
|
||||
Colour = wx.Colour(0,26,102)
|
||||
else:
|
||||
Colour = wx.Colour(55,102,255)
|
||||
DC.SetBrush(wx.Brush(Colour))
|
||||
DC.SetPen(wx.Pen(Colour))
|
||||
|
||||
FontHeight = DC.GetTextExtent("by")[1]
|
||||
DC.DrawRectangle(0,0,self.GetParent().GetSize().GetWidth(),FontHeight)
|
||||
DC.SetTextForeground(wx.Colour(255,255,255))
|
||||
DC.DrawText(self.SlideType,5,0)
|
||||
|
||||
Tokenizer = wx.StringTokenizer(self.SlideText,"\n")
|
||||
ArrayString = wx.ArrayString()
|
||||
|
||||
while Tokenizer.HasMoreTokens():
|
||||
Token = Tokenizer.GetNextToken()
|
||||
ArrayString.Add(Token)
|
||||
|
||||
self.SetSize(wx.Size(self.GetParent().GetSize().GetWidth(),FontHeight*(ArrayString.Count()+1)))
|
||||
DC.SetBrush(wx.Brush(wx.Colour(255,255,255)))
|
||||
DC.SetPen(wx.Pen(wx.Colour(255,255,255)))
|
||||
|
||||
DC.DrawRectangle(0,FontHeight,self.GetSize().GetWidth(),self.GetSize().GetHeight()-FontHeight)
|
||||
DC.SetTextForeGround(wx.Colour(0,0,0))
|
||||
|
||||
for i in range(0,ArrayString.Count()):
|
||||
DC.DrawText(ArrayString.Item(i),5,(i+1)*FontHeight)
|
||||
|
||||
def OnMouseDown(self, event):
|
||||
self.GetParent().SetSelected(self.SlideNum)
|
@ -1,30 +0,0 @@
|
||||
import wx
|
||||
|
||||
from openlp.controls import slide
|
||||
|
||||
class SlidePanel(wx.Window):
|
||||
|
||||
SlideEnum = 1
|
||||
NextY = 0
|
||||
|
||||
def __init__(self, parent, *args, **kwargs):
|
||||
|
||||
wx.Window.__init__(self, parent, *args, **kwargs)
|
||||
|
||||
def AddSlide(self, slideText, slideType):
|
||||
slide = slide.Slide(self, pos=wx.Point(0,self.NextY+10), slideText=slideText, slideNum=self.SlideEnum, slideType=slideType)
|
||||
self.SlideEnum = self.SlideEnum+1
|
||||
self.NextY = self.NextY + slide.GetHeight()+10
|
||||
self.SetVirtualSize(self.GetSize().GetWidth(),self.NextY)
|
||||
self.SetScrollRate(1,1)
|
||||
slide.Refresh()
|
||||
|
||||
def SetSelected(self, index):
|
||||
WindowList = self.GetChildren()
|
||||
|
||||
for Node in WindowList:
|
||||
Current = Node.GetData()
|
||||
if Current.GetIndex() == index:
|
||||
Current.SetSelected()
|
||||
else:
|
||||
Current.DropSelected()
|
@ -1,2 +1,20 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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 openlp.core.render import Renderer
|
||||
from openlp.core.settingsmanager import SettingsManager
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
# useful linear interpolation routines
|
||||
|
||||
def interp1(val1, val2, fraction):
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import sys
|
||||
from PyQt4 import QtGui, QtCore, Qt
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
class SettingsManager(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import time
|
||||
import sys
|
||||
import os, os.path
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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 test_render import TestRender_base, whoami
|
||||
import sys
|
||||
import os
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import os, os.path
|
||||
import sys
|
||||
mypath=os.path.split(os.path.abspath(__file__))[0]
|
||||
|
@ -0,0 +1,18 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
@ -0,0 +1,18 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import random
|
||||
import unittest
|
||||
|
||||
|
@ -1 +1,19 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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 theme import Theme
|
||||
|
@ -1,3 +1,21 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
mypath=os.path.split(os.path.abspath(__file__))[0]
|
||||
|
@ -1,9 +1,27 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import platform
|
||||
ver = platform.python_version()
|
||||
if ver >= '2.5':
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
else:
|
||||
from elementtree import ElementTree, XML
|
||||
from elementtree import ElementTree, XML
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
|
@ -0,0 +1,18 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
@ -1,5 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
# Form implementation generated from reading ui file 'about.ui'
|
||||
#
|
||||
# Created: Tue Oct 14 23:22:13 2008
|
||||
|
@ -1,4 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
"""
|
||||
This is the main window for openlp.org 2.0
|
||||
|
@ -0,0 +1,18 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
@ -1,92 +0,0 @@
|
||||
"""
|
||||
|
||||
wx.Frame for the main OpenLP.org window
|
||||
|
||||
"""
|
||||
|
||||
import wx
|
||||
from openlp.controls import controlpanel
|
||||
from openlp.controls import canvas
|
||||
from openlp.controls import mediamanager
|
||||
|
||||
class MainFrame(wx.Frame):
|
||||
"Main OpenLP.org frame"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"MainFrame constructor"
|
||||
|
||||
wx.Frame.__init__(self, *args, **kwargs)
|
||||
|
||||
MenuBar = wx.MenuBar()
|
||||
|
||||
FileMenu = wx.Menu()
|
||||
|
||||
MenuBar.Append(FileMenu, "&File")
|
||||
|
||||
self.SetMenuBar(MenuBar)
|
||||
|
||||
self.MainSplitter = wx.SplitterWindow(self, size=self.GetClientSize(), style=wx.SP_3D)
|
||||
self.PreviewSplitter = wx.SplitterWindow(self.MainSplitter, size=self.MainSplitter.GetClientSize(), style=wx.SP_3D)
|
||||
self.LiveSplitter = wx.SplitterWindow(self.MainSplitter, size=self.MainSplitter.GetClientSize(), style=wx.SP_3D)
|
||||
LiveControlPanel = controlpanel.ControlPanel(self.LiveSplitter,title="Live")
|
||||
PreviewControlPanel = controlpanel.ControlPanel(self.PreviewSplitter,title="Preview")
|
||||
LiveCanvas = canvas.Canvas(self.LiveSplitter)
|
||||
PreviewCanvas = canvas.Canvas(self.PreviewSplitter)
|
||||
|
||||
self.MainSplitter.SplitVertically(self.PreviewSplitter, self.LiveSplitter)
|
||||
self.LiveSplitter.SplitHorizontally(LiveControlPanel,LiveCanvas)
|
||||
self.PreviewSplitter.SplitHorizontally(PreviewControlPanel,PreviewCanvas)
|
||||
|
||||
self.MainSplitter.SetMinimumPaneSize(200)
|
||||
self.LiveSplitter.SetMinimumPaneSize(200)
|
||||
self.PreviewSplitter.SetMinimumPaneSize(200)
|
||||
|
||||
MainSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
MediaManager = mediamanager.MediaManager(self, size=wx.Size(200,200))
|
||||
OrderOfServiceFrame = wx.Panel(self, size=wx.Size(200,200))
|
||||
|
||||
self.SetSizer(MainSizer)
|
||||
|
||||
MainSizer.Add(MediaManager, flag=wx.EXPAND)
|
||||
MainSizer.Add(self.MainSplitter, proportion=1, flag=wx.EXPAND)
|
||||
MainSizer.Add(OrderOfServiceFrame, flag=wx.EXPAND)
|
||||
|
||||
self.CreateStatusBar(1)
|
||||
self.SetStatusText("openlp.org")
|
||||
|
||||
MainSizer.SetSizeHints(self)
|
||||
|
||||
self.SetAutoLayout(True)
|
||||
|
||||
self.Layout()
|
||||
|
||||
self.MainSplitter.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.MainSplitterOnChanged)
|
||||
self.LiveSplitter.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.LiveSplitterOnChanged)
|
||||
self.PreviewSplitter.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.PreviewSplitterOnChanged)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSize)
|
||||
|
||||
def MainSplitterOnChanged(self,event):
|
||||
self.MainSplitter.SetSashPosition(self.MainSplitter.GetClientSize().GetWidth()/2,True)
|
||||
|
||||
def LiveSplitterOnChanged(self,event):
|
||||
|
||||
WindowList = self.LiveSplitter.GetChildren()
|
||||
|
||||
for Node in WindowList:
|
||||
Node.Refresh()
|
||||
|
||||
def PreviewSplitterOnChanged(self,event):
|
||||
|
||||
WindowList = self.PreviewSplitter.GetChildren()
|
||||
|
||||
for Node in WindowList:
|
||||
Node.Refresh()
|
||||
|
||||
def OnSize(self,event):
|
||||
|
||||
self.Layout()
|
||||
|
||||
self.MainSplitterOnChanged(event)
|
||||
self.LiveSplitterOnChanged(event)
|
||||
self.PreviewSplitterOnChanged(event)
|
@ -1,12 +1,30 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# Utility Helper to allow classes to find directories in a standard manner
|
||||
|
||||
def get_registry_value(reg, key, value_name):
|
||||
k = _winreg.OpenKey(reg, key)
|
||||
value = _winreg.QueryValueEx(k, value_name)[0]
|
||||
_winreg.CloseKey(k)
|
||||
return value
|
||||
k = _winreg.OpenKey(reg, key)
|
||||
value = _winreg.QueryValueEx(k, value_name)[0]
|
||||
_winreg.CloseKey(k)
|
||||
return value
|
||||
|
||||
def getConfigPath():
|
||||
if os.name == 'nt':
|
||||
|
@ -1 +1,19 @@
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008 Martin Thompson, Tim Bentley
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
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
|
||||
"""
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user