コード例 #1
0
ファイル: plugins.py プロジェクト: sadeksadek/mcedit2
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
ファイル: plugins.py プロジェクト: shipbiulder101/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)
コード例 #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
ファイル: plugins.py プロジェクト: Xelloss-HC/mcedit2
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)