class KTextEditor.ConfigInterfaceabstract class |
|
|
Config interface extension for the View. Introduction The ConfigInterface provides methods to access and modify the low level config information for a given View. Examples of this config data can be displaying the icon bar, showing line numbers, etc. This generally allows access to settings that otherwise are only accessible during runtime. Accessing the Interface The ConfigInterface is supposed to be an extension interface for a View, i.e. the View inherits the interface provided that the KTextEditor library in use implements the interface. Use qobject_cast to access the interface: // view is of type KTextEditor.View* KTextEditor.ConfigInterface *iface = qobject_cast Accessing Data A list of available config variables (or keys) can be optained by calling configKeys(). For all available keys configValue() returns the corresponding value as QVariant. A value for a given key can be set by calling setConfigValue(). Right now KatePart has support for the following tuples: - line-numbers [bool], show/hide line numbers - icon-bar [bool], show/hide icon bar - dynamic-word-wrap [bool], enable/disable dynamic word wrap As a small example, if you want to enable dynamic word wrap simply call iface->setConfigValue("dynamic-word-wrap", true);
See also KTextEditor.View
Author Matt Broadstone \ |
|
Virtual destructor. |
|
Get a list of all available keys. |
|
Get a value for the key. |
|
Set a the key's value to value. |