예제 #1
0
def registerBlockInspectorWidget(ID, cls):
    """
    Register a widget with the Block Inspector to use when inspecting TileEntities
    that have the given ID.

    xxx make ID an attribute of cls?

    >>> from PySide import QtGui
    >>> class MyBarrelInspector(QtGui.QWidget):
    >>>     pass
    >>> registerBlockInspectorWidget("MyBarrel", MyBarrelInspector)

    :param cls:
    :type cls:
    :return:
    :rtype:
    """
    return inspector.registerBlockInspectorWidget(ID, cls)
예제 #2
0
def registerBlockInspectorWidget(cls):
    """
    Register a widget with the Block Inspector for editing a TileEntity

    The class must have a `tileEntityID` attribute.

    >>> from PySide import QtGui
    >>> class MyBarrelInspector(QtGui.QWidget):
    >>>     tileEntityID = "MyBarrel"
    >>>
    >>> registerBlockInspectorWidget(MyBarrelInspector)

    :param cls:
    :type cls:
    :return:
    :rtype:
    """
    _registerClass(cls)
    return inspector.registerBlockInspectorWidget(cls)
예제 #3
0
파일: plugins.py 프로젝트: pamunoz/mcedit2
def registerBlockInspectorWidget(cls):
    """
    Register a widget with the Block Inspector for editing a TileEntity

    The class must have a `tileEntityID` attribute.

    >>> from PySide import QtGui
    >>> class MyBarrelInspector(QtGui.QWidget):
    >>>     tileEntityID = "MyBarrel"
    >>>
    >>> registerBlockInspectorWidget(MyBarrelInspector)

    :param cls:
    :type cls:
    :return:
    :rtype:
    """
    _registerClass(cls)
    return inspector.registerBlockInspectorWidget(cls)
예제 #4
0
def registerBlockInspectorWidget(ID, cls):
    """
    Register a widget with the Block Inspector to use when inspecting TileEntities
    that have the given ID.

    xxx make ID an attribute of cls?

    >>> from PySide import QtGui
    >>> class MyBarrelInspector(QtGui.QWidget):
    >>>     pass
    >>> registerBlockInspectorWidget("MyBarrel", MyBarrelInspector)

    :param cls:
    :type cls:
    :return:
    :rtype:
    """
    _registerClass(cls)
    return inspector.registerBlockInspectorWidget(ID, cls)