本文整理汇总了Python中QProgEdit.QTabManager.text方法的典型用法代码示例。如果您正苦于以下问题:Python QTabManager.text方法的具体用法?Python QTabManager.text怎么用?Python QTabManager.text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgEdit.QTabManager
的用法示例。
在下文中一共展示了QTabManager.text方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: qtitem
# 需要导入模块: from QProgEdit import QTabManager [as 别名]
# 或者: from QProgEdit.QTabManager import text [as 别名]
#.........这里部分代码省略.........
self.splitter.setSizes([0, self.splitter.width()])
self.button_view.set_view_icon(u'script')
def set_view_split(self):
"""
desc:
Puts the splitter in split view.
"""
self.splitter.setSizes([self.splitter.width()/2,
self.splitter.width()/2])
self.button_view.set_view_icon(u'split')
def update(self):
"""
desc:
Updates both the script and the controls.
"""
self.update_script()
self.edit_widget()
def update_script(self):
"""
desc:
Regenerates the script and updates the script widget.
"""
# Normally, the script starts with a 'define' line and is indented by
# a tab. We want to undo this, and present only unindented content.
import textwrap
script = self.to_string()
script = script[script.find(u'\t'):]
script = textwrap.dedent(script)
self._script_widget.setText(script)
def edit_widget(self, *deprecated, **_deprecated):
"""
desc:
This function updates the controls based on the item state.
"""
debug.msg()
self.auto_edit_widget()
self.header.refresh()
def apply_edit_changes(self, *deprecated, **_deprecated):
"""
desc:
Applies changes to the graphical controls.
"""
debug.msg()
self.auto_apply_edit_changes()
self.update_script()
self.main_window.set_unsaved(True)
return True
def apply_script_changes(self, *deprecated, **_deprecated):
"""
示例2: qtitem
# 需要导入模块: from QProgEdit import QTabManager [as 别名]
# 或者: from QProgEdit.QTabManager import text [as 别名]
#.........这里部分代码省略.........
self.splitter.setSizes([0, self.splitter.width()])
self.button_view.set_view_icon(u"script")
def set_view_split(self):
"""
desc:
Puts the splitter in split view.
"""
self.splitter.setSizes([self.splitter.width() / 2, self.splitter.width() / 2])
self.button_view.set_view_icon(u"split")
def update(self):
"""
desc:
Updates both the script and the controls.
"""
self.update_script()
self.edit_widget()
def update_script(self):
"""
desc:
Regenerates the script and updates the script widget.
"""
# Normally, the script starts with a 'define' line and is indented by
# a tab. We want to undo this, and present only unindented content.
import textwrap
script = self.to_string()
script = script[script.find(u"\t") :]
script = textwrap.dedent(script)
if self._script_widget.text() != script:
self.main_window.set_unsaved()
self._script_widget.setText(script)
self.extension_manager.fire(u"change_item", name=self.name)
def edit_widget(self, *deprecated, **_deprecated):
"""
desc:
This function updates the controls based on the item state.
"""
self.auto_edit_widget()
self.header.refresh()
def apply_edit_changes(self, *deprecated, **_deprecated):
"""
desc:
Applies changes to the graphical controls.
"""
self.auto_apply_edit_changes()
self.update_script()
return True
def apply_script_changes(self, *deprecated, **_deprecated):
示例3: qtitem
# 需要导入模块: from QProgEdit import QTabManager [as 别名]
# 或者: from QProgEdit.QTabManager import text [as 别名]
#.........这里部分代码省略.........
"""
desc:
Puts the splitter in split view.
"""
self.splitter.setSizes([self.splitter.width()/2,
self.splitter.width()/2])
self.button_view.set_view_icon(u'split')
def update(self):
"""
desc:
Updates both the script and the controls.
"""
# Items are updated when their tab is shown, so we don't need to update
# them if they aren't shown.
if self.tabwidget.current_item() != self.name:
return False
self.update_script()
self.edit_widget()
return True
def update_script(self):
"""
desc:
Regenerates the script and updates the script widget.
"""
# Normally, the script starts with a 'define' line and is indented by
# a tab. We want to undo this, and present only unindented content.
import textwrap
script = self.to_string()
script = script[script.find(u'\t'):]
script = textwrap.dedent(script)
if self._script_widget.text() != script:
self.main_window.set_unsaved()
self._script_widget.setText(script)
self.extension_manager.fire(u'change_item', name=self.name)
def edit_widget(self, *deprecated, **_deprecated):
"""
desc:
This function updates the controls based on the item state.
"""
self.auto_edit_widget()
self.header.refresh()
def apply_edit_changes(self, *deprecated, **_deprecated):
"""
desc:
Applies changes to the graphical controls.
"""
self.auto_apply_edit_changes()
self.update_script()
return True
def apply_script_changes(self, *deprecated, **_deprecated):
"""