本文整理汇总了Python中spyderlib.qt.QtCore.QObject类的典型用法代码示例。如果您正苦于以下问题:Python QObject类的具体用法?Python QObject怎么用?Python QObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QObject类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, dock_tabbar, main):
QObject.__init__(self)
self.dock_tabbar = dock_tabbar
self.main = main
self.moving = False
self.from_index = None
self.to_index = None
开发者ID:ImadBouirmane,项目名称:spyder,代码行数:7,代码来源:__init__.py
示例2: initialize_plugin
def initialize_plugin(self):
"""Initialize plugin: connect signals, setup actions, ..."""
self.plugin_actions = self.get_plugin_actions()
QObject.connect(self, SIGNAL("show_message(QString,int)"), self.show_message)
QObject.connect(self, SIGNAL("update_plugin_title()"), self.__update_plugin_title)
if self.sig_option_changed is not None:
self.sig_option_changed.connect(self.set_option)
self.setWindowTitle(self.get_plugin_title())
self.create_toggle_view_action()
开发者ID:Poneyo,项目名称:spyderlib,代码行数:9,代码来源:__init__.py
示例3: __init__
def __init__(self, canvas, num):
import matplotlib
if backend_qt4.DEBUG:
print 'FigureManagerQT.%s' % backend_qt4.fn_name()
backend_qt4.FigureManagerBase.__init__(self, canvas, num)
self.canvas = canvas
self.window = FigureWindow()
self.window.setWindowTitle("Figure %d" % num)
self.window.setAttribute(Qt.WA_DeleteOnClose)
import os.path as osp
image = osp.join(matplotlib.rcParams['datapath'],
'images', 'matplotlib.png' )
self.window.setWindowIcon(QIcon(image))
# Give the keyboard focus to the figure instead of the manager
self.canvas.setFocusPolicy(Qt.ClickFocus)
self.canvas.setFocus()
QObject.connect(self.window, SIGNAL('destroyed()'),
self._widgetclosed)
self.window._destroying = False
self.toolbar = self._get_toolbar(self.canvas, self.window)
self.window.addToolBar(self.toolbar)
QObject.connect(self.toolbar, SIGNAL("message"),
self.window.statusBar().showMessage)
self.window.setCentralWidget(self.canvas)
if matplotlib.is_interactive():
self.window.show()
# attach a show method to the figure for pylab ease of use
self.canvas.figure.show = lambda *args: self.window.show()
def notify_axes_change(fig):
# This will be called whenever the current axes is changed
if self.toolbar != None: self.toolbar.update()
self.canvas.figure.add_axobserver(notify_axes_change)
开发者ID:jromang,项目名称:retina-old,代码行数:42,代码来源:mpl_patch.py
示例4: create_toolbutton
def create_toolbutton(parent, text=None, shortcut=None, icon=None, tip=None,
toggled=None, triggered=None,
autoraise=True, text_beside_icon=False):
"""Create a QToolButton"""
button = QToolButton(parent)
if text is not None:
button.setText(text)
if icon is not None:
if is_text_string(icon):
icon = get_icon(icon)
button.setIcon(icon)
if text is not None or tip is not None:
button.setToolTip(text if tip is None else tip)
if text_beside_icon:
button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
button.setAutoRaise(autoraise)
if triggered is not None:
QObject.connect(button, SIGNAL('clicked()'), triggered)
if toggled is not None:
QObject.connect(button, SIGNAL("toggled(bool)"), toggled)
button.setCheckable(True)
if shortcut is not None:
button.setShortcut(shortcut)
return button
开发者ID:jromang,项目名称:spyderlib,代码行数:24,代码来源:qthelpers.py
示例5: __init__
def __init__(self, parent):
QObject.__init__(self)
self._parent = parent
self.error = None
self.latest_release = None
开发者ID:ImadBouirmane,项目名称:spyder,代码行数:5,代码来源:updates.py
示例6: __init__
def __init__(self):
QObject.__init__(self)
self.dialogs = {}
开发者ID:jromang,项目名称:spyderlib,代码行数:3,代码来源:qthelpers.py
示例7: __init__
def __init__(self, input_condition):
QObject.__init__(self)
self.input_data = None
self.input_condition = input_condition
开发者ID:rthouvenin,项目名称:spyder,代码行数:4,代码来源:internalshell.py
示例8: __init__
def __init__(self):
QObject.__init__(self)
self.dialogs = {}
self.namespace = None
开发者ID:ImadBouirmane,项目名称:spyder,代码行数:4,代码来源:objecteditor.py
注:本文中的spyderlib.qt.QtCore.QObject类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论