• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python qutil.signalsBlocked函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中qutil.signalsBlocked函数的典型用法代码示例。如果您正苦于以下问题:Python signalsBlocked函数的具体用法?Python signalsBlocked怎么用?Python signalsBlocked使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了signalsBlocked函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: loadSettings

 def loadSettings(self):
     s = QSettings()
     s.beginGroup("helper_applications")
     self.printCommand.setPath(s.value("printcommand", "", type("")))
     self.printDialogCheck.setChecked(s.value("printcommand/dialog", False, bool))
     with qutil.signalsBlocked(self.resolution):
         self.resolution.setEditText(format(s.value("printcommand/dpi", 300, int)))
开发者ID:EdwardBetts,项目名称:frescobaldi,代码行数:7,代码来源:helpers.py


示例2: find

 def find(self):
     # hide replace stuff
     self.replaceLabel.hide()
     self.replaceEntry.hide()
     self.replaceButton.hide()
     self.replaceAllButton.hide()
     self._replace = False # we are not in replace mode
     visible = self.isVisible()
     if not visible:
         self.showWidget()
     else:
         self.adjustSize()
     cursor = self.currentView().textCursor()
     if not visible and self.currentView():
         if cursor.hasSelection() or not self.searchEntry.text():
             if not cursor.hasSelection():
                 # pick current word
                 wordboundary.handler.select(cursor, QTextCursor.WordUnderCursor)
             word = cursor.selection().toPlainText()
             if not re.search(r'\w', word):
                 word = ""
             elif self.regexCheck.isChecked():
                 word = re.escape(word)
             with qutil.signalsBlocked(self.searchEntry):
                 self.searchEntry.setText(word)
             self.slotSearchChanged()
         else:
             self.highlightingOn()
     self.searchEntry.setFocus()
开发者ID:willingc,项目名称:frescobaldi,代码行数:29,代码来源:__init__.py


示例3: find

 def find(self):
     """Called by the main menu Find... command."""
     # hide replace stuff
     self.replaceLabel.hide()
     self.replaceEntry.hide()
     self.replaceButton.hide()
     self.replaceAllButton.hide()
     self._replace = False # we are not in replace mode
     visible = self.isVisible()
     if not visible:
         self.showWidget()
     else:
         self.adjustSize()
     cursor = self.currentView().textCursor()
     #if not visible and self.currentView():
     if cursor.hasSelection():
         word = cursor.selection().toPlainText()
         if not re.search(r'\w', word):
             word = ""
         elif self.regexCheck.isChecked():
             word = re.escape(word)
         with qutil.signalsBlocked(self.searchEntry):
             self.searchEntry.setText(word)
         self.slotSearchChanged()
     else:
         self.searchEntry.selectAll()
         self.highlightingOn()
     self.searchEntry.setFocus()
开发者ID:19joho66,项目名称:frescobaldi,代码行数:28,代码来源:__init__.py


示例4: find

 def find(self):
     # hide replace stuff
     self.replaceLabel.hide()
     self.replaceEntry.hide()
     self.replaceButton.hide()
     self.replaceAllButton.hide()
     self._replace = False # we are not in replace mode
     visible = self.isVisible()
     if not visible:
         with qutil.signalsBlocked(self.searchEntry):
             self.searchEntry.clear()
     self.showWidget()
     if not visible and self.currentView():
         # pick current word
         cursor = self.currentView().textCursor()
         cursor.movePosition(QTextCursor.StartOfWord)
         cursor.movePosition(QTextCursor.EndOfWord, QTextCursor.KeepAnchor)
         word = cursor.selection().toPlainText()
         if not re.search(r'\w', word):
             word = ""
         self.searchEntry.setText(word)
         self.searchEntry.selectAll()
     else:
         self.slotSearchChanged()
     self.searchEntry.setFocus()
开发者ID:WedgeLeft,项目名称:frescobaldi,代码行数:25,代码来源:search.py


示例5: loadSettings

 def loadSettings(self):
     s = QSettings()
     s.beginGroup("log")
     font = QFont(s.value("fontfamily", "monospace", str))
     font.setPointSizeF(s.value("fontsize", 9.0, float))
     with qutil.signalsBlocked(self.fontChooser, self.fontSize):
         self.fontChooser.setCurrentFont(font)
         self.fontSize.setValue(font.pointSizeF())
     self.showlog.setChecked(s.value("show_on_start", True, bool))
     self.rawview.setChecked(s.value("rawview", True, bool))
     self.hideauto.setChecked(s.value("hide_auto_engrave", False, bool))
开发者ID:19joho66,项目名称:frescobaldi,代码行数:11,代码来源:tools.py


示例6: initSvg

 def initSvg(self, doc):
     """Opens first page of score after compilation"""
     if doc == self.mainwindow().currentDocument():
         files = svgfiles.SvgFiles.instance(doc)
         model = files.model()  # forces update
         if files:
             self._document = doc
             with qutil.signalsBlocked(self.pageCombo):
                 self.pageCombo.setModel(model)
                 self.pageCombo.setCurrentIndex(files.current)
             self.view.load(files.url(files.current))
开发者ID:wbsoft,项目名称:frescobaldi,代码行数:11,代码来源:widget.py


示例7: populate

 def populate(self):
     self._group = QSettings().value("document_list/group_by_folder", False, bool)
     self.clear()
     self._paths = {}
     self._items = {}
     with qutil.signalsBlocked(self):
         # add all existing docs to the list
         for d in app.documents:
             self.addDocument(d)
         doc = self.parentWidget().mainwindow().currentDocument()
         if doc:
             self.selectDocument(doc)
开发者ID:WedgeLeft,项目名称:frescobaldi,代码行数:12,代码来源:widget.py


示例8: setPageCount

 def setPageCount(self, total):
     if total:
         self.setVisible(True)
         # L10N: page numbering: page {num} of {total}
         prefix, suffix = _("{num} of {total}").split('{num}')
         def adjust(w):
             w.setRange(1, total)
             w.setSuffix(suffix.format(total=total))
             w.setPrefix(prefix.format(total=total))
     else:
         self.setVisible(False)
         def adjust(w):
             w.setRange(0, 0)
             w.clear()
     for w in self.createdWidgets():
         with qutil.signalsBlocked(w):
             adjust(w)
开发者ID:m0003r,项目名称:frescobaldi,代码行数:17,代码来源:__init__.py


示例9: loadSettings

 def loadSettings(self):
     s = QSettings()
     s.beginGroup("documentation")
     lang = s.value("language", "default", type(""))
     if lang in lilydoc.translations:
         i = lilydoc.translations.index(lang) + 2
     elif lang == "C":
         i = 1
     else:
         i = 0
     self.languages.setCurrentIndex(i)
     
     font = self.font()
     family = s.value("fontfamily", "", type(""))
     if family:
         font.setFamily(family)
     size = s.value("fontsize", 16, int)
     with qutil.signalsBlocked(self.fontChooser, self.fontSize):
         self.fontChooser.setCurrentFont(font)
         self.fontSize.setValue(size)
开发者ID:WedgeLeft,项目名称:frescobaldi,代码行数:20,代码来源:documentation.py


示例10: updateTimeSlider

 def updateTimeSlider(self):
     if not self._timeSlider.isSliderDown():
         with qutil.signalsBlocked(self._timeSlider):
             self._timeSlider.setMaximum(self._player.total_time())
             self._timeSlider.setValue(self._player.current_time())
开发者ID:WedgeLeft,项目名称:frescobaldi,代码行数:5,代码来源:widget.py


示例11: refreshMidiPorts

 def refreshMidiPorts(self):
     midihub.refresh_ports()
     with qutil.signalsBlocked(self):
         self.loadMidiPorts()
         self.loadSettings()
开发者ID:jan-warchol,项目名称:frescobaldi,代码行数:5,代码来源:midi.py


示例12: updateView

 def updateView(self):
     """Recreate the items in the view."""
     with qutil.signalsBlocked(self):
         self.clear()
         doc = self.parent().mainwindow().currentDocument()
         if not doc:
             return
         view_cursor_position = self.parent().mainwindow().textCursor().position()
         structure = documentstructure.DocumentStructure.instance(doc)
         last_item = None
         current_item = None
         last_block = None
         for i in structure.outline():
             position = i.start()
             block = doc.findBlock(position)
             depth = tokeniter.state(block).depth()
             if block == last_block:
                 parent = last_item
             elif last_block is None or depth == 1:
                 # a toplevel item anyway
                 parent = self
             else:
                 while last_item and depth <= last_item.depth:
                     last_item = last_item.parent()
                 if not last_item:
                     parent = self
                 else:
                     # the item could belong to a parent item, but see if they
                     # really are in the same (toplevel) state
                     b = last_block.next()
                     while b < block:
                         depth2 = tokeniter.state(b).depth()
                         if depth2 == 1:
                             parent = self
                             break
                         while last_item and depth2 <= last_item.depth:
                             last_item = last_item.parent()
                         if not last_item:
                             parent = self
                             break
                         b = b.next()
                     else:
                         parent = last_item
             
             item = last_item = QTreeWidgetItem(parent)
             
             # set item text and display style bold if 'title' was used
             for name, text in i.groupdict().items():
                 if text:
                     if name.startswith('title'):
                         font = item.font(0)
                         font.setWeight(QFont.Bold)
                         item.setFont(0, font)
                         break
                     elif name.startswith('alert'):
                         color = item.foreground(0).color()
                         color = qutil.addcolor(color, 128, 0, 0)
                         item.setForeground(0, QBrush(color))
                         font = item.font(0)
                         font.setStyle(QFont.StyleItalic)
                         item.setFont(0, font)
                     elif name.startswith('text'):
                         break
             else:
                 text = i.group()
             item.setText(0, text)
             
             # remember whether is was collapsed by the user
             try:
                 collapsed = block.userData().collapsed
             except AttributeError:
                 collapsed = False
             item.setExpanded(not collapsed)
             item.depth = depth
             item.position = position
             last_block = block
             # scroll to the item at the view's cursor later
             if position <= view_cursor_position:
                 current_item = item
         if current_item:
             self.scrollToItem(current_item)
开发者ID:marnen,项目名称:frescobaldi,代码行数:81,代码来源:widget.py


示例13: setCurrentPage

 def setCurrentPage(self, num):
     if num:
         for w in self.createdWidgets():
             with qutil.signalsBlocked(w):
                 w.setValue(num)
                 w.lineEdit().deselect()
开发者ID:m0003r,项目名称:frescobaldi,代码行数:6,代码来源:__init__.py



注:本文中的qutil.signalsBlocked函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python qutils.ask_number_question函数代码示例发布时间:2022-05-26
下一篇:
Python qutil.saveDialogSize函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap