forked from openlp/openlp
Cleanups and fixes
This commit is contained in:
parent
2435ecc545
commit
b94f091fb2
@ -27,7 +27,9 @@ class SettingsManager(object):
|
|||||||
self.screen = screen[0]
|
self.screen = screen[0]
|
||||||
self.width = self.screen[u'size'].width()
|
self.width = self.screen[u'size'].width()
|
||||||
self.height = self.screen[u'size'].height()
|
self.height = self.screen[u'size'].height()
|
||||||
self.mainwindow_width = self.width * 0.8
|
|
||||||
self.mainwindow_height = self.height * 0.8
|
self.mainwindow_height = self.height * 0.8
|
||||||
self.mainwindow_docbars = self.width / 3
|
self.mainwindow_docbars = self.width / 3
|
||||||
self.mainwindow_slidecontroller = self.width / 6
|
if self.mainwindow_docbars > 300:
|
||||||
|
self.mainwindow_docbars = 300
|
||||||
|
self.mainwindow_slidecontroller = (self.width - (self.mainwindow_docbars * 2 ) / 2) / 2
|
||||||
|
print self.width, self.mainwindow_docbars, self.mainwindow_slidecontroller
|
||||||
|
@ -106,7 +106,7 @@ class Ui_MainWindow(object):
|
|||||||
self.MediaManagerDock.setWindowIcon(icon)
|
self.MediaManagerDock.setWindowIcon(icon)
|
||||||
self.MediaManagerDock.setFloating(False)
|
self.MediaManagerDock.setFloating(False)
|
||||||
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
||||||
self.MediaManagerDock.setMinimumWidth(300)
|
self.MediaManagerDock.setMinimumWidth(self.settingsmanager.mainwindow_docbars)
|
||||||
self.MediaManagerContents = QtGui.QWidget()
|
self.MediaManagerContents = QtGui.QWidget()
|
||||||
self.MediaManagerContents.setObjectName(u'MediaManagerContents')
|
self.MediaManagerContents.setObjectName(u'MediaManagerContents')
|
||||||
self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
|
self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
|
||||||
@ -128,7 +128,7 @@ class Ui_MainWindow(object):
|
|||||||
self.ServiceManagerDock.setFeatures(
|
self.ServiceManagerDock.setFeatures(
|
||||||
QtGui.QDockWidget.AllDockWidgetFeatures)
|
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||||
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
|
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
|
||||||
self.ServiceManagerDock.setMinimumWidth(300)
|
self.ServiceManagerDock.setMinimumWidth(self.settingsmanager.mainwindow_docbars)
|
||||||
self.ServiceManagerContents = ServiceManager(self)
|
self.ServiceManagerContents = ServiceManager(self)
|
||||||
self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
|
self.ServiceManagerDock.setWidget(self.ServiceManagerContents)
|
||||||
MainWindow.addDockWidget(
|
MainWindow.addDockWidget(
|
||||||
|
@ -117,7 +117,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.Layout.addWidget(self.Toolbar)
|
self.Layout.addWidget(self.Toolbar)
|
||||||
# Create the service manager list
|
# Create the service manager list
|
||||||
self.ServiceManagerList = ServiceManagerList(self)
|
self.ServiceManagerList = ServiceManagerList(self)
|
||||||
self.ServiceManagerList.setEditTriggers(QtGui.QAbstractItemView.CurrentChanged|QtGui.QAbstractItemView.DoubleClicked|QtGui.QAbstractItemView.EditKeyPressed)
|
self.ServiceManagerList.setEditTriggers(QtGui.QAbstractItemView.CurrentChanged|QtGui.QAbstractItemView. DoubleClicked|QtGui.QAbstractItemView.EditKeyPressed)
|
||||||
self.ServiceManagerList.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
|
self.ServiceManagerList.setDragDropMode(QtGui.QAbstractItemView.DragDrop)
|
||||||
self.ServiceManagerList.setAlternatingRowColors(True)
|
self.ServiceManagerList.setAlternatingRowColors(True)
|
||||||
self.ServiceManagerList.setHeaderHidden(True)
|
self.ServiceManagerList.setHeaderHidden(True)
|
||||||
@ -137,21 +137,28 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.ServiceManagerList.addAction(contextMenuSeparator(self.ServiceManagerList))
|
self.ServiceManagerList.addAction(contextMenuSeparator(self.ServiceManagerList))
|
||||||
self.ServiceManagerList.addAction(contextMenuAction(
|
self.ServiceManagerList.addAction(contextMenuAction(
|
||||||
self.ServiceManagerList, ':/services/service_delete',
|
self.ServiceManagerList, ':/services/service_delete',
|
||||||
translate(u'ServiceManager',u'&Remove from Service'), self.onDeleteFromService))
|
translate(u'ServiceManager',u'&Remove from Service'),
|
||||||
|
self.onDeleteFromService))
|
||||||
self.Layout.addWidget(self.ServiceManagerList)
|
self.Layout.addWidget(self.ServiceManagerList)
|
||||||
# Add the bottom toolbar
|
# Add the bottom toolbar
|
||||||
self.OrderToolbar = OpenLPToolbar(self)
|
self.OrderToolbar = OpenLPToolbar(self)
|
||||||
self.OrderToolbar.addToolbarButton(u'Move to top', u':/services/service_top.png',
|
self.OrderToolbar.addToolbarButton(u'Move to top',
|
||||||
|
u':/services/service_top.png',
|
||||||
translate(u'ServiceManager', u'Move to top'), self.onServiceTop)
|
translate(u'ServiceManager', u'Move to top'), self.onServiceTop)
|
||||||
self.OrderToolbar.addToolbarButton(u'Move up', u':/services/service_up.png',
|
self.OrderToolbar.addToolbarButton(u'Move up',
|
||||||
|
u':/services/service_up.png',
|
||||||
translate(u'ServiceManager', u'Move up order'), self.onServiceUp)
|
translate(u'ServiceManager', u'Move up order'), self.onServiceUp)
|
||||||
self.OrderToolbar.addToolbarButton(u'Move down', u':/services/service_down.png',
|
self.OrderToolbar.addToolbarButton(u'Move down',
|
||||||
|
u':/services/service_down.png',
|
||||||
translate(u'ServiceManager', u'Move down order'), self.onServiceDown)
|
translate(u'ServiceManager', u'Move down order'), self.onServiceDown)
|
||||||
self.OrderToolbar.addToolbarButton(u'Move to bottom', u':/services/service_bottom.png',
|
self.OrderToolbar.addToolbarButton(u'Move to bottom',
|
||||||
|
u':/services/service_bottom.png',
|
||||||
translate(u'ServiceManager', u'Move to end'), self.onServiceEnd)
|
translate(u'ServiceManager', u'Move to end'), self.onServiceEnd)
|
||||||
self.OrderToolbar.addSeparator()
|
self.OrderToolbar.addSeparator()
|
||||||
self.OrderToolbar.addToolbarButton(u'Delete From Service', u':/services/service_delete.png',
|
self.OrderToolbar.addToolbarButton(u'Delete From Service',
|
||||||
translate(u'ServiceManager', u'Delete From Service'), self.onDeleteFromService)
|
u':/services/service_delete.png',
|
||||||
|
translate(u'ServiceManager', u'Delete From Service'),
|
||||||
|
self.onDeleteFromService)
|
||||||
self.Layout.addWidget(self.OrderToolbar)
|
self.Layout.addWidget(self.OrderToolbar)
|
||||||
# Connect up our signals and slots
|
# Connect up our signals and slots
|
||||||
QtCore.QObject.connect(self.ThemeComboBox,
|
QtCore.QObject.connect(self.ThemeComboBox,
|
||||||
|
@ -182,7 +182,7 @@ class ImpressCOMSlide(object):
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
ooo = Openoffice()
|
ooo = Openoffice()
|
||||||
ooo.createResolver()
|
ooo.createResolver()
|
||||||
#show = ImpressCOMPres(ooo, u'/home/timali/test1.odp')
|
show = ImpressCOMPres(ooo, u'/home/timali/test1.odp')
|
||||||
#show.go()
|
show.go()
|
||||||
#show.resume()
|
#show.resume()
|
||||||
#show.nextStep()
|
#show.nextStep()
|
||||||
|
Loading…
Reference in New Issue
Block a user