settings Module

These options allow to show a different value than the value.

Most of this file is copied from kivy.uix.settings.SettingOptions.

class kniteditor.settings.SettingOptionMapping(**kwargs)[source]

Bases: kivy.uix.settings.SettingItem

Implementation of an option list on top of a SettingItem. It is visualized with a Label widget that, when clicked, will open a Popup with a list of options from which the user can select.

on_panel(instance, value)[source]

The panel is set. Bind to open a popup when it is clicked.

options

A mapping of key strings to value strings. The values are displayed to the user. The keys can be found in the value attribute.

options is a DictProperty and defaults to {}.

popup

(internal) Used to store the current popup when it is shown.

popup is an ObjectProperty and defaults to None.

class kniteditor.settings.Settings(*args, **kwargs)[source]

Bases: kivy.uix.settings.SettingsWithTabbedPanel

The settings for the editor.

See also

mod:kivy.uix.settings

__init__(*args, **kwargs)[source]

Create a new settings instance.

The SettingOptionMapping is added an can be used with the "optionmapping" type.