forked from openlp/openlp
Naming fixes for toolbar and maindisplay
This commit is contained in:
parent
cde04a9218
commit
19a831d9cf
@ -71,27 +71,27 @@ class OpenLPToolbar(QtGui.QToolBar):
|
|||||||
``objectname``
|
``objectname``
|
||||||
The name of the object, as used in `<button>.setObjectName()`.
|
The name of the object, as used in `<button>.setObjectName()`.
|
||||||
"""
|
"""
|
||||||
ToolbarButton = None
|
toolbarButton = None
|
||||||
if icon:
|
if icon:
|
||||||
ButtonIcon = build_icon(icon)
|
buttonIcon = build_icon(icon)
|
||||||
if slot and not checkable:
|
if slot and not checkable:
|
||||||
ToolbarButton = self.addAction(ButtonIcon, title, slot)
|
toolbarButton = self.addAction(buttonIcon, title, slot)
|
||||||
else:
|
else:
|
||||||
ToolbarButton = self.addAction(ButtonIcon, title)
|
toolbarButton = self.addAction(buttonIcon, title)
|
||||||
self.icons[title] = ButtonIcon
|
self.icons[title] = buttonIcon
|
||||||
else:
|
else:
|
||||||
ToolbarButton = QtGui.QAction(title, ToolbarButton)
|
toolbarButton = QtGui.QAction(title, toolbarButton)
|
||||||
self.addAction(ToolbarButton)
|
self.addAction(toolbarButton)
|
||||||
QtCore.QObject.connect(ToolbarButton,
|
QtCore.QObject.connect(toolbarButton,
|
||||||
QtCore.SIGNAL(u'triggered()'), slot)
|
QtCore.SIGNAL(u'triggered()'), slot)
|
||||||
if tooltip:
|
if tooltip:
|
||||||
ToolbarButton.setToolTip(tooltip)
|
toolbarButton.setToolTip(tooltip)
|
||||||
if checkable:
|
if checkable:
|
||||||
ToolbarButton.setCheckable(True)
|
toolbarButton.setCheckable(True)
|
||||||
QtCore.QObject.connect(ToolbarButton,
|
QtCore.QObject.connect(toolbarButton,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'), slot)
|
QtCore.SIGNAL(u'toggled(bool)'), slot)
|
||||||
self.actions[title] = ToolbarButton
|
self.actions[title] = toolbarButton
|
||||||
return ToolbarButton
|
return toolbarButton
|
||||||
|
|
||||||
def addToolbarSeparator(self, handle):
|
def addToolbarSeparator(self, handle):
|
||||||
"""
|
"""
|
||||||
|
@ -250,19 +250,19 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.scene.setSceneRect(0, 0, self.size().width(), self.size().height())
|
self.scene.setSceneRect(0, 0, self.size().width(), self.size().height())
|
||||||
self.webView.setGeometry(0, 0, self.size().width(), self.size().height())
|
self.webView.setGeometry(0, 0, self.size().width(), self.size().height())
|
||||||
#Build a custom splash screen
|
#Build a custom splash screen
|
||||||
self.InitialFrame = QtGui.QImage(
|
self.initialFrame = QtGui.QImage(
|
||||||
self.screen[u'size'].width(),
|
self.screen[u'size'].width(),
|
||||||
self.screen[u'size'].height(),
|
self.screen[u'size'].height(),
|
||||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||||
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
splash_image = QtGui.QImage(u':/graphics/openlp-splash-screen.png')
|
||||||
painter_image = QtGui.QPainter()
|
painter_image = QtGui.QPainter()
|
||||||
painter_image.begin(self.InitialFrame)
|
painter_image.begin(self.initialFrame)
|
||||||
painter_image.fillRect(self.InitialFrame.rect(), QtCore.Qt.white)
|
painter_image.fillRect(self.initialFrame.rect(), QtCore.Qt.white)
|
||||||
painter_image.drawImage(
|
painter_image.drawImage(
|
||||||
(self.screen[u'size'].width() - splash_image.width()) / 2,
|
(self.screen[u'size'].width() - splash_image.width()) / 2,
|
||||||
(self.screen[u'size'].height() - splash_image.height()) / 2,
|
(self.screen[u'size'].height() - splash_image.height()) / 2,
|
||||||
splash_image)
|
splash_image)
|
||||||
self.displayImage(self.InitialFrame)
|
self.displayImage(self.initialFrame)
|
||||||
self.repaint()
|
self.repaint()
|
||||||
#Build a Black screen
|
#Build a Black screen
|
||||||
painter = QtGui.QPainter()
|
painter = QtGui.QPainter()
|
||||||
|
Loading…
Reference in New Issue
Block a user