# mcedit2.widgets package — mceditlib 0.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mcedit2 package »

# mcedit2.widgets package

## Subpackages

- mcedit2.widgets.nbttree package
  - Submodules
  - mcedit2.widgets.nbttree.nbteditor module
  - mcedit2.widgets.nbttree.nbttreemodel module
  - Module contents

## Submodules

## mcedit2.widgets.blockpicker module

blockpicker

class `mcedit2.widgets.blockpicker.``BlockThumbView`(*a, **kw)

  Bases: `PySide.QtGui.QWidget`

  `editorSession`
  `block`
  `updateView`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008403E88>

class `mcedit2.widgets.blockpicker.``BlockTypeIcon`(block, textureAtlas, *args, **kwargs)

  Bases: `PySide.QtGui.QLabel`

  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x00000000084100C8>

class `mcedit2.widgets.blockpicker.``BlockTypesItemWidget`(parent=None, blocks=None, textureAtlas=None)

  Bases: `PySide.QtGui.QWidget`

  `setBlocks`(blocks)
  `setTextureAtlas`(textureAtlas)
  `updateContents`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008410148>

class `mcedit2.widgets.blockpicker.``BlockTypeListFilterModel`(sourceModel)

  Bases: `PySide.QtGui.QSortFilterProxyModel`

  `setSearchString`(val)
  `setSearchIdMeta`(ID, meta)
  `filterAcceptsRow`(row, parentIndex)
  `textureAtlas`
  `blocktypes`
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415BC8>

class `mcedit2.widgets.blockpicker.``SelectedBlockTypesProxyModel`(sourceModel)

  Bases: `PySide.QtGui.QSortFilterProxyModel`

  `filterAcceptsRow`(row, parentIndex)
  `addBlocks`(blocks)
  `removeBlocks`(blocks)
  `selectedBlocks`()
  `setSelectedBlocks`(blocks)
  `textureAtlas`
  `blocktypes`
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415C08>

class `mcedit2.widgets.blockpicker.``BlockTypeListModel`(blocktypes, textureAtlas)

  Bases: `PySide.QtCore.QAbstractListModel`

  `rowCount`(index)
  `data`(index, role)
  `addCustomBlock`(block)
  `removeCustomBlocks`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415C48>

class `mcedit2.widgets.blockpicker.``BlockTypeListItemDelegate`

  Bases: `PySide.QtGui.QAbstractItemDelegate`

  `paint`(painter, option, index)

    Parameters:

    - painter (QtGui.QPainter) –
    - option –
    - index –

    Returns: |
    Return type: |

  `sizeHint`(option, index)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415C88>

class `mcedit2.widgets.blockpicker.``BlockTypeListWidget`(*args, **kwargs)

  Bases: `PySide.QtGui.QListView`

  `blockSelectionChanged` = <PySide.QtCore.Signal object at 0x00000000084175A8>
  `selectionChanged`(selected, deselected)
  `selectedBlocks`()
  `setSelectedBlocks`(blocks)
  `clearSelection`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415CC8>

class `mcedit2.widgets.blockpicker.``BlockTypePicker`(multipleSelect=False)

  Bases: `PySide.QtGui.QDialog`

  `exec_`()
  `selectionDidChange`(selectedBlocks, deselectedBlocks)
  `editorSession`
  `blocktypes`
  `selectedBlocks`
  `setSearchString`(val)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415D08>

class `mcedit2.widgets.blockpicker.``BlockTypeButton`(*args, **kwargs)

  Bases: `PySide.QtGui.QPushButton`

  `blocksChanged` = <PySide.QtCore.Signal object at 0x00000000084175E0>
  `editorSession`
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008415D48>
  `updateView`()
  `block`
  `blocks`
  `showPicker`()

## mcedit2.widgets.blocktype_list module

blocktype_list

class `mcedit2.widgets.blocktype_list.``BlockListWidget`(blocktypes, textureAtlas, blocksToShow=None)

  Bases: `PySide.QtGui.QWidget`

  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000006102C48>

`mcedit2.widgets.blocktype_list.``BlockTypePixmap`(block, textureAtlas)

  Parameters:

  - block (mceditlib.blocktypes.BlockType) –
  - textureAtlas (mcedit2.rendering.textureatlas.TextureAtlas) –

  Returns: |
  Return type: | QtGui.QPixmap

## mcedit2.widgets.flowlayout module

/************************************************************************
  ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** “Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.” ** ** $QT_END_LICENSE$ ** ************************************************************************/

Translated to Python/PySide by David Vierra

class `mcedit2.widgets.flowlayout.``FlowLayout`(parent=None, margin=-1, hSpacing=-1, vSpacing=-1)

  Bases: `PySide.QtGui.QLayout`

  `addItem`(item)
  `horizontalSpacing`()
  `verticalSpacing`()
  `count`()
  `itemAt`(index)
  `expandingDirections`()
  `hasHeightForWidth`()
  `heightForWidth`(width)
  `setGeometry`(rect)
  `sizeHint`()
  `minimumSize`()
  `doLayout`(rect, testOnly)
  `smartSpacing`(pm)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008471F48>

## mcedit2.widgets.infopanel module

${NAME}

class `mcedit2.widgets.infopanel.``InfoPanel`(attrs, signals, **kwargs)

  Bases: `PySide.QtGui.QWidget`

  `updateLabels`()
  `object`
  static `setObject`()

    Descriptor to change the setter on a property.

  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x00000000083B6048>

## mcedit2.widgets.layout module

`mcedit2.widgets.layout.``Row`(*a, **kw)

  Return type: | QtGui.QHBoxLayout

`mcedit2.widgets.layout.``Column`(*a, **kw)

  Return type: | QtGui.QVBoxLayout

`mcedit2.widgets.layout.``setWidgetError`(widget, exc)

  Add a subwidget to `widget` that displays the error message for the exception `exc` :param widget: :param exc: :return:

## mcedit2.widgets.log_view module

class `mcedit2.widgets.log_view.``LogHandler`(model)

  Bases: `logging.Handler`

  `emit`(logrecord)

`mcedit2.widgets.log_view.``logError`(func)

class `mcedit2.widgets.log_view.``LogModel`(*args, **kwargs)

  Bases: `PySide.QtCore.QAbstractTableModel`

  `log_colors` = {40: (PySide.QtGui.QColor.fromRgbF(1.000000, 0.000000, 0.000000, 1.000000), PySide.QtGui.QColor.fromRgbF(1.000000, 1.000000, 1.000000, 1.000000)), 50: (PySide.QtGui.QColor.fromRgbF(1.000000, 0.000000, 0.000000, 1.000000), PySide.QtGui.QColor.fromRgbF(1.000000, 1.000000, 1.000000, 1.000000)), 20: (PySide.QtGui.QColor.fromRgbF(0.000000, 0.000000, 0.000000, 1.000000), PySide.QtGui.QColor.fromRgbF(1.000000, 1.000000, 1.000000, 1.000000)), 30: (PySide.QtGui.QColor.fromRgbF(0.000000, 0.000000, 0.000000, 1.000000), PySide.QtGui.QColor.fromRgbF(1.000000, 1.000000, 0.499992, 1.000000))}
  `add_logrecord`(record)

  `rowCount`(parent, index=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) at 0x000000000841F108>)

  `columnCount`(parent, index=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) at 0x000000000841F148>)

  `data`(index, role=PySide.QtCore.Qt.ItemDataRole.DisplayRole)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000841F188>

class `mcedit2.widgets.log_view.``LogViewProxyModel`(*args, **kwargs)

  Bases: `PySide.QtGui.QSortFilterProxyModel`

  `filterAcceptsRow`(row, parent)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000841F1C8>

`mcedit2.widgets.log_view.``LogViewFrame`(parent)

## mcedit2.widgets.objectinspector module

objectinspector

class `mcedit2.widgets.objectinspector.``ObjectInspector`(*args, **kwargs)

  Bases: `PySide.QtGui.QFrame`

  `close`(*args, **kwargs)
  `goHome`()
  `goEditor`()
  `goBack`()
  `textDidChange`(text)
  `goToObject`(text)
  `getObject`()
  `updateTree`()
  `rootObjectName` = u'editorapp.MCEditApp.app'
  `objectName` = u'editorapp.MCEditApp.app'
  `itemDoubleClicked`(item)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000841F208>

## mcedit2.widgets.propertylist module

propertylist

class `mcedit2.widgets.propertylist.``PropertyListItemDelegate`(*args, **kwargs)

  Bases: `PySide.QtGui.QStyledItemDelegate`

  `createEditor`(parent, option, index)
  `setEditorData`(editor, index)
  `setModelData`(editor, model, index)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008484A08>

class `mcedit2.widgets.propertylist.``PropertyListEntry`

  Bases: `mcedit2.widgets.propertylist.PropertyListEntry`

class `mcedit2.widgets.propertylist.``PropertyListModel`(rootTag)

  Bases: `PySide.QtCore.QAbstractItemModel`

  `propertyChanged` = <PySide.QtCore.Signal object at 0x000000000848C340>
  `addNBTProperty`(tagName, valueType=None, min=None, max=None, displayName=None)
  `columnCount`(index)
  `data`(index, role=PySide.QtCore.Qt.ItemDataRole.DisplayRole)
  `flags`(index)
  `headerData`(section, orientation, role=PySide.QtCore.Qt.ItemDataRole.DisplayRole)
  `index`(row, column, parent=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) at 0x000000000848AE88>)
  `parent`(index)
  `rowCount`(parent=<PySide.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0) ) at 0x000000000848AEC8>)
  `setData`(index, value, role=PySide.QtCore.Qt.ItemDataRole.EditRole)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000848AF08>

class `mcedit2.widgets.propertylist.``PropertyListWidget`(*args, **kwargs)

  Bases: `PySide.QtGui.QTreeView`

  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000848AF48>

## mcedit2.widgets.shapewidget module

${NAME}

class `mcedit2.widgets.shapewidget.``ShapeWidget`(*args, **kwargs)

  Bases: `PySide.QtGui.QWidget`

  `shapeChanged` = <PySide.QtCore.Signal object at 0x000000000846DE30>
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008471FC8>

class `mcedit2.widgets.shapewidget.``Round`

  Bases: `mcedit2.editortools.brush.Style`

  `ID` = 'Round'
  `icon` = 'shapes/round.png'
  static `shapeFunc`(blockCenters, shape)

class `mcedit2.widgets.shapewidget.``Square`

  Bases: `mcedit2.editortools.brush.Style`

  `ID` = 'Square'
  `icon` = 'shapes/square.png'
  static `shapeFunc`(blockCenters, shape)

class `mcedit2.widgets.shapewidget.``Diamond`

  Bases: `mcedit2.editortools.brush.Style`

  `ID` = 'Diamond'
  `icon` = 'shapes/diamond.png'
  static `shapeFunc`(blockCenters, shape)

class `mcedit2.widgets.shapewidget.``Shapes`

  Bases: `object`

  `allShapes` = (<mcedit2.widgets.shapewidget.Square object at 0x000000000846DEF0>, <mcedit2.widgets.shapewidget.Round object at 0x000000000846DF28>, <mcedit2.widgets.shapewidget.Diamond object at 0x000000000846DF60>)

## mcedit2.widgets.spinslider module

spinslider

class `mcedit2.widgets.spinslider.``SpinSlider`(*args, **kwargs)

  Bases: `PySide.QtGui.QWidget`

  `spinBoxChanged`(value)
  `sliderChanged`(value)
  `value`()
  `setValue`(value)
  `minimum`()
  `setMinimum`(value)
  `maximum`()
  `setMaximum`(value)
  `valueChanged` = <PySide.QtCore.Signal object at 0x000000000A16D110>
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A19A208>

## Module contents

__init__.py

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mcedit2 package »