~neon/pykde4/master

« back to all changes in this revision

Viewing changes to docs/html/ktexteditor/KTextEditor.AnnotationInterface.html

  • Committer: Simon Edwards
  • Date: 2013-05-17 19:15:12 UTC
  • Revision ID: git-v1:a46160bff9c0346159e2d50fd33680a25403b964
Updated the ktexteditor bindings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
4
 
 
5
<head>
 
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" />
 
11
</head>
 
12
<body>
 
13
<div id="container">
 
14
<div id="header">
 
15
  <div id="header_top">
 
16
    <div>
 
17
      <div>
 
18
        <img alt ="" src="../common/top-kde.jpg"/>
 
19
        KDE 4.9 PyKDE API Reference
 
20
      </div>
 
21
    </div>
 
22
  </div>
 
23
  <div id="header_bottom">
 
24
    <div id="location">
 
25
      <ul>
 
26
        <li>KDE's Python API</li>
 
27
      </ul>
 
28
    </div>
 
29
 
 
30
    <div id="menu">
 
31
      <ul>
 
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>
 
36
</ul>
 
37
    </div>
 
38
  </div>
 
39
</div>
 
40
 
 
41
<div id="body_wrapper">
 
42
<div id="body">
 
43
<div id="right">
 
44
<div class="content">
 
45
<div id="main">
 
46
<div class="clearer">&nbsp;</div>
 
47
 
 
48
<h1>AnnotationInterface Class Reference</h1>
 
49
<code>from PyKDE4.ktexteditor import *</code>
 
50
<p>
 
51
 
 
52
 
 
53
Namespace: <a href="../ktexteditor/KTextEditor.html">KTextEditor</a><br />
 
54
<h2>Detailed Description</h2>
 
55
 
 
56
<p>A Document extension interface for handling Annotation%s
 
57
</p>
 
58
<p>
 
59
<b>Introduction </b>
 
60
</p>
 
61
<p>
 
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
 
65
in the document.
 
66
</p>
 
67
<p>
 
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
 
74
each view.
 
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.
 
78
</p>
 
79
<p>
 
80
If you set a model to the Document and the View, the View's model has
 
81
higher priority.
 
82
</p>
 
83
<p>
 
84
<b>Accessing the AnnotationInterface </b>
 
85
</p>
 
86
<p>
 
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
 
90
access the interface:
 
91
<pre class="fragment">
 
92
 // document is of type KTextEditor.Document*
 
93
 KTextEditor.AnnotationInterface *iface =
 
94
     qobject_cast&lt;KTextEditor.AnnotationInterface*&gt;( document );
 
95
 
 
96
 if( iface ) {
 
97
     // the implementation supports the interface
 
98
     // do stuff
 
99
 }
 
100
</pre>
 
101
</p>
 
102
<p>
 
103
<b>Using the AnnotationInterface </b>
 
104
</p>
 
105
<p>
 
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
 
108
</dd></dl>
 
109
</p>
 
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>&nbsp;</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">&nbsp;</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>
 
113
</table>
 
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>
 
119
<td>(</td>
 
120
<td class="paramtype">&nbsp;</td>
 
121
<td class="paramname"><em>self</em>&nbsp;)</td>
 
122
<td width="100%"> </td>
 
123
</tr>
 
124
</table>
 
125
</div>
 
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
 
127
set
 
128
<dl class="return" compact><dt><b>Returns:</b></dt><dd> the current AnnotationModel
 
129
</dd></dl>
 
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>
 
135
<td>(</td>
 
136
<td class="paramtype">&nbsp;<em>self</em>, </td>
 
137
<td class="paramname"></td>
 
138
</tr><tr>
 
139
<td class="memname"></td>
 
140
<td></td>
 
141
<td class="paramtype"><a href="../ktexteditor/KTextEditor.AnnotationModel.html">KTextEditor.AnnotationModel</a>&nbsp;</td>
 
142
<td class="paramname"><em>model</em></td>
 
143
</tr>
 
144
<tr>
 
145
<td></td>
 
146
<td>)</td>
 
147
<td></td>
 
148
<td></td>
 
149
<td width="100%"> </td>
 
150
</tr></table>
 
151
</div>
 
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.
 
154
</p>
 
155
<p>
 
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>&nbsp;</td><td> the new AnnotationModel
 
159
</td></tr>
 
160
</table></dl>
 
161
<p>
 
162
</p></div></div>
 
163
</div>
 
164
</div>
 
165
</div>
 
166
 
 
167
<div id="left">
 
168
 
 
169
<div class="menu_box">
 
170
<div class="nav_list">
 
171
<ul>
 
172
<li><a href="../allclasses.html">Full Index</a></li>
 
173
</ul>
 
174
</div>
 
175
 
 
176
<a name="cp-menu" /><div class="menutitle"><div>
 
177
  <h2 id="cp-menu-project">Modules</h2>
 
178
</div></div>
 
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>
 
195
</ul></div></div>
 
196
 
 
197
</div>
 
198
 
 
199
</div>
 
200
  <div class="clearer"/>
 
201
</div>
 
202
 
 
203
<div id="end_body"></div>
 
204
</div>
 
205
<div id="footer"><div id="footer_text">
 
206
This documentation is maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;simon&#64;simonzone&#46;com">Simon Edwards</a>.<br />
 
207
        KDE<sup>&#174;</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>&#174;</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>
 
209
    </div></div>
 
210
</body>
 
211
</html>