forked from openlp/openlp
Added a shortcut list dialog shell.
This commit is contained in:
parent
c262e5e07e
commit
cff333ddc2
@ -52,6 +52,7 @@ from advancedtab import AdvancedTab
|
||||
from aboutform import AboutForm
|
||||
from pluginform import PluginForm
|
||||
from settingsform import SettingsForm
|
||||
from shortcutlistform import ShortcutListForm
|
||||
from mediadockmanager import MediaDockManager
|
||||
from servicemanager import ServiceManager
|
||||
from thememanager import ThemeManager
|
||||
|
@ -29,7 +29,8 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
||||
ThemeManager, SlideController, PluginForm, MediaDockManager
|
||||
ThemeManager, SlideController, PluginForm, MediaDockManager, \
|
||||
ShortcutListForm
|
||||
from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
|
||||
SettingsManager, PluginManager, Receiver, translate
|
||||
from openlp.core.utils import AppLocation, add_actions, LanguageManager
|
||||
@ -98,6 +99,12 @@ class Ui_MainWindow(object):
|
||||
self.screens)
|
||||
self.LiveController = SlideController(self, self.settingsmanager,
|
||||
self.screens, True)
|
||||
previewVisible = QtCore.QSettings().value(
|
||||
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
|
||||
self.PreviewController.Panel.setVisible(previewVisible)
|
||||
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
||||
QtCore.QVariant(True)).toBool()
|
||||
self.LiveController.Panel.setVisible(liveVisible)
|
||||
# Create menu
|
||||
self.MenuBar = QtGui.QMenuBar(MainWindow)
|
||||
self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27))
|
||||
@ -196,10 +203,6 @@ class Ui_MainWindow(object):
|
||||
self.ExportThemeItem.setObjectName(u'ExportThemeItem')
|
||||
self.ExportLanguageItem = QtGui.QAction(MainWindow)
|
||||
self.ExportLanguageItem.setObjectName(u'ExportLanguageItem')
|
||||
self.SettingsConfigureItem = QtGui.QAction(MainWindow)
|
||||
self.SettingsConfigureItem.setIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.SettingsConfigureItem.setObjectName(u'SettingsConfigureItem')
|
||||
self.ViewMediaManagerItem = QtGui.QAction(MainWindow)
|
||||
self.ViewMediaManagerItem.setCheckable(True)
|
||||
self.ViewMediaManagerItem.setChecked(self.MediaManagerDock.isVisible())
|
||||
@ -219,24 +222,35 @@ class Ui_MainWindow(object):
|
||||
self.ViewServiceManagerItem.setIcon(
|
||||
build_icon(u':/system/system_servicemanager.png'))
|
||||
self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
|
||||
self.ViewPreviewPanel = QtGui.QAction(MainWindow)
|
||||
self.ViewPreviewPanel.setCheckable(True)
|
||||
self.ViewPreviewPanel.setChecked(previewVisible)
|
||||
self.ViewPreviewPanel.setObjectName(u'ViewPreviewPanel')
|
||||
self.ViewLivePanel = QtGui.QAction(MainWindow)
|
||||
self.ViewLivePanel.setCheckable(True)
|
||||
self.ViewLivePanel.setChecked(liveVisible)
|
||||
self.ViewLivePanel.setObjectName(u'ViewLivePanel')
|
||||
self.ModeDefaultItem = QtGui.QAction(MainWindow)
|
||||
self.ModeDefaultItem.setCheckable(True)
|
||||
self.ModeDefaultItem.setObjectName(u'ModeDefaultItem')
|
||||
self.ModeSetupItem = QtGui.QAction(MainWindow)
|
||||
self.ModeSetupItem.setCheckable(True)
|
||||
self.ModeSetupItem.setObjectName(u'ModeLiveItem')
|
||||
self.ModeLiveItem = QtGui.QAction(MainWindow)
|
||||
self.ModeLiveItem.setCheckable(True)
|
||||
self.ModeLiveItem.setObjectName(u'ModeLiveItem')
|
||||
self.ModeGroup = QtGui.QActionGroup(MainWindow)
|
||||
self.ModeGroup.addAction(self.ModeDefaultItem)
|
||||
self.ModeGroup.addAction(self.ModeSetupItem)
|
||||
self.ModeGroup.addAction(self.ModeLiveItem)
|
||||
self.ModeDefaultItem.setChecked(True)
|
||||
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
|
||||
self.ToolsAddToolItem.setIcon(build_icon(u':/tools/tools_add.png'))
|
||||
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
|
||||
self.SettingsPluginListItem = QtGui.QAction(MainWindow)
|
||||
self.SettingsPluginListItem.setIcon(
|
||||
build_icon(u':/system/settings_plugin_list.png'))
|
||||
self.SettingsPluginListItem.setObjectName(u'SettingsPluginListItem')
|
||||
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
||||
self.HelpDocumentationItem.setIcon(
|
||||
build_icon(u':/system/system_help_contents.png'))
|
||||
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
|
||||
self.HelpDocumentationItem.setEnabled(False)
|
||||
self.HelpAboutItem = QtGui.QAction(MainWindow)
|
||||
self.HelpAboutItem.setIcon(
|
||||
build_icon(u':/system/system_about.png'))
|
||||
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
|
||||
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
|
||||
self.HelpOnlineHelpItem.setObjectName(u'HelpOnlineHelpItem')
|
||||
self.HelpOnlineHelpItem.setEnabled(False)
|
||||
self.HelpWebSiteItem = QtGui.QAction(MainWindow)
|
||||
self.HelpWebSiteItem.setObjectName(u'HelpWebSiteItem')
|
||||
#i18n Language Items
|
||||
self.AutoLanguageItem = QtGui.QAction(MainWindow)
|
||||
self.AutoLanguageItem.setObjectName(u'AutoLanguageItem')
|
||||
@ -253,37 +267,28 @@ class Ui_MainWindow(object):
|
||||
languageItem.setChecked(True)
|
||||
add_actions(self.LanguageGroup, [languageItem])
|
||||
self.LanguageGroup.setDisabled(LanguageManager.auto_language)
|
||||
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
|
||||
self.ToolsAddToolItem.setIcon(build_icon(u':/tools/tools_add.png'))
|
||||
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
|
||||
self.ViewPreviewPanel = QtGui.QAction(MainWindow)
|
||||
self.ViewPreviewPanel.setCheckable(True)
|
||||
previewVisible = QtCore.QSettings().value(
|
||||
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
|
||||
self.ViewPreviewPanel.setChecked(previewVisible)
|
||||
self.ViewPreviewPanel.setObjectName(u'ViewPreviewPanel')
|
||||
self.PreviewController.Panel.setVisible(previewVisible)
|
||||
self.ViewLivePanel = QtGui.QAction(MainWindow)
|
||||
self.ViewLivePanel.setCheckable(True)
|
||||
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
||||
QtCore.QVariant(True)).toBool()
|
||||
self.ViewLivePanel.setChecked(liveVisible)
|
||||
self.ViewLivePanel.setObjectName(u'ViewLivePanel')
|
||||
self.LiveController.Panel.setVisible(liveVisible)
|
||||
self.ModeDefaultItem = QtGui.QAction(MainWindow)
|
||||
self.ModeDefaultItem.setCheckable(True)
|
||||
self.ModeDefaultItem.setObjectName(u'ModeDefaultItem')
|
||||
self.ModeSetupItem = QtGui.QAction(MainWindow)
|
||||
self.ModeSetupItem.setCheckable(True)
|
||||
self.ModeSetupItem.setObjectName(u'ModeLiveItem')
|
||||
self.ModeLiveItem = QtGui.QAction(MainWindow)
|
||||
self.ModeLiveItem.setCheckable(True)
|
||||
self.ModeLiveItem.setObjectName(u'ModeLiveItem')
|
||||
self.ModeGroup = QtGui.QActionGroup(MainWindow)
|
||||
self.ModeGroup.addAction(self.ModeDefaultItem)
|
||||
self.ModeGroup.addAction(self.ModeSetupItem)
|
||||
self.ModeGroup.addAction(self.ModeLiveItem)
|
||||
self.ModeDefaultItem.setChecked(True)
|
||||
self.SettingsShortcutsItem = QtGui.QAction(MainWindow)
|
||||
self.SettingsShortcutsItem.setIcon(
|
||||
build_icon(u':/system/system_configure_shortcuts.png'))
|
||||
self.SettingsShortcutsItem.setObjectName(u'SettingsShortcutsItem')
|
||||
self.SettingsConfigureItem = QtGui.QAction(MainWindow)
|
||||
self.SettingsConfigureItem.setIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.SettingsConfigureItem.setObjectName(u'SettingsConfigureItem')
|
||||
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
||||
self.HelpDocumentationItem.setIcon(
|
||||
build_icon(u':/system/system_help_contents.png'))
|
||||
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
|
||||
self.HelpDocumentationItem.setEnabled(False)
|
||||
self.HelpAboutItem = QtGui.QAction(MainWindow)
|
||||
self.HelpAboutItem.setIcon(
|
||||
build_icon(u':/system/system_about.png'))
|
||||
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
|
||||
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
|
||||
self.HelpOnlineHelpItem.setObjectName(u'HelpOnlineHelpItem')
|
||||
self.HelpOnlineHelpItem.setEnabled(False)
|
||||
self.HelpWebSiteItem = QtGui.QAction(MainWindow)
|
||||
self.HelpWebSiteItem.setObjectName(u'HelpWebSiteItem')
|
||||
add_actions(self.FileImportMenu,
|
||||
(self.ImportThemeItem, self.ImportLanguageItem))
|
||||
add_actions(self.FileExportMenu,
|
||||
@ -303,7 +308,7 @@ class Ui_MainWindow(object):
|
||||
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
||||
add_actions(self.SettingsMenu, (self.SettingsPluginListItem,
|
||||
self.SettingsLanguageMenu.menuAction(), None,
|
||||
self.SettingsConfigureItem))
|
||||
self.SettingsShortcutsItem, self.SettingsConfigureItem))
|
||||
add_actions(self.ToolsMenu,
|
||||
(self.ToolsAddToolItem, None))
|
||||
add_actions(self.HelpMenu,
|
||||
@ -394,6 +399,8 @@ class Ui_MainWindow(object):
|
||||
translate('OpenLP.MainWindow', '&Theme'))
|
||||
self.ExportLanguageItem.setText(
|
||||
translate('OpenLP.MainWindow', '&Language'))
|
||||
self.SettingsShortcutsItem.setText(
|
||||
translate('OpenLP.MainWindow', 'Configure &Shortcuts...'))
|
||||
self.SettingsConfigureItem.setText(
|
||||
translate('OpenLP.MainWindow', '&Configure OpenLP...'))
|
||||
self.ViewMediaManagerItem.setText(
|
||||
@ -506,6 +513,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.settingsmanager = SettingsManager(screens)
|
||||
self.aboutForm = AboutForm(self, applicationVersion)
|
||||
self.settingsForm = SettingsForm(self.screens, self, self)
|
||||
self.shortcutForm = ShortcutListForm(self)
|
||||
self.recentFiles = QtCore.QStringList()
|
||||
# Set up the path with plugins
|
||||
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||
@ -551,7 +559,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
QtCore.QObject.connect(self.SettingsPluginListItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
||||
QtCore.QObject.connect(self.SettingsConfigureItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onOptionsSettingsItemClicked)
|
||||
QtCore.SIGNAL(u'triggered()'), self.onSettingsConfigureItemClicked)
|
||||
QtCore.QObject.connect(self.SettingsShortcutsItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onSettingsShortcutsItemClicked)
|
||||
QtCore.QObject.connect(self.FileNewItem, QtCore.SIGNAL(u'triggered()'),
|
||||
self.ServiceManagerContents.onNewService)
|
||||
QtCore.QObject.connect(self.FileOpenItem,
|
||||
@ -712,12 +722,18 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.pluginForm.load()
|
||||
self.pluginForm.exec_()
|
||||
|
||||
def onOptionsSettingsItemClicked(self):
|
||||
def onSettingsConfigureItemClicked(self):
|
||||
"""
|
||||
Show the Settings dialog
|
||||
"""
|
||||
self.settingsForm.exec_()
|
||||
|
||||
def onSettingsShortcutsItemClicked(self):
|
||||
"""
|
||||
Show the shortcuts dialog
|
||||
"""
|
||||
self.shortcutForm.exec_()
|
||||
|
||||
def onModeDefaultItemClicked(self):
|
||||
"""
|
||||
Put OpenLP into "Default" view mode.
|
||||
|
116
openlp/core/ui/shortcutlistdialog.py
Normal file
116
openlp/core/ui/shortcutlistdialog.py
Normal file
@ -0,0 +1,116 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# 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 PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, build_icon
|
||||
|
||||
class Ui_ShortcutListDialog(object):
|
||||
def setupUi(self, shortcutListDialog):
|
||||
shortcutListDialog.setObjectName(u'shortcutListDialog')
|
||||
shortcutListDialog.resize(500, 438)
|
||||
self.shortcutListLayout = QtGui.QVBoxLayout(shortcutListDialog)
|
||||
self.shortcutListLayout.setSpacing(8)
|
||||
self.shortcutListLayout.setMargin(8)
|
||||
self.shortcutListLayout.setObjectName(u'shortcutListLayout')
|
||||
self.shortcutListTableWidget = QtGui.QTableWidget(shortcutListDialog)
|
||||
self.shortcutListTableWidget.setAlternatingRowColors(True)
|
||||
self.shortcutListTableWidget.setObjectName(u'shortcutListTableWidget')
|
||||
self.shortcutListTableWidget.setColumnCount(2)
|
||||
self.shortcutListTableWidget.setRowCount(0)
|
||||
self.shortcutListTableWidget.setHorizontalHeaderItem(0,
|
||||
QtGui.QTableWidgetItem())
|
||||
self.shortcutListTableWidget.setHorizontalHeaderItem(1,
|
||||
QtGui.QTableWidgetItem())
|
||||
self.shortcutListTableWidget.verticalHeader().setVisible(False)
|
||||
self.shortcutListLayout.addWidget(self.shortcutListTableWidget)
|
||||
self.shortcutLayout = QtGui.QVBoxLayout()
|
||||
self.shortcutLayout.setSpacing(8)
|
||||
self.shortcutLayout.setContentsMargins(0, -1, -1, -1)
|
||||
self.shortcutLayout.setObjectName(u'shortcutLayout')
|
||||
self.defaultRadioButton = QtGui.QRadioButton(shortcutListDialog)
|
||||
self.defaultRadioButton.setChecked(True)
|
||||
self.defaultRadioButton.setObjectName(u'defaultRadioButton')
|
||||
self.shortcutLayout.addWidget(self.defaultRadioButton)
|
||||
self.customShortcutLayout = QtGui.QHBoxLayout()
|
||||
self.customShortcutLayout.setSpacing(8)
|
||||
self.customShortcutLayout.setObjectName(u'customShortcutLayout')
|
||||
self.customRadioButton = QtGui.QRadioButton(shortcutListDialog)
|
||||
self.customRadioButton.setObjectName(u'customRadioButton')
|
||||
self.customShortcutLayout.addWidget(self.customRadioButton)
|
||||
self.shortcutPushButton = QtGui.QPushButton(shortcutListDialog)
|
||||
self.shortcutPushButton.setMinimumSize(QtCore.QSize(84, 0))
|
||||
self.shortcutPushButton.setIcon(
|
||||
build_icon(u':/system/system_settings.png'))
|
||||
self.shortcutPushButton.setCheckable(True)
|
||||
self.shortcutPushButton.setChecked(False)
|
||||
self.shortcutPushButton.setObjectName(u'shortcutPushButton')
|
||||
self.customShortcutLayout.addWidget(self.shortcutPushButton)
|
||||
self.clearShortcutToolButton = QtGui.QToolButton(shortcutListDialog)
|
||||
self.clearShortcutToolButton.setMinimumSize(QtCore.QSize(0, 16))
|
||||
self.clearShortcutToolButton.setText(u'')
|
||||
self.clearShortcutToolButton.setIcon(
|
||||
build_icon(u':/system/clear_shortcut.png'))
|
||||
self.clearShortcutToolButton.setObjectName(u'clearShortcutToolButton')
|
||||
self.customShortcutLayout.addWidget(self.clearShortcutToolButton)
|
||||
self.customShortcutSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.customShortcutLayout.addItem(self.customShortcutSpacer)
|
||||
self.shortcutLayout.addLayout(self.customShortcutLayout)
|
||||
self.shortcutListLayout.addLayout(self.shortcutLayout)
|
||||
self.shortcutListButtonBox = QtGui.QDialogButtonBox(shortcutListDialog)
|
||||
self.shortcutListButtonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.shortcutListButtonBox.setStandardButtons(
|
||||
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok |
|
||||
QtGui.QDialogButtonBox.Reset)
|
||||
self.shortcutListButtonBox.setObjectName(u'shortcutListButtonBox')
|
||||
self.shortcutListLayout.addWidget(self.shortcutListButtonBox)
|
||||
|
||||
self.retranslateUi(shortcutListDialog)
|
||||
QtCore.QObject.connect(
|
||||
self.shortcutListButtonBox,
|
||||
QtCore.SIGNAL(u'accepted()'),
|
||||
shortcutListDialog.accept
|
||||
)
|
||||
QtCore.QObject.connect(
|
||||
self.shortcutListButtonBox,
|
||||
QtCore.SIGNAL(u'rejected()'),
|
||||
shortcutListDialog.reject
|
||||
)
|
||||
QtCore.QMetaObject.connectSlotsByName(shortcutListDialog)
|
||||
|
||||
def retranslateUi(self, shortcutListDialog):
|
||||
shortcutListDialog.setWindowTitle(
|
||||
translate('OpenLP.ShortcutListDialog', 'Customize Shortcuts'))
|
||||
self.shortcutListTableWidget.horizontalHeaderItem(0).setText(
|
||||
translate(u'OpenLP.ShortcutListDialog', 'Action'))
|
||||
self.shortcutListTableWidget.horizontalHeaderItem(1).setText(
|
||||
translate(u'OpenLP.ShortcutListDialog', 'Shortcut'))
|
||||
self.defaultRadioButton.setText(
|
||||
translate('OpenLP.ShortcutListDialog', 'Default: %s'))
|
||||
self.customRadioButton.setText(
|
||||
translate('OpenLP.ShortcutListDialog', 'Custom:'))
|
||||
self.shortcutPushButton.setText('')
|
43
openlp/core/ui/shortcutlistform.py
Normal file
43
openlp/core/ui/shortcutlistform.py
Normal file
@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# 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 PyQt4 import QtCore, QtGui
|
||||
|
||||
from shortcutlistdialog import Ui_ShortcutListDialog
|
||||
|
||||
class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
||||
"""
|
||||
The shortcut list dialog
|
||||
"""
|
||||
|
||||
def __init__(self, parent):
|
||||
"""
|
||||
Do some initialisation stuff
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
#QtCore.QObject.connect(self.contributeButton,
|
||||
# QtCore.SIGNAL(u'clicked()'), self.onContributeButtonClicked)
|
179
resources/forms/shortcutlistdialog.ui
Normal file
179
resources/forms/shortcutlistdialog.ui
Normal file
@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ShortcutListDialog</class>
|
||||
<widget class="QDialog" name="ShortcutListDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>438</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="shortcutListLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="shortcutListTableWidget">
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Action</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Shortcut</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="shortcutLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="defaultRadioButton">
|
||||
<property name="text">
|
||||
<string>Default: None</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="customShortcutLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="customRadioButton">
|
||||
<property name="text">
|
||||
<string>Custom:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="shortcutPushButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>84</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/system/system_settings.png</normaloff>:/system/system_settings.png</iconset>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="clearShortcutToolButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/system/clear_shortcut.png</normaloff>:/system/clear_shortcut.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="customShortcutSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="shortcutListButtonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images/openlp-2.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>shortcutListButtonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ShortcutListDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>shortcutListButtonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ShortcutListDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
BIN
resources/images/clear_shortcut.png
Normal file
BIN
resources/images/clear_shortcut.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 644 B |
@ -92,6 +92,7 @@
|
||||
</qresource>
|
||||
<qresource prefix="system">
|
||||
<file>system_close.png</file>
|
||||
<file>clear_shortcut.png</file>
|
||||
<file>system_about.png</file>
|
||||
<file>system_help_contents.png</file>
|
||||
<file>system_mediamanager.png</file>
|
||||
@ -101,6 +102,7 @@
|
||||
<file>system_exit.png</file>
|
||||
<file>settings_plugin_list.png</file>
|
||||
<file>system_settings.png</file>
|
||||
<file>system_configure_shortcuts.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="media">
|
||||
<file>media_time.png</file>
|
||||
|
BIN
resources/images/system_configure_shortcuts.png
Normal file
BIN
resources/images/system_configure_shortcuts.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 847 B |
Loading…
Reference in New Issue
Block a user