started to fix camelCase names

This commit is contained in:
Andreas Preikschat 2011-05-25 09:59:51 +02:00
parent eb9dae0403
commit 10f59d0313
2 changed files with 62 additions and 62 deletions

View File

@ -73,14 +73,14 @@ class Ui_MainWindow(object):
mainWindow.setWindowIcon(build_icon(u':/icon/openlp-logo-64x64.png')) mainWindow.setWindowIcon(build_icon(u':/icon/openlp-logo-64x64.png'))
mainWindow.setDockNestingEnabled(True) mainWindow.setDockNestingEnabled(True)
# Set up the main container, which contains all the other form widgets. # Set up the main container, which contains all the other form widgets.
self.MainContent = QtGui.QWidget(mainWindow) self.mainContent = QtGui.QWidget(mainWindow)
self.MainContent.setObjectName(u'MainContent') self.mainContent.setObjectName(u'mainContent')
self.mainContentLayout = QtGui.QHBoxLayout(self.MainContent) self.mainContentLayout = QtGui.QHBoxLayout(self.mainContent)
self.mainContentLayout.setSpacing(0) self.mainContentLayout.setSpacing(0)
self.mainContentLayout.setMargin(0) self.mainContentLayout.setMargin(0)
self.mainContentLayout.setObjectName(u'mainContentLayout') self.mainContentLayout.setObjectName(u'mainContentLayout')
mainWindow.setCentralWidget(self.MainContent) mainWindow.setCentralWidget(self.mainContent)
self.controlSplitter = QtGui.QSplitter(self.MainContent) self.controlSplitter = QtGui.QSplitter(self.mainContent)
self.controlSplitter.setOrientation(QtCore.Qt.Horizontal) self.controlSplitter.setOrientation(QtCore.Qt.Horizontal)
self.controlSplitter.setObjectName(u'controlSplitter') self.controlSplitter.setObjectName(u'controlSplitter')
self.mainContentLayout.addWidget(self.controlSplitter) self.mainContentLayout.addWidget(self.controlSplitter)
@ -94,31 +94,31 @@ class Ui_MainWindow(object):
QtCore.QVariant(True)).toBool() QtCore.QVariant(True)).toBool()
self.liveController.panel.setVisible(liveVisible) self.liveController.panel.setVisible(liveVisible)
# Create menu # Create menu
self.MenuBar = QtGui.QMenuBar(mainWindow) self.menuBar = QtGui.QMenuBar(mainWindow)
self.MenuBar.setObjectName(u'MenuBar') self.menuBar.setObjectName(u'menuBar')
self.FileMenu = QtGui.QMenu(self.MenuBar) self.fileMenu = QtGui.QMenu(self.menuBar)
self.FileMenu.setObjectName(u'FileMenu') self.fileMenu.setObjectName(u'fileMenu')
self.FileImportMenu = QtGui.QMenu(self.FileMenu) self.fileImportMenu = QtGui.QMenu(self.fileMenu)
self.FileImportMenu.setObjectName(u'FileImportMenu') self.fileImportMenu.setObjectName(u'fileImportMenu')
self.FileExportMenu = QtGui.QMenu(self.FileMenu) self.fileExportMenu = QtGui.QMenu(self.fileMenu)
self.FileExportMenu.setObjectName(u'FileExportMenu') self.fileExportMenu.setObjectName(u'fileExportMenu')
# View Menu # View Menu
self.viewMenu = QtGui.QMenu(self.MenuBar) self.viewMenu = QtGui.QMenu(self.menuBar)
self.viewMenu.setObjectName(u'viewMenu') self.viewMenu.setObjectName(u'viewMenu')
self.ViewModeMenu = QtGui.QMenu(self.viewMenu) self.viewModeMenu = QtGui.QMenu(self.viewMenu)
self.ViewModeMenu.setObjectName(u'ViewModeMenu') self.viewModeMenu.setObjectName(u'viewModeMenu')
# Tools Menu # Tools Menu
self.ToolsMenu = QtGui.QMenu(self.MenuBar) self.toolsMenu = QtGui.QMenu(self.menuBar)
self.ToolsMenu.setObjectName(u'ToolsMenu') self.toolsMenu.setObjectName(u'toolsMenu')
# Settings Menu # Settings Menu
self.SettingsMenu = QtGui.QMenu(self.MenuBar) self.settingsMenu = QtGui.QMenu(self.menuBar)
self.SettingsMenu.setObjectName(u'SettingsMenu') self.settingsMenu.setObjectName(u'settingsMenu')
self.SettingsLanguageMenu = QtGui.QMenu(self.SettingsMenu) self.settingsLanguageMenu = QtGui.QMenu(self.settingsMenu)
self.SettingsLanguageMenu.setObjectName(u'SettingsLanguageMenu') self.settingsLanguageMenu.setObjectName(u'settingsLanguageMenu')
# Help Menu # Help Menu
self.HelpMenu = QtGui.QMenu(self.MenuBar) self.helpMenu = QtGui.QMenu(self.menuBar)
self.HelpMenu.setObjectName(u'HelpMenu') self.helpMenu.setObjectName(u'helpMenu')
mainWindow.setMenuBar(self.MenuBar) mainWindow.setMenuBar(self.menuBar)
self.statusBar = QtGui.QStatusBar(mainWindow) self.statusBar = QtGui.QStatusBar(mainWindow)
self.statusBar.setObjectName(u'statusBar') self.statusBar.setObjectName(u'statusBar')
mainWindow.setStatusBar(self.statusBar) mainWindow.setStatusBar(self.statusBar)
@ -274,41 +274,41 @@ class Ui_MainWindow(object):
category=UiStrings().Help) category=UiStrings().Help)
self.helpWebSiteItem = base_action( self.helpWebSiteItem = base_action(
mainWindow, u'helpWebSiteItem', category=UiStrings().Help) mainWindow, u'helpWebSiteItem', category=UiStrings().Help)
add_actions(self.FileImportMenu, add_actions(self.fileImportMenu,
(self.ImportThemeItem, self.ImportLanguageItem)) (self.ImportThemeItem, self.ImportLanguageItem))
add_actions(self.FileExportMenu, add_actions(self.fileExportMenu,
(self.ExportThemeItem, self.ExportLanguageItem)) (self.ExportThemeItem, self.ExportLanguageItem))
self.FileMenuActions = (self.FileNewItem, self.FileOpenItem, self.fileMenuActions = (self.FileNewItem, self.FileOpenItem,
self.FileSaveItem, self.FileSaveAsItem, None, self.FileSaveItem, self.FileSaveAsItem, None,
self.printServiceOrderItem, None, self.FileImportMenu.menuAction(), self.printServiceOrderItem, None, self.fileImportMenu.menuAction(),
self.FileExportMenu.menuAction(), self.FileExitItem) self.fileExportMenu.menuAction(), self.FileExitItem)
add_actions(self.ViewModeMenu, (self.ModeDefaultItem, add_actions(self.viewModeMenu, (self.ModeDefaultItem,
self.ModeSetupItem, self.ModeLiveItem)) self.ModeSetupItem, self.ModeLiveItem))
add_actions(self.viewMenu, (self.ViewModeMenu.menuAction(), add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
None, self.ViewMediaManagerItem, self.ViewServiceManagerItem, None, self.ViewMediaManagerItem, self.ViewServiceManagerItem,
self.ViewThemeManagerItem, None, self.ViewPreviewPanel, self.ViewThemeManagerItem, None, self.ViewPreviewPanel,
self.ViewLivePanel)) self.ViewLivePanel))
# i18n add Language Actions # i18n add Language Actions
add_actions(self.SettingsLanguageMenu, (self.AutoLanguageItem, None)) add_actions(self.settingsLanguageMenu, (self.AutoLanguageItem, None))
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions()) add_actions(self.settingsLanguageMenu, self.LanguageGroup.actions())
add_actions(self.SettingsMenu, (self.settingsPluginListItem, add_actions(self.settingsMenu, (self.settingsPluginListItem,
self.SettingsLanguageMenu.menuAction(), None, self.settingsLanguageMenu.menuAction(), None,
self.DisplayTagItem, self.SettingsShortcutsItem, self.DisplayTagItem, self.SettingsShortcutsItem,
self.SettingsConfigureItem)) self.SettingsConfigureItem))
add_actions(self.ToolsMenu, (self.ToolsAddToolItem, None)) add_actions(self.toolsMenu, (self.ToolsAddToolItem, None))
add_actions(self.ToolsMenu, (self.ToolsOpenDataFolder, None)) add_actions(self.toolsMenu, (self.ToolsOpenDataFolder, None))
add_actions(self.ToolsMenu, [self.updateThemeImages]) add_actions(self.toolsMenu, [self.updateThemeImages])
add_actions(self.HelpMenu, (self.HelpDocumentationItem, add_actions(self.helpMenu, (self.HelpDocumentationItem,
self.HelpOnlineHelpItem, None, self.helpWebSiteItem, self.HelpOnlineHelpItem, None, self.helpWebSiteItem,
self.HelpAboutItem)) self.HelpAboutItem))
add_actions(self.MenuBar, (self.FileMenu.menuAction(), add_actions(self.menuBar, (self.fileMenu.menuAction(),
self.viewMenu.menuAction(), self.ToolsMenu.menuAction(), self.viewMenu.menuAction(), self.toolsMenu.menuAction(),
self.SettingsMenu.menuAction(), self.HelpMenu.menuAction())) self.settingsMenu.menuAction(), self.helpMenu.menuAction()))
# Initialise the translation # Initialise the translation
self.retranslateUi(mainWindow) self.retranslateUi(mainWindow)
self.MediaToolBox.setCurrentIndex(0) self.MediaToolBox.setCurrentIndex(0)
# Connect up some signals and slots # Connect up some signals and slots
QtCore.QObject.connect(self.FileMenu, QtCore.QObject.connect(self.fileMenu,
QtCore.SIGNAL(u'aboutToShow()'), self.updateFileMenu) QtCore.SIGNAL(u'aboutToShow()'), self.updateFileMenu)
QtCore.QMetaObject.connectSlotsByName(mainWindow) QtCore.QMetaObject.connectSlotsByName(mainWindow)
# Hide the entry, as it does not have any functionality yet. # Hide the entry, as it does not have any functionality yet.
@ -323,16 +323,16 @@ class Ui_MainWindow(object):
""" """
mainWindow.mainTitle = UiStrings().OLPV2 mainWindow.mainTitle = UiStrings().OLPV2
mainWindow.setWindowTitle(mainWindow.mainTitle) mainWindow.setWindowTitle(mainWindow.mainTitle)
self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File')) self.fileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import')) self.fileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))
self.FileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export')) self.fileExportMenu.setTitle(translate('OpenLP.MainWindow', '&Export'))
self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View')) self.viewMenu.setTitle(translate('OpenLP.MainWindow', '&View'))
self.ViewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode')) self.viewModeMenu.setTitle(translate('OpenLP.MainWindow', 'M&ode'))
self.ToolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools')) self.toolsMenu.setTitle(translate('OpenLP.MainWindow', '&Tools'))
self.SettingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings')) self.settingsMenu.setTitle(translate('OpenLP.MainWindow', '&Settings'))
self.SettingsLanguageMenu.setTitle(translate('OpenLP.MainWindow', self.settingsLanguageMenu.setTitle(translate('OpenLP.MainWindow',
'&Language')) '&Language'))
self.HelpMenu.setTitle(translate('OpenLP.MainWindow', '&Help')) self.helpMenu.setTitle(translate('OpenLP.MainWindow', '&Help'))
self.mediaManagerDock.setWindowTitle( self.mediaManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Media Manager')) translate('OpenLP.MainWindow', 'Media Manager'))
self.serviceManagerDock.setWindowTitle( self.serviceManagerDock.setWindowTitle(
@ -573,11 +573,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.pluginManager.hook_media_manager(self.mediaDockManager) self.pluginManager.hook_media_manager(self.mediaDockManager)
# Call the hook method to pull in import menus. # Call the hook method to pull in import menus.
log.info(u'hook menus') log.info(u'hook menus')
self.pluginManager.hook_import_menu(self.FileImportMenu) self.pluginManager.hook_import_menu(self.fileImportMenu)
# Call the hook method to pull in export menus. # Call the hook method to pull in export menus.
self.pluginManager.hook_export_menu(self.FileExportMenu) self.pluginManager.hook_export_menu(self.fileExportMenu)
# Call the hook method to pull in tools menus. # Call the hook method to pull in tools menus.
self.pluginManager.hook_tools_menu(self.ToolsMenu) self.pluginManager.hook_tools_menu(self.toolsMenu)
# Call the initialise method to setup plugins. # Call the initialise method to setup plugins.
log.info(u'initialise plugins') log.info(u'initialise plugins')
self.pluginManager.initialise_plugins() self.pluginManager.initialise_plugins()
@ -985,13 +985,13 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
""" """
recentFileCount = QtCore.QSettings().value( recentFileCount = QtCore.QSettings().value(
u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0] u'advanced/recent file count', QtCore.QVariant(4)).toInt()[0]
self.FileMenu.clear() self.fileMenu.clear()
add_actions(self.FileMenu, self.FileMenuActions[:-1]) add_actions(self.fileMenu, self.fileMenuActions[:-1])
existingRecentFiles = [recentFile for recentFile in self.recentFiles existingRecentFiles = [recentFile for recentFile in self.recentFiles
if QtCore.QFile.exists(recentFile)] if QtCore.QFile.exists(recentFile)]
recentFilesToDisplay = existingRecentFiles[0:recentFileCount] recentFilesToDisplay = existingRecentFiles[0:recentFileCount]
if recentFilesToDisplay: if recentFilesToDisplay:
self.FileMenu.addSeparator() self.fileMenu.addSeparator()
for fileId, filename in enumerate(recentFilesToDisplay): for fileId, filename in enumerate(recentFilesToDisplay):
log.debug('Recent file name: %s', filename) log.debug('Recent file name: %s', filename)
action = base_action(self, u'') action = base_action(self, u'')
@ -1000,9 +1000,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
action.setData(QtCore.QVariant(filename)) action.setData(QtCore.QVariant(filename))
self.connect(action, QtCore.SIGNAL(u'triggered()'), self.connect(action, QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onRecentServiceClicked) self.ServiceManagerContents.onRecentServiceClicked)
self.FileMenu.addAction(action) self.fileMenu.addAction(action)
self.FileMenu.addSeparator() self.fileMenu.addSeparator()
self.FileMenu.addAction(self.FileMenuActions[-1]) self.fileMenu.addAction(self.fileMenuActions[-1])
def addRecentFile(self, filename): def addRecentFile(self, filename):
""" """

View File

@ -68,7 +68,7 @@ class AlertsPlugin(Plugin):
self.toolsAlertItem.setStatusTip( self.toolsAlertItem.setStatusTip(
translate('AlertsPlugin', 'Show an alert message.')) translate('AlertsPlugin', 'Show an alert message.'))
self.toolsAlertItem.setShortcut(u'F7') self.toolsAlertItem.setShortcut(u'F7')
self.serviceManager.mainwindow.ToolsMenu.addAction(self.toolsAlertItem) self.serviceManager.mainwindow.toolsMenu.addAction(self.toolsAlertItem)
QtCore.QObject.connect(self.toolsAlertItem, QtCore.QObject.connect(self.toolsAlertItem,
QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger) QtCore.SIGNAL(u'triggered()'), self.onAlertsTrigger)
self.toolsAlertItem.setVisible(False) self.toolsAlertItem.setVisible(False)