forked from openlp/openlp
Use buildIcon and general fixes all over
This commit is contained in:
parent
8ec6a5b73d
commit
1a7ad33bf9
18
openlp.pyw
18
openlp.pyw
@ -25,10 +25,11 @@
|
||||
|
||||
import sys
|
||||
import logging
|
||||
import logging.handlers
|
||||
|
||||
from logging.handlers import RotatingFileHandler
|
||||
from optparse import OptionParser
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4.QtCore import QObject, SIGNAL
|
||||
from PyQt4.QtGui import QApplication
|
||||
|
||||
from openlp.core.lib import Receiver, str_to_bool
|
||||
from openlp.core.resources import qInitResources
|
||||
@ -37,7 +38,7 @@ from openlp.core.utils import ConfigHelper
|
||||
|
||||
log = logging.getLogger()
|
||||
|
||||
class OpenLP(QtGui.QApplication):
|
||||
class OpenLP(QApplication):
|
||||
"""
|
||||
The core application class. This class inherits from Qt's QApplication
|
||||
class in order to provide the core of the application.
|
||||
@ -55,8 +56,8 @@ class OpenLP(QtGui.QApplication):
|
||||
except:
|
||||
pass
|
||||
#provide a listener for widgets to reqest a screen update.
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'process_events'), self.processEvents)
|
||||
QObject.connect(Receiver.get_receiver(),
|
||||
SIGNAL(u'process_events'), self.processEvents)
|
||||
self.setApplicationName(u'OpenLP')
|
||||
self.setApplicationVersion(u'1.9.0')
|
||||
show_splash = str_to_bool(ConfigHelper.get_registry().get_value(
|
||||
@ -94,10 +95,9 @@ def main():
|
||||
action="store_true", help="set logging to DEBUG level")
|
||||
# Set up logging
|
||||
filename = u'openlp.log'
|
||||
logfile = logging.handlers.RotatingFileHandler(
|
||||
filename, maxBytes=200000, backupCount=5)
|
||||
logfile.setFormatter(
|
||||
logging.Formatter(u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))
|
||||
logfile = RotatingFileHandler(filename, maxBytes=200000, backupCount=5)
|
||||
logfile.setFormatter(logging.Formatter(
|
||||
u'%(asctime)s %(name)-15s %(levelname)-8s %(message)s'))
|
||||
log.addHandler(logfile)
|
||||
# Parse command line options and deal with them.
|
||||
(options, args) = parser.parse_args()
|
||||
|
@ -29,7 +29,8 @@ OpenLP work.
|
||||
|
||||
import types
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4.QtCore import QObject, SIGNAL
|
||||
from PyQt4.QtGui import QAction, QIcon, QImage, QPixmap, QApplication as QApp
|
||||
|
||||
def translate(context, text):
|
||||
"""
|
||||
@ -44,8 +45,7 @@ def translate(context, text):
|
||||
``text``
|
||||
The text to put into the translation tables for translation.
|
||||
"""
|
||||
return QtGui.QApplication.translate(context, text, None,
|
||||
QtGui.QApplication.UnicodeUTF8)
|
||||
return QApp.translate(context, text, None, QApp.UnicodeUTF8)
|
||||
|
||||
def file_to_xml(xmlfile):
|
||||
"""
|
||||
@ -79,33 +79,31 @@ def buildIcon(icon):
|
||||
``:/resource/file.png``, or a file location like ``/path/to/file.png``.
|
||||
"""
|
||||
ButtonIcon = None
|
||||
if type(icon) is QtGui.QIcon:
|
||||
if type(icon) is QIcon:
|
||||
ButtonIcon = icon
|
||||
elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
|
||||
ButtonIcon = QtGui.QIcon()
|
||||
ButtonIcon = QIcon()
|
||||
if icon.startswith(u':/'):
|
||||
ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
|
||||
QtGui.QIcon.Off)
|
||||
ButtonIcon.addPixmap(QPixmap(icon), QIcon.Normal, QIcon.Off)
|
||||
else:
|
||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
elif type(icon) is QtGui.QImage:
|
||||
ButtonIcon = QtGui.QIcon()
|
||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(icon),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ButtonIcon.addPixmap(QPixmap.fromImage(QImage(icon)),
|
||||
QIcon.Normal, QIcon.Off)
|
||||
elif type(icon) is QImage:
|
||||
ButtonIcon = QIcon()
|
||||
ButtonIcon.addPixmap(QPixmap.fromImage(icon), QIcon.Normal, QIcon.Off)
|
||||
return ButtonIcon
|
||||
|
||||
def contextMenuAction(base, icon, text, slot):
|
||||
"""
|
||||
Utility method to help build context menus for plugins
|
||||
"""
|
||||
action = QtGui.QAction(text, base)
|
||||
action .setIcon(buildIcon(icon))
|
||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered()'), slot)
|
||||
action = QAction(text, base)
|
||||
action.setIcon(buildIcon(icon))
|
||||
QObject.connect(action, SIGNAL(u'triggered()'), slot)
|
||||
return action
|
||||
|
||||
def contextMenuSeparator(base):
|
||||
action = QtGui.QAction("", base)
|
||||
action = QAction("", base)
|
||||
action.setSeparator(True)
|
||||
return action
|
||||
|
||||
|
@ -22,17 +22,18 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4.QtCore import QMimeData, Qt
|
||||
from PyQt4.QtGui import QDrag, QListWidget
|
||||
|
||||
from openlp.core.lib.toolbar import *
|
||||
|
||||
class BaseListWithDnD(QtGui.QListWidget):
|
||||
class BaseListWithDnD(QListWidget):
|
||||
"""
|
||||
Please put a short description of what this class does in here.
|
||||
"""
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QtGui.QListWidget.__init__(self, parent)
|
||||
QListWidget.__init__(self, parent)
|
||||
# this must be set by the class which is inheriting
|
||||
assert(self.PluginName)
|
||||
|
||||
@ -42,10 +43,10 @@ class BaseListWithDnD(QtGui.QListWidget):
|
||||
as the recipient will use events to request the data move
|
||||
just tell it what plugin to call
|
||||
"""
|
||||
if event.buttons() != QtCore.Qt.LeftButton:
|
||||
if event.buttons() != Qt.LeftButton:
|
||||
return
|
||||
drag = QtGui.QDrag(self)
|
||||
mimeData = QtCore.QMimeData()
|
||||
drag = QDrag(self)
|
||||
mimeData = QMimeData()
|
||||
drag.setMimeData(mimeData)
|
||||
mimeData.setText(self.PluginName)
|
||||
dropAction = drag.start(QtCore.Qt.CopyAction)
|
||||
dropAction = drag.start(Qt.CopyAction)
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.QtGui import QDockWidget
|
||||
|
||||
class OpenLPDockWidget(QtGui.QDockWidget):
|
||||
class OpenLPDockWidget(QDockWidget):
|
||||
"""
|
||||
Custom DockWidget class to handle events
|
||||
"""
|
||||
@ -34,10 +34,11 @@ class OpenLPDockWidget(QtGui.QDockWidget):
|
||||
"""
|
||||
Initialise the DockWidget
|
||||
"""
|
||||
QtGui.QDockWidget.__init__(self, parent)
|
||||
QDockWidget.__init__(self, parent)
|
||||
self.parent = parent
|
||||
if name is not None:
|
||||
self.setObjectName(name)
|
||||
self.setFloating(False)
|
||||
self.log = logging.getLogger(u'OpenLPDockWidget')
|
||||
self.log.debug(u'Init done')
|
||||
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtCore
|
||||
from PyQt4.QtCore import QObject, SIGNAL
|
||||
|
||||
class EventReceiver(QtCore.QObject):
|
||||
class EventReceiver(QObject):
|
||||
"""
|
||||
Class to allow events to be passed from different parts of the
|
||||
system. This is a private class and should not be used directly
|
||||
@ -91,7 +91,7 @@ class EventReceiver(QtCore.QObject):
|
||||
"""
|
||||
Initialise the event receiver, calling the parent constructor.
|
||||
"""
|
||||
QtCore.QObject.__init__(self)
|
||||
QObject.__init__(self)
|
||||
|
||||
def send_message(self, event, msg=None):
|
||||
"""
|
||||
@ -104,7 +104,7 @@ class EventReceiver(QtCore.QObject):
|
||||
Defaults to *None*. The message to send with the event.
|
||||
"""
|
||||
log.debug(u'Event %s passed with payload %s' % (event, msg))
|
||||
self.emit(QtCore.SIGNAL(event), msg)
|
||||
self.emit(SIGNAL(event), msg)
|
||||
|
||||
|
||||
class Receiver():
|
||||
@ -141,5 +141,3 @@ class Receiver():
|
||||
Get the global ``eventreceiver`` instance.
|
||||
"""
|
||||
return Receiver.eventreceiver
|
||||
|
||||
|
||||
|
@ -23,7 +23,8 @@
|
||||
###############################################################################
|
||||
|
||||
import logging
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from PyQt4.QtCore import QObject, SIGNAL
|
||||
|
||||
from openlp.core.lib import PluginConfig, Receiver
|
||||
|
||||
@ -137,8 +138,8 @@ class Plugin(object):
|
||||
self.render_manager = plugin_helpers[u'render']
|
||||
self.service_manager = plugin_helpers[u'service']
|
||||
self.settings = plugin_helpers[u'settings']
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'%s_add_service_item'% self.name), self.process_add_service_event)
|
||||
QObject.connect(Receiver.get_receiver(),
|
||||
SIGNAL(u'%s_add_service_item'% self.name), self.process_add_service_event)
|
||||
|
||||
def check_pre_conditions(self):
|
||||
"""
|
||||
|
@ -1,24 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
|
||||
Portions copyright (c) 2008-2009 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
|
||||
"""
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2009 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
|
||||
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# 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.lib import str_to_bool
|
||||
from openlp.core.utils import ConfigHelper
|
||||
|
@ -22,11 +22,11 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.QtGui import QWidget
|
||||
|
||||
from openlp.core.lib import PluginConfig
|
||||
|
||||
class SettingsTab(QtGui.QWidget):
|
||||
class SettingsTab(QWidget):
|
||||
"""
|
||||
SettingsTab is a helper widget for plugins to define Tabs for the settings
|
||||
dialog.
|
||||
@ -43,7 +43,7 @@ class SettingsTab(QtGui.QWidget):
|
||||
Defaults to *None*. This is the section in the configuration file
|
||||
to write to when the ``save`` method is called.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self)
|
||||
QWidget.__init__(self)
|
||||
self.tabTitle = title
|
||||
self.setupUi()
|
||||
self.retranslateUi()
|
||||
|
@ -372,8 +372,8 @@ class ThemeXML(object):
|
||||
"""
|
||||
Return a string representation of this object.
|
||||
"""
|
||||
s = u''
|
||||
for k in dir(self):
|
||||
if k[0:1] != u'_':
|
||||
s += u'%30s: %s\n' %(k, getattr(self, k))
|
||||
return s
|
||||
theme_strings = []
|
||||
for key in dir(self):
|
||||
if key[0:1] != u'_':
|
||||
theme_strings.append(u'%30s: %s' % (key, getattr(self, key)))
|
||||
return u'\n'.join(theme_strings)
|
||||
|
@ -22,12 +22,14 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import types
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4.QtGui import QToolBar, QIcon
|
||||
from PyQt4.QtCore import QSize
|
||||
|
||||
class OpenLPToolbar(QtGui.QToolBar):
|
||||
from openlp.core.lib import buildIcon
|
||||
|
||||
class OpenLPToolbar(QToolBar):
|
||||
"""
|
||||
Lots of toolbars around the place, so it makes sense to have a common way
|
||||
to manage them. This is the base toolbar class.
|
||||
@ -36,10 +38,10 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
"""
|
||||
Initialise the toolbar.
|
||||
"""
|
||||
QtGui.QToolBar.__init__(self, None)
|
||||
QToolBar.__init__(self, None)
|
||||
# useful to be able to reuse button icons...
|
||||
self.icons = {}
|
||||
self.setIconSize(QtCore.QSize(20, 20))
|
||||
self.setIconSize(QSize(20, 20))
|
||||
self.actions = {}
|
||||
self.log = logging.getLogger(u'OpenLPToolbar')
|
||||
self.log.debug(u'Init done')
|
||||
@ -66,17 +68,7 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
``objectname``
|
||||
The name of the object, as used in `<button>.setObjectName()`.
|
||||
"""
|
||||
ButtonIcon = None
|
||||
if type(icon) is QtGui.QIcon:
|
||||
ButtonIcon = icon
|
||||
elif type(icon) is types.StringType or type(icon) is types.UnicodeType:
|
||||
ButtonIcon = QtGui.QIcon()
|
||||
if icon.startswith(u':/'):
|
||||
ButtonIcon.addPixmap(QtGui.QPixmap(icon), QtGui.QIcon.Normal,
|
||||
QtGui.QIcon.Off)
|
||||
else:
|
||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(
|
||||
QtGui.QImage(icon)), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ButtonIcon = buildIcon(icon)
|
||||
if ButtonIcon is not None:
|
||||
if slot is not None:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title, slot)
|
||||
@ -113,7 +105,7 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
return self.icons[title]
|
||||
else:
|
||||
self.log.error(u'getIconFromTitle - no icon for %s' % title)
|
||||
return QtGui.QIcon()
|
||||
return QIcon()
|
||||
|
||||
def makeWidgetsInvisible(self, widgets):
|
||||
"""
|
||||
|
@ -25,7 +25,7 @@
|
||||
import types
|
||||
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.QtGui import QColor
|
||||
|
||||
DelphiColors={"clRed":0xFF0000,
|
||||
"clBlue":0x0000FF,
|
||||
@ -54,7 +54,7 @@ blankstylexml=\
|
||||
</Theme>
|
||||
'''
|
||||
|
||||
class Theme:
|
||||
class Theme(object):
|
||||
def __init__(self, xml):
|
||||
""" stores the info about a theme
|
||||
attributes:
|
||||
@ -100,13 +100,13 @@ class Theme:
|
||||
self._set_from_XML(xml)
|
||||
|
||||
def _get_as_string(self):
|
||||
s = u''
|
||||
keys=dir(self)
|
||||
theme_strings = []
|
||||
keys = dir(self)
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
if k[0:1] != u'_':
|
||||
s += u'_%s_' %(getattr(self,k))
|
||||
return s
|
||||
for key in keys:
|
||||
if key[0:1] != u'_':
|
||||
theme_strings.append(u'_%s_' % (getattr(self, key)))
|
||||
return u''.join(theme_strings)
|
||||
|
||||
def _set_from_XML(self, xml):
|
||||
root = ElementTree(element=XML(xml))
|
||||
@ -135,12 +135,12 @@ class Theme:
|
||||
if (element.tag.find(u'Color') > 0 or
|
||||
(element.tag.find(u'BackgroundParameter') == 0 and type(val) == type(0))):
|
||||
# convert to a wx.Colour
|
||||
val= QtGui.QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF)
|
||||
val = QColor((val>>16) & 0xFF, (val>>8)&0xFF, val&0xFF)
|
||||
setattr(self, element.tag, val)
|
||||
|
||||
def __str__(self):
|
||||
s = u''
|
||||
for k in dir(self):
|
||||
if k[0:1] != u'_':
|
||||
s += u'%30s : %s\n' %(k, getattr(self, k))
|
||||
return s
|
||||
theme_strings = []
|
||||
for key in dir(self):
|
||||
if key[0:1] != u'_':
|
||||
theme_strings.append(u'%30s : %s' % (key, getattr(self, key)))
|
||||
return u'\n'.join(theme_strings)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class AboutForm(QtGui.QDialog):
|
||||
"""
|
||||
@ -44,8 +44,7 @@ class AboutForm(QtGui.QDialog):
|
||||
"""
|
||||
AboutForm.setObjectName(u'AboutForm')
|
||||
AboutForm.resize(470, 481)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
AboutForm.setWindowIcon(icon)
|
||||
AboutFormLayout = QtGui.QVBoxLayout(AboutForm)
|
||||
AboutFormLayout.setSpacing(8)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class AlertForm(QtGui.QDialog):
|
||||
global log
|
||||
@ -39,8 +39,7 @@ class AlertForm(QtGui.QDialog):
|
||||
def setupUi(self, AlertForm):
|
||||
AlertForm.setObjectName(u'AlertForm')
|
||||
AlertForm.resize(370, 110)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
AlertForm.setWindowIcon(icon)
|
||||
self.AlertFormLayout = QtGui.QVBoxLayout(AlertForm)
|
||||
self.AlertFormLayout.setSpacing(8)
|
||||
|
@ -23,15 +23,14 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class Ui_AmendThemeDialog(object):
|
||||
def setupUi(self, AmendThemeDialog):
|
||||
AmendThemeDialog.setObjectName(u'AmendThemeDialog')
|
||||
AmendThemeDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
AmendThemeDialog.resize(586, 651)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
AmendThemeDialog.setWindowIcon(icon)
|
||||
AmendThemeDialog.setModal(True)
|
||||
self.AmendThemeLayout = QtGui.QVBoxLayout(AmendThemeDialog)
|
||||
@ -116,8 +115,7 @@ class Ui_AmendThemeDialog(object):
|
||||
self.ImageLineEdit.setObjectName(u'ImageLineEdit')
|
||||
self.horizontalLayout_2.addWidget(self.ImageLineEdit)
|
||||
self.ImageToolButton = QtGui.QToolButton(self.ImageFilenameWidget)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/images/image_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/images/image_load.png')
|
||||
self.ImageToolButton.setIcon(icon1)
|
||||
self.ImageToolButton.setObjectName(u'ImageToolButton')
|
||||
self.horizontalLayout_2.addWidget(self.ImageToolButton)
|
||||
|
@ -31,7 +31,7 @@ from openlp.core.ui import AboutForm, SettingsForm, AlertForm, \
|
||||
ServiceManager, ThemeManager, MainDisplay, SlideController, \
|
||||
PluginForm
|
||||
from openlp.core.lib import translate, RenderManager, PluginConfig, \
|
||||
OpenLPDockWidget, SettingsManager, PluginManager, Receiver
|
||||
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, buildIcon
|
||||
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
@ -49,10 +49,8 @@ class Ui_MainWindow(object):
|
||||
sizePolicy.setHeightForWidth(
|
||||
MainWindow.sizePolicy().hasHeightForWidth())
|
||||
MainWindow.setSizePolicy(sizePolicy)
|
||||
main_icon = QtGui.QIcon()
|
||||
main_icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
MainWindow.setWindowIcon(main_icon)
|
||||
MainIcon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
MainWindow.setWindowIcon(MainIcon)
|
||||
# Set up the main container, which contains all the other form widgets
|
||||
self.MainContent = QtGui.QWidget(MainWindow)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||
@ -106,11 +104,8 @@ class Ui_MainWindow(object):
|
||||
self.StatusBar.addPermanentWidget(self.DefaultThemeLabel)
|
||||
# Create the MediaManager
|
||||
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/system/system_mediamanager.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.MediaManagerDock.setWindowIcon(icon)
|
||||
self.MediaManagerDock.setFloating(False)
|
||||
MediaManagerIcon = buildIcon(u':/system/system_mediamanager.png')
|
||||
self.MediaManagerDock.setWindowIcon(MediaManagerIcon)
|
||||
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
||||
self.MediaManagerDock.setMinimumWidth(
|
||||
self.settingsmanager.mainwindow_left)
|
||||
@ -136,13 +131,8 @@ class Ui_MainWindow(object):
|
||||
self.MediaManagerDock.setVisible(self.settingsmanager.showMediaManager)
|
||||
# Create the service manager
|
||||
self.ServiceManagerDock = OpenLPDockWidget(MainWindow)
|
||||
ServiceManagerIcon = QtGui.QIcon()
|
||||
ServiceManagerIcon.addPixmap(
|
||||
QtGui.QPixmap(u':/system/system_servicemanager.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ServiceManagerIcon = buildIcon(u':/system/system_servicemanager.png')
|
||||
self.ServiceManagerDock.setWindowIcon(ServiceManagerIcon)
|
||||
self.ServiceManagerDock.setFeatures(
|
||||
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
|
||||
self.ServiceManagerDock.setMinimumWidth(
|
||||
self.settingsmanager.mainwindow_right)
|
||||
@ -154,12 +144,8 @@ class Ui_MainWindow(object):
|
||||
self.settingsmanager.showServiceManager)
|
||||
# Create the theme manager
|
||||
self.ThemeManagerDock = OpenLPDockWidget(MainWindow)
|
||||
ThemeManagerIcon = QtGui.QIcon()
|
||||
ThemeManagerIcon.addPixmap(
|
||||
QtGui.QPixmap(u':/system/system_thememanager.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ThemeManagerIcon = buildIcon(u':/system/system_thememanager.png')
|
||||
self.ThemeManagerDock.setWindowIcon(ThemeManagerIcon)
|
||||
self.ThemeManagerDock.setFloating(False)
|
||||
self.ThemeManagerDock.setObjectName(u'ThemeManagerDock')
|
||||
self.ThemeManagerContents = ThemeManager(self)
|
||||
self.ThemeManagerDock.setWidget(self.ThemeManagerContents)
|
||||
@ -185,9 +171,7 @@ class Ui_MainWindow(object):
|
||||
self.FileSaveAsItem = QtGui.QAction(MainWindow)
|
||||
self.FileSaveAsItem.setObjectName(u'FileSaveAsItem')
|
||||
self.FileExitItem = QtGui.QAction(MainWindow)
|
||||
ExitIcon = QtGui.QIcon()
|
||||
ExitIcon.addPixmap(QtGui.QPixmap(u':/system/system_exit.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ExitIcon = buildIcon(u':/system/system_exit.png')
|
||||
self.FileExitItem.setIcon(ExitIcon)
|
||||
self.FileExitItem.setObjectName(u'FileExitItem')
|
||||
self.ImportThemeItem = QtGui.QAction(MainWindow)
|
||||
@ -201,16 +185,14 @@ class Ui_MainWindow(object):
|
||||
self.actionLook_Feel = QtGui.QAction(MainWindow)
|
||||
self.actionLook_Feel.setObjectName(u'actionLook_Feel')
|
||||
self.OptionsSettingsItem = QtGui.QAction(MainWindow)
|
||||
SettingsIcon = QtGui.QIcon()
|
||||
SettingsIcon.addPixmap(QtGui.QPixmap(u':/system/system_settings.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
SettingsIcon = buildIcon(u':/system/system_settings.png')
|
||||
self.OptionsSettingsItem.setIcon(SettingsIcon)
|
||||
self.OptionsSettingsItem.setObjectName(u'OptionsSettingsItem')
|
||||
self.ViewMediaManagerItem = QtGui.QAction(MainWindow)
|
||||
self.ViewMediaManagerItem.setCheckable(True)
|
||||
self.ViewMediaManagerItem.setChecked(
|
||||
self.settingsmanager.showMediaManager)
|
||||
self.ViewMediaManagerItem.setIcon(icon)
|
||||
self.ViewMediaManagerItem.setIcon(MediaManagerIcon)
|
||||
self.ViewMediaManagerItem.setObjectName(u'ViewMediaManagerItem')
|
||||
self.ViewThemeManagerItem = QtGui.QAction(MainWindow)
|
||||
self.ViewThemeManagerItem.setCheckable(True)
|
||||
@ -225,28 +207,19 @@ class Ui_MainWindow(object):
|
||||
self.ViewServiceManagerItem.setIcon(ServiceManagerIcon)
|
||||
self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
|
||||
self.ToolsAlertItem = QtGui.QAction(MainWindow)
|
||||
AlertIcon = QtGui.QIcon()
|
||||
AlertIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AlertIcon = buildIcon(u':/tools/tools_alert.png')
|
||||
self.ToolsAlertItem.setIcon(AlertIcon)
|
||||
self.ToolsAlertItem.setObjectName(u'ToolsAlertItem')
|
||||
self.PluginItem = QtGui.QAction(MainWindow)
|
||||
PluginIcon = QtGui.QIcon()
|
||||
PluginIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
#PluginIcon = buildIcon(u':/tools/tools_alert.png')
|
||||
self.PluginItem.setIcon(AlertIcon)
|
||||
self.PluginItem.setObjectName(u'PluginItem')
|
||||
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
||||
ContentsIcon = QtGui.QIcon()
|
||||
ContentsIcon.addPixmap(QtGui.QPixmap(
|
||||
u':/system/system_help_contents.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
ContentsIcon = buildIcon(u':/system/system_help_contents.png')
|
||||
self.HelpDocumentationItem.setIcon(ContentsIcon)
|
||||
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
|
||||
self.HelpAboutItem = QtGui.QAction(MainWindow)
|
||||
AboutIcon = QtGui.QIcon()
|
||||
AboutIcon.addPixmap(QtGui.QPixmap(u':/system/system_about.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AboutIcon = buildIcon(u':/system/system_about.png')
|
||||
self.HelpAboutItem.setIcon(AboutIcon)
|
||||
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
|
||||
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
|
||||
@ -258,9 +231,7 @@ class Ui_MainWindow(object):
|
||||
self.LanguageEnglishItem = QtGui.QAction(MainWindow)
|
||||
self.LanguageEnglishItem.setObjectName(u'LanguageEnglishItem')
|
||||
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
|
||||
AddToolIcon = QtGui.QIcon()
|
||||
AddToolIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_add.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AddToolIcon = buildIcon(u':/tools/tools_add.png')
|
||||
self.ToolsAddToolItem.setIcon(AddToolIcon)
|
||||
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
|
||||
self.action_Preview_Panel = QtGui.QAction(MainWindow)
|
||||
@ -457,7 +428,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.generalConfig = PluginConfig(u'General')
|
||||
self.alertForm = AlertForm(self)
|
||||
self.pluginForm = PluginForm(self)
|
||||
self.aboutForm = AboutForm()
|
||||
self.aboutForm = AboutForm(self)
|
||||
self.settingsForm = SettingsForm(self.screenList, self)
|
||||
# Set up the path with plugins
|
||||
pluginpath = os.path.split(os.path.abspath(__file__))[0]
|
||||
|
@ -23,7 +23,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class SplashScreen(object):
|
||||
def __init__(self, version):
|
||||
@ -45,11 +45,9 @@ class SplashScreen(object):
|
||||
self.splash_screen.sizePolicy().hasHeightForWidth())
|
||||
self.splash_screen.setSizePolicy(sizePolicy)
|
||||
self.splash_screen.setContextMenuPolicy(QtCore.Qt.PreventContextMenu)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
splash_image = QtGui.QPixmap(u':/graphics/openlp-splash-screen.png')
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
self.splash_screen.setWindowIcon(icon)
|
||||
splash_image = QtGui.QPixmap(u':/graphics/openlp-splash-screen.png')
|
||||
self.splash_screen.setPixmap(splash_image)
|
||||
self.splash_screen.setMask(splash_image.mask())
|
||||
self.splash_screen.setWindowFlags(
|
||||
|
@ -45,7 +45,7 @@ class ConfigHelper(object):
|
||||
path = os.path.join(BaseDirectory.xdg_data_home, u'openlp')
|
||||
except ImportError:
|
||||
path = os.path.join(os.getenv(u'HOME'), u'.openlp', u'data')
|
||||
reg = ConfigHelper.get_registry()
|
||||
#reg = ConfigHelper.get_registry()
|
||||
#path = ConfigHelper.get_config(u'main', 'data path', path)
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, Receiver, translate, str_to_bool
|
||||
from openlp.core.lib import Plugin, Receiver, translate, str_to_bool, buildIcon
|
||||
from openlp.plugins.audit.lib import AuditTab, AuditManager
|
||||
from openlp.plugins.audit.forms import AuditDetailForm, AuditDeleteForm
|
||||
from openlp.plugins.audit.lib.models import AuditItem
|
||||
@ -42,9 +42,7 @@ class AuditPlugin(Plugin):
|
||||
Plugin.__init__(self, u'Audit', u'1.9.0', plugin_helpers)
|
||||
self.weight = -4
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_image.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_image.png')
|
||||
self.auditfile = None
|
||||
|
||||
def check_pre_conditions(self):
|
||||
@ -93,9 +91,7 @@ class AuditPlugin(Plugin):
|
||||
translate(u'AuditPlugin', u'Generate Reports on Audit Data'))
|
||||
self.AuditReport.setObjectName(u'AuditReport')
|
||||
#Audit activation
|
||||
AuditIcon = QtGui.QIcon()
|
||||
AuditIcon.addPixmap(QtGui.QPixmap(u':/tools/tools_alert.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
AuditIcon = buildIcon(u':/tools/tools_alert.png')
|
||||
self.AuditStatus = QtGui.QAction(tools_menu)
|
||||
self.AuditStatus.setIcon(AuditIcon)
|
||||
self.AuditStatus.setCheckable(True)
|
||||
|
@ -24,11 +24,11 @@
|
||||
|
||||
from datetime import date
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from auditdeletedialog import Ui_AuditDeleteDialog
|
||||
from openlp.core.lib import translate
|
||||
from openlp.plugins.audit.lib import AuditManager
|
||||
#from openlp.plugins.audit.lib import AuditManager
|
||||
|
||||
class AuditDeleteForm(QtGui.QDialog, Ui_AuditDeleteDialog):
|
||||
"""
|
||||
@ -43,7 +43,7 @@ class AuditDeleteForm(QtGui.QDialog, Ui_AuditDeleteDialog):
|
||||
self.setupUi(self)
|
||||
|
||||
def accept(self):
|
||||
ret = QtGui.QMessageBox.question(None,
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
translate(u'mainWindow', u'Delete Selected Audit Events?'),
|
||||
translate(u'mainWindow', u'Are you sure you want to delete selected Audit Data?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
|
@ -26,8 +26,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, translate
|
||||
|
||||
from openlp.core.lib import Plugin, translate, buildIcon
|
||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
||||
|
||||
class BiblePlugin(Plugin):
|
||||
@ -40,9 +39,7 @@ class BiblePlugin(Plugin):
|
||||
Plugin.__init__(self, u'Bibles', u'1.9.0', plugin_helpers)
|
||||
self.weight = -9
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_bible.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_bible.png')
|
||||
#Register the bible Manager
|
||||
self.biblemanager = BibleManager(self.config)
|
||||
|
||||
|
@ -24,12 +24,13 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import buildIcon
|
||||
|
||||
class Ui_BibleImportDialog(object):
|
||||
def setupUi(self, BibleImportDialog):
|
||||
BibleImportDialog.setObjectName(u'BibleImportDialog')
|
||||
BibleImportDialog.resize(500, 686)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
|
||||
BibleImportDialog.setWindowIcon(icon)
|
||||
self.LicenceDetailsGroupBox = QtGui.QGroupBox(BibleImportDialog)
|
||||
self.LicenceDetailsGroupBox.setGeometry(QtCore.QRect(10, 400, 480, 151))
|
||||
@ -110,8 +111,7 @@ class Ui_BibleImportDialog(object):
|
||||
self.OSISLocationEdit.setObjectName(u'OSISLocationEdit')
|
||||
self.horizontalLayout_3.addWidget(self.OSISLocationEdit)
|
||||
self.OsisFileButton = QtGui.QPushButton(self.OSISGroupBox)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/imports/import_load.png')
|
||||
self.OsisFileButton.setIcon(icon1)
|
||||
self.OsisFileButton.setObjectName(u'OsisFileButton')
|
||||
self.horizontalLayout_3.addWidget(self.OsisFileButton)
|
||||
|
@ -28,7 +28,7 @@ import time
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, MediaManagerItem, Receiver, \
|
||||
contextMenuAction, BaseListWithDnD
|
||||
BaseListWithDnD
|
||||
from openlp.plugins.bibles.forms import BibleImportForm
|
||||
from openlp.plugins.bibles.lib.manager import BibleMode
|
||||
|
||||
|
@ -24,10 +24,8 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from forms import EditCustomForm
|
||||
from openlp.core.lib import Plugin
|
||||
from openlp.core.lib import Plugin, buildIcon
|
||||
from openlp.plugins.custom.lib import CustomManager, CustomMediaItem
|
||||
|
||||
|
||||
@ -52,9 +50,7 @@ class CustomPlugin(Plugin):
|
||||
self.custommanager = CustomManager(self.config)
|
||||
self.edit_custom_form = EditCustomForm(self.custommanager)
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_custom.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_custom.png')
|
||||
|
||||
def get_media_manager_item(self):
|
||||
# Create the CustomManagerItem object
|
||||
|
@ -22,14 +22,13 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class Ui_customEditDialog(object):
|
||||
def setupUi(self, customEditDialog):
|
||||
customEditDialog.setObjectName(u'customEditDialog')
|
||||
customEditDialog.resize(590, 541)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
|
||||
customEditDialog.setWindowIcon(icon)
|
||||
self.gridLayout = QtGui.QGridLayout(customEditDialog)
|
||||
self.gridLayout.setObjectName(u'gridLayout')
|
||||
@ -51,16 +50,14 @@ class Ui_customEditDialog(object):
|
||||
self.verticalLayout = QtGui.QVBoxLayout()
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.UpButton = QtGui.QPushButton(customEditDialog)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/services/service_up.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/services/service_up.png')
|
||||
self.UpButton.setIcon(icon1)
|
||||
self.UpButton.setObjectName(u'UpButton')
|
||||
self.verticalLayout.addWidget(self.UpButton)
|
||||
spacerItem = QtGui.QSpacerItem(20, 128, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.DownButton = QtGui.QPushButton(customEditDialog)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/services/service_down.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2 = buildIcon(u':/services/service_down.png')
|
||||
self.DownButton.setIcon(icon2)
|
||||
self.DownButton.setObjectName(u'DownButton')
|
||||
self.verticalLayout.addWidget(self.DownButton)
|
||||
|
@ -24,9 +24,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.lib import Plugin
|
||||
from openlp.core.lib import Plugin, buildIcon
|
||||
from openlp.plugins.images.lib import ImageMediaItem, ImageTab
|
||||
|
||||
class ImagePlugin(Plugin):
|
||||
@ -39,9 +37,7 @@ class ImagePlugin(Plugin):
|
||||
Plugin.__init__(self, u'Images', u'1.9.0', plugin_helpers)
|
||||
self.weight = -7
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_image.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_image.png')
|
||||
|
||||
def get_settings_tab(self):
|
||||
self.ImageTab = ImageTab()
|
||||
|
@ -22,8 +22,7 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from filelistdata import FileListData
|
||||
from mediatab import MediaTab
|
||||
from mediaitem import MediaMediaItem
|
||||
|
||||
__all__ = ['MediaTab', 'MediaMediaItem', 'FileListData']
|
||||
__all__ = ['MediaTab', 'MediaMediaItem']
|
||||
|
@ -22,9 +22,7 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.core.lib import Plugin
|
||||
from openlp.core.lib import Plugin, buildIcon
|
||||
from openlp.plugins.media.lib import MediaTab, MediaMediaItem
|
||||
|
||||
class MediaPlugin(Plugin):
|
||||
@ -34,11 +32,9 @@ class MediaPlugin(Plugin):
|
||||
Plugin.__init__(self, u'Media', u'1.9.0', plugin_helpers)
|
||||
self.weight = -6
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_video.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_video.png')
|
||||
# passed with drag and drop messages
|
||||
self.dnd_id=u'Media'
|
||||
self.dnd_id = u'Media'
|
||||
|
||||
def get_settings_tab(self):
|
||||
self.MediaTab = MediaTab()
|
||||
|
@ -22,12 +22,11 @@
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Plugin
|
||||
from openlp.core.lib import Plugin, buildIcon
|
||||
from openlp.plugins.presentations.lib import *
|
||||
|
||||
class PresentationPlugin(Plugin):
|
||||
@ -42,9 +41,7 @@ class PresentationPlugin(Plugin):
|
||||
Plugin.__init__(self, u'Presentations', u'1.9.0', plugin_helpers)
|
||||
self.weight = -8
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_presentation.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_presentation.png')
|
||||
|
||||
def get_settings_tab(self):
|
||||
"""
|
||||
|
@ -24,15 +24,13 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class Ui_EditSongDialog(object):
|
||||
def setupUi(self, EditSongDialog):
|
||||
EditSongDialog.setObjectName(u'EditSongDialog')
|
||||
EditSongDialog.resize(645, 417)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp.org-icon-32.bmp')
|
||||
EditSongDialog.setWindowIcon(icon)
|
||||
EditSongDialog.setModal(True)
|
||||
self.verticalLayout = QtGui.QVBoxLayout(EditSongDialog)
|
||||
|
@ -23,7 +23,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class OpenLPExportForm(object):
|
||||
|
||||
@ -34,8 +34,7 @@ class OpenLPExportForm(object):
|
||||
def setupUi(self):
|
||||
self.OpenLPExportForm.setObjectName(u'OpenLPExportForm')
|
||||
self.OpenLPExportForm.resize(473, 459)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
self.OpenLPExportForm.setWindowIcon(icon)
|
||||
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenLPExportForm)
|
||||
self.verticalLayout_5.setMargin(8)
|
||||
@ -58,8 +57,7 @@ class OpenLPExportForm(object):
|
||||
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
|
||||
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
|
||||
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/exports/export_load.png')
|
||||
self.ExportFileSelectPushButton.setIcon(icon1)
|
||||
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
|
||||
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
|
||||
@ -117,8 +115,7 @@ class OpenLPExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
|
||||
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2 = buildIcon(u':/exports/export_selectall.png')
|
||||
self.ExportSelectAllPushButton.setIcon(icon2)
|
||||
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
|
||||
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
|
||||
@ -167,8 +164,7 @@ class OpenLPExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3 = buildIcon(u':/exports/export_move_to_list.png')
|
||||
self.AddSelectedPushButton.setIcon(icon3)
|
||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
||||
@ -237,8 +233,7 @@ class OpenLPExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4 = buildIcon(u':/exports/export_remove.png')
|
||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
||||
|
@ -23,7 +23,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class OpenLPImportForm(object):
|
||||
|
||||
@ -34,8 +34,7 @@ class OpenLPImportForm(object):
|
||||
def setupUi(self):
|
||||
self.OpenLPImportForm.setObjectName(u'OpenLPImportForm')
|
||||
self.OpenLPImportForm.resize(473, 459)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
self.OpenLPImportForm.setWindowIcon(icon)
|
||||
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenLPImportForm)
|
||||
self.verticalLayout_5.setMargin(8)
|
||||
@ -58,8 +57,7 @@ class OpenLPImportForm(object):
|
||||
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
|
||||
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
|
||||
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/imports/import_load.png')
|
||||
self.ImportFileSelectPushButton.setIcon(icon1)
|
||||
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
|
||||
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
|
||||
@ -117,8 +115,7 @@ class OpenLPImportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.ImportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.ImportSelectAllPushButton.setSizePolicy(sizePolicy)
|
||||
self.ImportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/imports/import_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2 = buildIcon(u':/imports/import_selectall.png')
|
||||
self.ImportSelectAllPushButton.setIcon(icon2)
|
||||
self.ImportSelectAllPushButton.setObjectName(u'ImportSelectAllPushButton')
|
||||
self.horizontalLayout_2.addWidget(self.ImportSelectAllPushButton)
|
||||
@ -167,8 +164,7 @@ class OpenLPImportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(u':/imports/import_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3 = buildIcon(u':/imports/import_move_to_list.png')
|
||||
self.AddSelectedPushButton.setIcon(icon3)
|
||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
||||
@ -237,8 +233,7 @@ class OpenLPImportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(u':/imports/import_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4 = buildIcon(u':/imports/import_remove.png')
|
||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
||||
|
@ -23,7 +23,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class OpenSongExportForm(object):
|
||||
|
||||
@ -34,8 +34,7 @@ class OpenSongExportForm(object):
|
||||
def setupUi(self):
|
||||
self.OpenSongExportForm.setObjectName(u'OpenSongExportForm')
|
||||
self.OpenSongExportForm.resize(473, 459)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
self.OpenSongExportForm.setWindowIcon(icon)
|
||||
self.verticalLayout_5 = QtGui.QVBoxLayout(self.OpenSongExportForm)
|
||||
self.verticalLayout_5.setMargin(8)
|
||||
@ -58,8 +57,7 @@ class OpenSongExportForm(object):
|
||||
self.ExportFileLineEdit.setObjectName(u'ExportFileLineEdit')
|
||||
self.horizontalLayout.addWidget(self.ExportFileLineEdit)
|
||||
self.ExportFileSelectPushButton = QtGui.QPushButton(self.ExportFileWidget)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/exports/export_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/exports/export_load.png')
|
||||
self.ExportFileSelectPushButton.setIcon(icon1)
|
||||
self.ExportFileSelectPushButton.setObjectName(u'ExportFileSelectPushButton')
|
||||
self.horizontalLayout.addWidget(self.ExportFileSelectPushButton)
|
||||
@ -117,8 +115,7 @@ class OpenSongExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.ExportSelectAllPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.ExportSelectAllPushButton.setSizePolicy(sizePolicy)
|
||||
self.ExportSelectAllPushButton.setMinimumSize(QtCore.QSize(100, 0))
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/exports/export_selectall.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2 = buildIcon(u':/exports/export_selectall.png')
|
||||
self.ExportSelectAllPushButton.setIcon(icon2)
|
||||
self.ExportSelectAllPushButton.setObjectName(u'ExportSelectAllPushButton')
|
||||
self.horizontalLayout_2.addWidget(self.ExportSelectAllPushButton)
|
||||
@ -167,8 +164,7 @@ class OpenSongExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.AddSelectedPushButton.sizePolicy().hasHeightForWidth())
|
||||
self.AddSelectedPushButton.setSizePolicy(sizePolicy)
|
||||
self.AddSelectedPushButton.setMinimumSize(QtCore.QSize(25, 25))
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(u':/exports/export_move_to_list.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3 = buildIcon(u':/exports/export_move_to_list.png')
|
||||
self.AddSelectedPushButton.setIcon(icon3)
|
||||
self.AddSelectedPushButton.setObjectName(u'AddSelectedPushButton')
|
||||
self.verticalLayout_3.addWidget(self.AddSelectedPushButton)
|
||||
@ -237,8 +233,7 @@ class OpenSongExportForm(object):
|
||||
sizePolicy.setHeightForWidth(self.SelectedRemoveSelectedButton.sizePolicy().hasHeightForWidth())
|
||||
self.SelectedRemoveSelectedButton.setSizePolicy(sizePolicy)
|
||||
self.SelectedRemoveSelectedButton.setMinimumSize(QtCore.QSize(140, 0))
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(u':/exports/export_remove.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4 = buildIcon(u':/exports/export_remove.png')
|
||||
self.SelectedRemoveSelectedButton.setIcon(icon4)
|
||||
self.SelectedRemoveSelectedButton.setObjectName(u'SelectedRemoveSelectedButton')
|
||||
self.horizontalLayout_5.addWidget(self.SelectedRemoveSelectedButton)
|
||||
|
@ -23,7 +23,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class OpenSongImportForm(object):
|
||||
|
||||
@ -34,8 +34,7 @@ class OpenSongImportForm(object):
|
||||
def setupUi(self):
|
||||
self.OpenSongImportForm.setObjectName(u'OpenSongImportForm')
|
||||
self.OpenSongImportForm.resize(481, 153)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp-logo-16x16.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
|
||||
self.OpenSongImportForm.setWindowIcon(icon)
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.OpenSongImportForm)
|
||||
self.verticalLayout.setSpacing(6)
|
||||
@ -59,8 +58,7 @@ class OpenSongImportForm(object):
|
||||
self.ImportFileLineEdit.setObjectName(u'ImportFileLineEdit')
|
||||
self.horizontalLayout.addWidget(self.ImportFileLineEdit)
|
||||
self.ImportFileSelectPushButton = QtGui.QPushButton(self.ImportFileWidget)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/imports/import_load.png'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/imports/import_load.png')
|
||||
self.ImportFileSelectPushButton.setIcon(icon1)
|
||||
self.ImportFileSelectPushButton.setObjectName(u'ImportFileSelectPushButton')
|
||||
self.horizontalLayout.addWidget(self.ImportFileSelectPushButton)
|
||||
|
@ -1,24 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
"""
|
||||
OpenLP - Open Source Lyrics Projection
|
||||
Copyright (c) 2008 Raoul Snyman
|
||||
Portions copyright (c) 2008-2009 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.
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2009 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
|
||||
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# 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 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 PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.lib import translate, buildIcon
|
||||
|
||||
class Ui_SongMaintenanceDialog(object):
|
||||
def setupUi(self, SongMaintenanceDialog):
|
||||
@ -51,19 +57,13 @@ class Ui_SongMaintenanceDialog(object):
|
||||
self.TypeListWidget.setSortingEnabled(False)
|
||||
self.TypeListWidget.setUniformItemSizes(True)
|
||||
self.TypeListWidget.setObjectName(u'TypeListWidget')
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(u':/songs/author_maintenance.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon = buildIcon(u':/songs/author_maintenance.png')
|
||||
item = QtGui.QListWidgetItem(self.TypeListWidget)
|
||||
item.setIcon(icon)
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(u':/songs/topic_maintenance.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon1 = buildIcon(u':/songs/topic_maintenance.png')
|
||||
item = QtGui.QListWidgetItem(self.TypeListWidget)
|
||||
item.setIcon(icon1)
|
||||
icon2 = QtGui.QIcon()
|
||||
icon2.addPixmap(QtGui.QPixmap(u':/songs/book_maintenance.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon2 = buildIcon(u':/songs/book_maintenance.png')
|
||||
item = QtGui.QListWidgetItem(self.TypeListWidget)
|
||||
item.setIcon(icon2)
|
||||
self.ContentLayout.addWidget(self.TypeListWidget)
|
||||
@ -88,23 +88,17 @@ class Ui_SongMaintenanceDialog(object):
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.AuthorButtonsLayout.addItem(spacerItem)
|
||||
self.AuthorAddButton = QtGui.QPushButton(self.AuthorButtonWidget)
|
||||
icon3 = QtGui.QIcon()
|
||||
icon3.addPixmap(QtGui.QPixmap(u':/songs/author_add.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon3 = buildIcon(u':/songs/author_add.png')
|
||||
self.AuthorAddButton.setIcon(icon3)
|
||||
self.AuthorAddButton.setObjectName(u'AuthorAddButton')
|
||||
self.AuthorButtonsLayout.addWidget(self.AuthorAddButton)
|
||||
self.AuthorEditButton = QtGui.QPushButton(self.AuthorButtonWidget)
|
||||
icon4 = QtGui.QIcon()
|
||||
icon4.addPixmap(QtGui.QPixmap(u':/songs/author_edit.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon4 = buildIcon(u':/songs/author_edit.png')
|
||||
self.AuthorEditButton.setIcon(icon4)
|
||||
self.AuthorEditButton.setObjectName(u'AuthorEditButton')
|
||||
self.AuthorButtonsLayout.addWidget(self.AuthorEditButton)
|
||||
self.AuthorDeleteButton = QtGui.QPushButton(self.AuthorButtonWidget)
|
||||
icon5 = QtGui.QIcon()
|
||||
icon5.addPixmap(QtGui.QPixmap(u':/songs/author_delete.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon5 = buildIcon(u':/songs/author_delete.png')
|
||||
self.AuthorDeleteButton.setIcon(icon5)
|
||||
self.AuthorDeleteButton.setObjectName(u'AuthorDeleteButton')
|
||||
self.AuthorButtonsLayout.addWidget(self.AuthorDeleteButton)
|
||||
@ -134,23 +128,17 @@ class Ui_SongMaintenanceDialog(object):
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.TopicButtonLayout.addItem(TopicSpacerItem)
|
||||
self.TopicAddButton = QtGui.QPushButton(self.TopicButtonWidget)
|
||||
icon6 = QtGui.QIcon()
|
||||
icon6.addPixmap(QtGui.QPixmap(u':/songs/topic_add.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon6 = buildIcon(u':/songs/topic_add.png')
|
||||
self.TopicAddButton.setIcon(icon6)
|
||||
self.TopicAddButton.setObjectName(u'TopicAddButton')
|
||||
self.TopicButtonLayout.addWidget(self.TopicAddButton)
|
||||
self.TopicEditButton = QtGui.QPushButton(self.TopicButtonWidget)
|
||||
icon7 = QtGui.QIcon()
|
||||
icon7.addPixmap(QtGui.QPixmap(u':/songs/topic_edit.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon7 = buildIcon(u':/songs/topic_edit.png')
|
||||
self.TopicEditButton.setIcon(icon7)
|
||||
self.TopicEditButton.setObjectName(u'TopicEditButton')
|
||||
self.TopicButtonLayout.addWidget(self.TopicEditButton)
|
||||
self.TopicDeleteButton = QtGui.QPushButton(self.TopicButtonWidget)
|
||||
icon8 = QtGui.QIcon()
|
||||
icon8.addPixmap(QtGui.QPixmap(u':/songs/topic_delete.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon8 = buildIcon(u':/songs/topic_delete.png')
|
||||
self.TopicDeleteButton.setIcon(icon8)
|
||||
self.TopicDeleteButton.setObjectName(u'TopicDeleteButton')
|
||||
self.TopicButtonLayout.addWidget(self.TopicDeleteButton)
|
||||
@ -180,23 +168,17 @@ class Ui_SongMaintenanceDialog(object):
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.BookButtonLayout.addItem(spacerItem2)
|
||||
self.BookAddButton = QtGui.QPushButton(self.BookButtonWidget)
|
||||
icon9 = QtGui.QIcon()
|
||||
icon9.addPixmap(QtGui.QPixmap(u':/songs/book_add.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon9 = buildIcon(u':/songs/book_add.png')
|
||||
self.BookAddButton.setIcon(icon9)
|
||||
self.BookAddButton.setObjectName(u'BookAddButton')
|
||||
self.BookButtonLayout.addWidget(self.BookAddButton)
|
||||
self.BookEditButton = QtGui.QPushButton(self.BookButtonWidget)
|
||||
icon10 = QtGui.QIcon()
|
||||
icon10.addPixmap(QtGui.QPixmap(u':/songs/book_edit.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon10 = buildIcon(u':/songs/book_edit.png')
|
||||
self.BookEditButton.setIcon(icon10)
|
||||
self.BookEditButton.setObjectName(u'BookEditButton')
|
||||
self.BookButtonLayout.addWidget(self.BookEditButton)
|
||||
self.BookDeleteButton = QtGui.QPushButton(self.BookButtonWidget)
|
||||
icon11 = QtGui.QIcon()
|
||||
icon11.addPixmap(QtGui.QPixmap(u':/songs/book_delete.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
icon11 = buildIcon(u':/songs/book_delete.png')
|
||||
self.BookDeleteButton.setIcon(icon11)
|
||||
self.BookDeleteButton.setObjectName(u'BookDeleteButton')
|
||||
self.BookButtonLayout.addWidget(self.BookDeleteButton)
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, translate, SongXMLParser, \
|
||||
contextMenuAction, contextMenuSeparator, BaseListWithDnD, Receiver
|
||||
BaseListWithDnD, Receiver
|
||||
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm
|
||||
|
||||
class SongListView(BaseListWithDnD):
|
||||
|
@ -26,7 +26,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, translate
|
||||
from openlp.core.lib import Plugin, translate, buildIcon
|
||||
from openlp.plugins.songs.lib import SongManager, SongMediaItem
|
||||
from openlp.plugins.songs.forms import OpenLPImportForm, OpenSongExportForm, \
|
||||
OpenSongImportForm, OpenLPExportForm
|
||||
@ -57,9 +57,7 @@ class SongsPlugin(Plugin):
|
||||
self.openlp_export_form = OpenLPExportForm()
|
||||
self.opensong_export_form = OpenSongExportForm()
|
||||
# Create the plugin icon
|
||||
self.icon = QtGui.QIcon()
|
||||
self.icon.addPixmap(QtGui.QPixmap(u':/media/media_song.png'),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.icon = buildIcon(u':/media/media_song.png')
|
||||
|
||||
def get_media_manager_item(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user