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.TemplateScriptRegistrar</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>TemplateScriptRegistrar 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><dl class="since" compact><dt><b>Since:</b></dt><dd> 4.5
57
This is an interface for inserting template strings with user editable
58
fields into a document and support for scripts. Fold back into base Interface in KDE 5
61
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Methods</h2></td></tr>
62
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#TemplateScriptRegistrar">__init__</a> (self)</td></tr>
63
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../ktexteditor/KTextEditor.TemplateScript.html">KTextEditor.TemplateScript</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#registerTemplateScript">registerTemplateScript</a> (self, QObject owner, QString script)</td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#unregisterTemplateScript">unregisterTemplateScript</a> (self, <a href="../ktexteditor/KTextEditor.TemplateScript.html">KTextEditor.TemplateScript</a> templateScript)</td></tr>
66
<hr><h2>Method Documentation</h2><a class="anchor" name="TemplateScriptRegistrar"></a>
68
<div class="memproto">
69
<table class="memname"><tr>
70
<td class="memname">__init__</td>
72
<td class="paramtype"> </td>
73
<td class="paramname"><em>self</em> )</td>
74
<td width="100%"> </td>
78
<div class="memdoc"></div></div><a class="anchor" name="registerTemplateScript"></a>
80
<div class="memproto">
81
<table class="memname"><tr>
82
<td class="memname"><a href="../ktexteditor/KTextEditor.TemplateScript.html">KTextEditor.TemplateScript</a> registerTemplateScript</td>
84
<td class="paramtype"> <em>self</em>, </td>
85
<td class="paramname"></td>
87
<td class="memname"></td>
89
<td class="paramtype">QObject </td>
90
<td class="paramname"><em>owner</em>, </td>
93
<td class="memname"></td>
95
<td class="paramtype">QString </td>
96
<td class="paramname"><em>script</em></td>
103
<td width="100%"> </td>
106
<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>This registeres the script, which is contained in </p><dl compact><dt><b>Parameters:</b></dt><dd>
107
<table border="0" cellspacing="2" cellpadding="0">
108
<tr><td></td><td valign="top"><em>script.</em> </td><td>
109
</td></tr> </table></dl>
110
<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the template script pointer, returns an empty QString on error
111
The implementation has to register the script for all views and all documents,
113
If owner is destructed, all scripts owned by it are automatically freed.
114
Scripts have to be self contained.
115
Depending on the underlying editor, there might be some global functions,
116
perhaps there will be a specifiction for a common functionset later on, but not
119
</p></div></div><a class="anchor" name="unregisterTemplateScript"></a>
120
<div class="memitem">
121
<div class="memproto">
122
<table class="memname"><tr>
123
<td class="memname"> unregisterTemplateScript</td>
125
<td class="paramtype"> <em>self</em>, </td>
126
<td class="paramname"></td>
128
<td class="memname"></td>
130
<td class="paramtype"><a href="../ktexteditor/KTextEditor.TemplateScript.html">KTextEditor.TemplateScript</a> </td>
131
<td class="paramname"><em>templateScript</em></td>
138
<td width="100%"> </td>
141
<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>This frees the template script which is identified by the token
149
<div class="menu_box">
150
<div class="nav_list">
152
<li><a href="../allclasses.html">Full Index</a></li>
156
<a name="cp-menu" /><div class="menutitle"><div>
157
<h2 id="cp-menu-project">Modules</h2>
159
<div class="nav_list">
160
<ul><li><a href="../akonadi/index.html">akonadi</a></li>
161
<li><a href="../dnssd/index.html">dnssd</a></li>
162
<li><a href="../kdecore/index.html">kdecore</a></li>
163
<li><a href="../kdeui/index.html">kdeui</a></li>
164
<li><a href="../khtml/index.html">khtml</a></li>
165
<li><a href="../kio/index.html">kio</a></li>
166
<li><a href="../knewstuff/index.html">knewstuff</a></li>
167
<li><a href="../kparts/index.html">kparts</a></li>
168
<li><a href="../kutils/index.html">kutils</a></li>
169
<li><a href="../nepomuk/index.html">nepomuk</a></li>
170
<li><a href="../phonon/index.html">phonon</a></li>
171
<li><a href="../plasma/index.html">plasma</a></li>
172
<li><a href="../polkitqt/index.html">polkitqt</a></li>
173
<li><a href="../solid/index.html">solid</a></li>
174
<li><a href="../soprano/index.html">soprano</a></li>
180
<div class="clearer"/>
183
<div id="end_body"></div>
185
<div id="footer"><div id="footer_text">
186
This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br />
187
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> |
188
<a href="http://www.kde.org/contact/impressum.php">Legal</a>