##// END OF EJS Templates
BUG: QtKernelManagerMixin does not define PyQt4-safe signals.
epatters -
Show More
@@ -5,8 +5,8 b''
5 5 from IPython.external.qt import QtCore
6 6
7 7 # IPython imports.
8 from IPython.utils.traitlets import Type
9 from util import SuperQObject
8 from IPython.utils.traitlets import HasTraits, Type
9 from util import MetaQObjectHasTraits, SuperQObject
10 10
11 11
12 12 class ChannelQObject(SuperQObject):
@@ -189,10 +189,12 b' class QtHBChannelMixin(ChannelQObject):'
189 189 self.kernel_died.emit(since_last_heartbeat)
190 190
191 191
192 class QtKernelManagerMixin(object):
192 class QtKernelManagerMixin(HasTraits, SuperQObject):
193 193 """ A KernelManager that provides signals and slots.
194 194 """
195 195
196 __metaclass__ = MetaQObjectHasTraits
197
196 198 # Emitted when the kernel manager has started listening.
197 199 started_kernel = QtCore.Signal()
198 200
@@ -8,7 +8,6 b' from IPython.embedded.kernelmanager import \\'
8 8 from IPython.utils.traitlets import Type
9 9 from base_kernelmanager import QtShellChannelMixin, QtSubChannelMixin, \
10 10 QtStdInChannelMixin, QtHBChannelMixin, QtKernelManagerMixin
11 from util import MetaQObjectHasTraits, SuperQObject
12 11
13 12
14 13 class QtShellEmbeddedChannel(QtShellChannelMixin, ShellEmbeddedChannel):
@@ -24,13 +23,10 b' class QtHBEmbeddedChannel(QtHBChannelMixin, HBEmbeddedChannel):'
24 23 pass
25 24
26 25
27 class QtEmbeddedKernelManager(QtKernelManagerMixin,
28 EmbeddedKernelManager, SuperQObject):
26 class QtEmbeddedKernelManager(QtKernelManagerMixin, EmbeddedKernelManager):
29 27 """ An embedded KernelManager that provides signals and slots.
30 28 """
31 29
32 __metaclass__ = MetaQObjectHasTraits
33
34 30 sub_channel_class = Type(QtSubEmbeddedChannel)
35 31 shell_channel_class = Type(QtShellEmbeddedChannel)
36 32 stdin_channel_class = Type(QtStdInEmbeddedChannel)
@@ -7,7 +7,6 b' from IPython.zmq.kernelmanager import ShellSocketChannel, SubSocketChannel, \\'
7 7 StdInSocketChannel, HBSocketChannel, KernelManager
8 8 from base_kernelmanager import QtShellChannelMixin, QtSubChannelMixin, \
9 9 QtStdInChannelMixin, QtHBChannelMixin, QtKernelManagerMixin
10 from util import MetaQObjectHasTraits, SuperQObject
11 10
12 11
13 12 class QtShellSocketChannel(QtShellChannelMixin, ShellSocketChannel):
@@ -23,12 +22,10 b' class QtHBSocketChannel(QtHBChannelMixin, HBSocketChannel):'
23 22 pass
24 23
25 24
26 class QtKernelManager(QtKernelManagerMixin, KernelManager, SuperQObject):
25 class QtKernelManager(QtKernelManagerMixin, KernelManager):
27 26 """ A KernelManager that provides signals and slots.
28 27 """
29 28
30 __metaclass__ = MetaQObjectHasTraits
31
32 29 sub_channel_class = Type(QtSubSocketChannel)
33 30 shell_channel_class = Type(QtShellSocketChannel)
34 31 stdin_channel_class = Type(QtStdInSocketChannel)
@@ -56,7 +56,7 b' class SuperQObject(QtCore.QObject):'
56 56 they don't inherit QObject.)
57 57
58 58 This class is primarily useful for attaching signals to existing non-Qt
59 classes. See QtKernelManager for an example.
59 classes. See QtKernelManagerMixin for an example.
60 60 """
61 61
62 62 def __new__(cls, *args, **kw):
General Comments 0
You need to be logged in to leave comments. Login now