class KTextEditor.SessionConfigInterface


abstract class

Table of contents
Modules
ktexteditor Classes
All Classes
Module ktexteditor
Namespace ktexteditor
Class KTextEditor.SessionConfigInterface
Inherits

Session config interface extension for the Document, View and Plugin.

Introduction

The SessionConfigInterface is an extension for Documents, Views and Plugins to add support for session-specific configuration settings. readSessionConfig() is called whenever session-specific settings are to be read from the given KConfig* and writeSessionConfig() whenever they are to be written, for example when a session changed or was closed.

A session does not have anything to do with an X-session under Unix. What is meant is rather a context, think of sessions in Kate or projects in KDevelop for example.

Adding Session Support

To add support for sessions a KTextEditor implementation has to derive the Document and View class from SessionConfigInterface and reimplement readSessionConfig() and writeSessionConfig().

The same applies to a Plugin, read the detailed description for plugins.

Accessing the SessionConfigInterface

The SessionConfigInterface is supposed to be an extension interface for a Document, a View or a Plugin, i.e. the Document/View/Plugin inherits the interface provided that it implements the interface. Use qobject_cast to access the interface:

// object is of type KTextEditor.Document* or View* or Plugin*
KTextEditor.SessionConfigInterface *iface =
qobject_cast( object );

if( iface ) { // interface is supported // do stuff }

See also KTextEditor.Document, KTextEditor.View, KTextEditor.Plugin Author Christoph Cullmann \



methods