File name of an icon. If set, the icon is shown on the tool bar and the name becomes the tool tip.
Name of the tool as shown on the tool bar.
The target layer type for which this tool should be enabled. A convenient alternative to overriding updateEnabledState.
The value can be any combination of the layer types Layer.TileLayerType, Layer.ObjectGroupType, Layer.ImageLayerType and Layer.GroupLayerType.
List of action IDs, specifying the actions that should be added to the tool-specific tool bar.
Separators can be added to this tool bar by adding "-" in the list of actions.
The actions need to be registered using tiled.registerAction().
Whether this tool uses the currently selected tiles. This defaults to
false
.
When set to false
and the currently selected tiles change while this
tool is active, the Stamp Brush is automatically activated. Set this
property to true
to keep this tool active.
Whether this tool works with Wang sets. This defaults to false
.
When set to false
and a Wang color is clicked while this tool is active,
the Terrain Brush is automatically activated. Set this property to true
to keep this tool active.
Called when the tool was activated.
Called when the tool was deactivated.
Called when a key was pressed while the tool was active.
The keys are defined by numbers from the
Qt::Key enum. They can
be accessed like Qt.Key_Return
.
Called when the language was changed.
Called when the active map was changed.
Called when the active modifier keys changed.
Called when a mouse button was double-clicked.
Called when the mouse entered the map view.
Called when the mouse left the map view.
Called when the mouse position in the map scene changed.
Called when a mouse button was pressed.
Called when a mouse button was released.
Called when the hovered tile position changed.
Called when the map or the current layer changed.
Defining this function is necessary to suppress the default updating of the status bar text.
This function is called automatically when the hovered tile position changed, but statusInfo can be changed in any other function as well.
Generated using TypeDoc
This interface can be implemented to define a custom tool. See tiled.registerTool for an example.
The mouse button parameters are numbers from the Qt::MouseButton enum. They can be accessed like
Qt.LeftButton
.Whenever there is a keyboard modifiers parameter, they are given as flags from the Qt::KeyboarModifiers enum, available similarly like
Qt.ShiftModifier
.