##// END OF EJS Templates
* Added 'started_listening' and 'stopped_listening' signals to QtKernelManager. The FrontendWidget listens for these signals....
* Added 'started_listening' and 'stopped_listening' signals to QtKernelManager. The FrontendWidget listens for these signals. * Created a metaclass to permit inheriting from both HasTraits and QObject * Made 'continuation_prompt' a protected variable of ConsoleWidget for API consistency * Made FrontendWidget's constructor consistent with QWidget conventions.

File last commit:

r2643:422a62e7
r2643:422a62e7
Show More
util.py
25 lines | 708 B | text/x-python | PythonLexer
""" Defines miscellaneous Qt-related helper classes and functions.
"""
# System library imports.
from PyQt4 import QtCore
# IPython imports.
from IPython.utils.traitlets import HasTraits
MetaHasTraits = type(HasTraits)
MetaQObject = type(QtCore.QObject)
class MetaQObjectHasTraits(MetaQObject, MetaHasTraits):
""" A metaclass that inherits from the metaclasses of both HasTraits and
QObject.
Using this metaclass allows a class to inherit from both HasTraits and
QObject. See QtKernelManager for an example.
"""
def __init__(cls, name, bases, dct):
MetaQObject.__init__(cls, name, bases, dct)
MetaHasTraits.__init__(cls, name, bases, dct)