forked from openlp/openlp
Trunk resync
This commit is contained in:
parent
af2234b945
commit
50de32e882
@ -36,13 +36,11 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
QtGui.QToolBar.__init__(self, None)
|
||||
# useful to be able to reuse button icons...
|
||||
self.icons = {}
|
||||
self.setIconSize(QtCore.QSize(20, 20))
|
||||
self.actions = {}
|
||||
self.log = logging.getLogger(u'OpenLPToolbar')
|
||||
self.log.debug(u'Init done')
|
||||
|
||||
def addToolbarButton(self, title, icon, tooltip=None, slot=None,
|
||||
objectname=None):
|
||||
def addToolbarButton(self, title, icon, tooltip=None, slot=None, objectname=None):
|
||||
"""
|
||||
A method to help developers easily add a button to the toolbar.
|
||||
|
||||
@ -72,8 +70,8 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
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.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
if ButtonIcon is not None:
|
||||
if slot is not None:
|
||||
ToolbarButton = self.addAction(ButtonIcon, title, slot)
|
||||
|
@ -126,11 +126,6 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.ThemeWidget.setDefaultWidget(self.ThemeComboBox)
|
||||
self.Toolbar.addAction(self.ThemeWidget)
|
||||
self.Layout.addWidget(self.Toolbar)
|
||||
# *** TEST Layout for vertical service order toolbar ***
|
||||
self.SubLayout = QtGui.QHBoxLayout()
|
||||
self.SubLayout.setSpacing(0)
|
||||
self.SubLayout.setMargin(0)
|
||||
self.Layout.insertLayout(-1, self.SubLayout)
|
||||
# Create the service manager list
|
||||
self.ServiceManagerList = ServiceManagerList(self)
|
||||
self.ServiceManagerList.setEditTriggers(
|
||||
@ -161,11 +156,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.ServiceManagerList, ':/services/service_delete',
|
||||
translate(u'ServiceManager',u'&Remove from Service'),
|
||||
self.onDeleteFromService))
|
||||
self.SubLayout.addWidget(self.ServiceManagerList)
|
||||
self.Layout.addWidget(self.ServiceManagerList)
|
||||
# Add the bottom toolbar
|
||||
self.OrderToolbar = OpenLPToolbar(self)
|
||||
self.OrderToolbar.setOrientation(QtCore.Qt.Vertical)
|
||||
self.OrderToolbar.setIconSize(QtCore.QSize(17, 17))
|
||||
self.OrderToolbar.addToolbarButton(u'Move to top',
|
||||
u':/services/service_top.png',
|
||||
translate(u'ServiceManager', u'Move to top'), self.onServiceTop)
|
||||
@ -184,7 +177,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
u':/services/service_delete.png',
|
||||
translate(u'ServiceManager', u'Delete From Service'),
|
||||
self.onDeleteFromService)
|
||||
self.SubLayout.addWidget(self.OrderToolbar)
|
||||
self.Layout.addWidget(self.OrderToolbar)
|
||||
# Connect up our signals and slots
|
||||
QtCore.QObject.connect(self.ThemeComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onThemeComboBoxSelected)
|
||||
|
Loading…
Reference in New Issue
Block a user