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