1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
6
<title>KTextEditor.AnnotationInterface</title>
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
<meta http-equiv="Content-Style-Type" content="text/css" />
9
<link rel="stylesheet" type="text/css" href="../common/doxygen.css" />
10
<link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" />
18
<img alt ="" src="../common/top-kde.jpg"/>
19
KDE 4.9 PyKDE API Reference
23
<div id="header_bottom">
26
<li>KDE's Python API</li>
32
<li><a href="../modules.html">Overview</a></li>
33
<li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li>
34
<li><a href="http://kde.org/family/">Sitemap</a></li>
35
<li><a href="http://kde.org/contact/">Contact Us</a></li>
41
<div id="body_wrapper">
46
<div class="clearer"> </div>
48
<h1>AnnotationInterface Class Reference</h1>
49
<code>from PyKDE4.ktexteditor import *</code>
53
Namespace: <a href="../ktexteditor/KTextEditor.html">KTextEditor</a><br />
54
<h2>Detailed Description</h2>
56
<p>A Document extension interface for handling Annotation%s
62
The AnnotationInterface is designed to provide line annotation information
63
for a document. This interface provides means to associate a document with a
64
annotation model, which provides some annotation information for each line
68
Setting a model for a Document makes the model data available for all views.
69
If you only want to provide annotations in exactly one view, you can use
70
the AnnotationViewInterface directly. See the AnnotationViewInterface for
71
further details. To summarize, the two use cases are
72
- (1) show annotations in all views. This means you set an AnnotationModel
73
with this interface, and then call setAnnotationBorderVisible() for
75
- (2) show annotations only in one view. This means to not use this
76
interface. Instead, use the AnnotationViewInterface, which inherits
77
this interface. This means you set a model for the specific View.
80
If you set a model to the Document and the View, the View's model has
84
<b>Accessing the AnnotationInterface </b>
87
The AnnotationInterface is an extension interface for a Document, i.e. the
88
Document inherits the interface provided that the
89
used KTextEditor library implements the interface. Use qobject_cast to
91
<pre class="fragment">
92
// document is of type KTextEditor.Document*
93
KTextEditor.AnnotationInterface *iface =
94
qobject_cast<KTextEditor.AnnotationInterface*>( document );
97
// the implementation supports the interface
103
<b>Using the AnnotationInterface </b>
106
<dl class="since" compact><dt><b>Since:</b></dt><dd> 4.1
107
</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd> KTextEditor.AnnotationModel, KTextEditor.AnnotationViewInterface
110
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Methods</h2></td></tr>
111
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../ktexteditor/KTextEditor.AnnotationModel.html">KTextEditor.AnnotationModel</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#annotationModel">annotationModel</a> (self)</td></tr>
112
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setAnnotationModel">setAnnotationModel</a> (self, <a href="../ktexteditor/KTextEditor.AnnotationModel.html">KTextEditor.AnnotationModel</a> model)</td></tr>
114
<hr><h2>Method Documentation</h2><a class="anchor" name="annotationModel"></a>
115
<div class="memitem">
116
<div class="memproto">
117
<table class="memname"><tr>
118
<td class="memname"><a href="../ktexteditor/KTextEditor.AnnotationModel.html">KTextEditor.AnnotationModel</a> annotationModel</td>
120
<td class="paramtype"> </td>
121
<td class="paramname"><em>self</em> )</td>
122
<td width="100%"> </td>
126
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>returns the currently set AnnotationModel or 0 if there's none
128
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the current AnnotationModel
130
</p></div></div><a class="anchor" name="setAnnotationModel"></a>
131
<div class="memitem">
132
<div class="memproto">
133
<table class="memname"><tr>
134
<td class="memname"> setAnnotationModel</td>
136
<td class="paramtype"> <em>self</em>, </td>
137
<td class="paramname"></td>
139
<td class="memname"></td>
141
<td class="paramtype"><a href="../ktexteditor/KTextEditor.AnnotationModel.html">KTextEditor.AnnotationModel</a> </td>
142
<td class="paramname"><em>model</em></td>
149
<td width="100%"> </td>
152
<div class="memdoc"><dl compact><dt><b>Abstract method:</b></dt><dd>This method is abstract and can be overridden but not called directly.</dd></dl><p>Sets a new AnnotationModel for this document to provide
153
annotation information for each line.
156
</p><dl compact><dt><b>Parameters:</b></dt><dd>
157
<table border="0" cellspacing="2" cellpadding="0">
158
<tr><td></td><td valign="top"><em>model</em> </td><td> the new AnnotationModel
169
<div class="menu_box">
170
<div class="nav_list">
172
<li><a href="../allclasses.html">Full Index</a></li>
176
<a name="cp-menu" /><div class="menutitle"><div>
177
<h2 id="cp-menu-project">Modules</h2>
179
<div class="nav_list">
180
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
181
<li><a href="../dnssd/index.html">dnssd</a></li>
182
<li><a href="../kdecore/index.html">kdecore</a></li>
183
<li><a href="../kdeui/index.html">kdeui</a></li>
184
<li><a href="../khtml/index.html">khtml</a></li>
185
<li><a href="../kio/index.html">kio</a></li>
186
<li><a href="../knewstuff/index.html">knewstuff</a></li>
187
<li><a href="../kparts/index.html">kparts</a></li>
188
<li><a href="../kutils/index.html">kutils</a></li>
189
<li><a href="../nepomuk/index.html">nepomuk</a></li>
190
<li><a href="../phonon/index.html">phonon</a></li>
191
<li><a href="../plasma/index.html">plasma</a></li>
192
<li><a href="../polkitqt/index.html">polkitqt</a></li>
193
<li><a href="../solid/index.html">solid</a></li>
194
<li><a href="../soprano/index.html">soprano</a></li>
200
<div class="clearer"/>
203
<div id="end_body"></div>
205
<div id="footer"><div id="footer_text">
206
This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br />
207
KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
208
<a href="http://www.kde.org/contact/impressum.php">Legal</a>