forked from openlp/openlp
changed a few signals
This commit is contained in:
parent
7cbdb2f750
commit
32ab855eb1
@ -250,12 +250,9 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
# Create the context menu and add all actions from the listView.
|
||||
self.menu = QtGui.QMenu()
|
||||
self.menu.addActions(self.listView.actions())
|
||||
QtCore.QObject.connect(self.listView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||
self.onDoubleClicked)
|
||||
QtCore.QObject.connect(self.listView, QtCore.SIGNAL(u'itemSelectionChanged()'),
|
||||
self.onSelectionChange)
|
||||
QtCore.QObject.connect(self.listView, QtCore.SIGNAL(u'customContextMenuRequested(QPoint)'),
|
||||
self.contextMenu)
|
||||
self.listView.doubleClicked.connect(self.onDoubleClicked)
|
||||
self.listView.itemSelectionChanged.connect(self.onSelectionChange)
|
||||
self.listView.customContextMenuRequested.connect(self.contextMenu)
|
||||
|
||||
def addSearchToToolBar(self):
|
||||
"""
|
||||
@ -283,10 +280,9 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
self.searchLayout.addLayout(self.searchButtonLayout)
|
||||
self.pageLayout.addWidget(self.searchWidget)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'returnPressed()'), self.onSearchTextButtonClicked)
|
||||
QtCore.QObject.connect(self.searchTextButton, QtCore.SIGNAL(u'clicked()'), self.onSearchTextButtonClicked)
|
||||
QtCore.QObject.connect(self.searchTextEdit, QtCore.SIGNAL(u'textChanged(const QString&)'),
|
||||
self.onSearchTextEditChanged)
|
||||
self.searchTextEdit.returnPressed.connect(self.onSearchTextButtonClicked)
|
||||
self.searchTextEdit.clicked.connect(self.onSearchTextButtonClicked)
|
||||
self.searchTextEdit.textChanged.connect(self.onSearchTextEditChanged)
|
||||
|
||||
def addCustomContextActions(self):
|
||||
"""
|
||||
|
@ -74,8 +74,8 @@ class ScreenList(object):
|
||||
screen_list.display_count = 0
|
||||
screen_list.screen_count_changed()
|
||||
screen_list.load_screen_settings()
|
||||
QtCore.QObject.connect(desktop, QtCore.SIGNAL(u'resized(int)'), screen_list.screen_resolution_changed)
|
||||
QtCore.QObject.connect(desktop, QtCore.SIGNAL(u'screenCountChanged(int)'), screen_list.screen_count_changed)
|
||||
desktop.resized.connect(screen_list.screen_resolution_changed)
|
||||
desktop.screenCountChanged.connect(screen_list.screen_count_changed)
|
||||
return screen_list
|
||||
|
||||
def screen_resolution_changed(self, number):
|
||||
|
@ -104,9 +104,8 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
lang_menu.addAction(action)
|
||||
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||
popupMenu.insertMenu(popupMenu.actions()[0], lang_menu)
|
||||
QtCore.QObject.connect(lang_menu, QtCore.SIGNAL(u'triggered(QAction*)'), self.setLanguage)
|
||||
# Check if the selected word is misspelled and offer spelling
|
||||
# suggestions if it is.
|
||||
lang_menu.triggered.connect(self.setLanguage)
|
||||
# Check if the selected word is misspelled and offer spelling suggestions if it is.
|
||||
if ENCHANT_AVAILABLE and self.textCursor().hasSelection():
|
||||
text = self.textCursor().selectedText()
|
||||
if not self.dictionary.check(text):
|
||||
@ -115,8 +114,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
action = SpellAction(word, spell_menu)
|
||||
action.correct.connect(self.correctWord)
|
||||
spell_menu.addAction(action)
|
||||
# Only add the spelling suggests to the menu if there are
|
||||
# suggestions.
|
||||
# Only add the spelling suggests to the menu if there are suggestions.
|
||||
if spell_menu.actions():
|
||||
popupMenu.insertMenu(popupMenu.actions()[0], spell_menu)
|
||||
tagMenu = QtGui.QMenu(translate('OpenLP.SpellTextEdit', 'Formatting Tags'))
|
||||
|
Loading…
Reference in New Issue
Block a user