summaryrefslogtreecommitdiffstats
path: root/doc/classref/tdeparts/tdeparts-globals.html
blob: 55eb9729f2dc70ce13aaf1235f185f5a0d85782a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
        "http://www.w3.org/TR/html4/loose.dtd"">
<html>
<head>
  <title>tdeparts globals</title>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <meta name="GENERATOR" content="wabbit dumphtml">
</head>
<body>
<h4>PyKDE - Python Bindings for KDE</h4>
<hr>
<table width="100%"><tr>
            <td width ="70%">
                <h1>tdeparts Globals</h1><hr>
            </td>
            <td  width="30%" valign="top" align="right">
                <table>
                    <tr><td align="right"><a href="doc/index.html">Table of contents</a></td></tr>
                    <tr><td align="right"><a href="../index.html">Modules</a></td></tr>
                    <tr><td align="right"><a href="index.html">tdeparts Classes</a></td></tr>
                    <tr><td align="right"><a href="../allclasses.html">All Classes</a></td></tr>
                </table>
            </td>
        </tr></table>
        <h3>global methods</h3><ul>
<li><b>createReadOnlyPart</b> (a0, a1 = 0, a2 = TQString .null, a3 = "KParts.ReadOnlyPart", a4 = TQStringList ())
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KParts.ReadOnlyPart)</i></td></tr>
</table><table><tr  bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>a0</td><td>TQString</td><td></td></tr>
<tr><td>a1</td><td>TQObject</td><td>0</td></tr>
<tr><td>a2</td><td>TQString</td><td>TQString .null</td></tr>
<tr><td>a3</td><td>char</td><td>"KParts.ReadOnlyPart"</td></tr>
<tr><td>a4</td><td>TQStringList</td><td>TQStringList ()</td></tr>
</table>
</td><td width="50%"><table><tr><td><para>
This is a PyKDE-only function that handles the machinery necessary
to create a KParts::ReadOnlyPart. It executes the following C++ code:
</para>
<pre class="PROGRAMLISTING">
KParts::ReadOnlyPart *createReadOnlyPart (const TQString&amp; lib, TQObject *parent,
                                          const TQString&amp; name, const char *className,
                                          const TQStringList &amp;args)
{
   KLibFactory *factory = KLibLoader::self ()-&gt;factory ((const char *)lib);
   if (factory)
           return static_cast&lt;KParts::ReadOnlyPart*&gt; (factory-&gt;create (parent,
                                              (const char *)name, className, args));
       else
               return NULL;
</pre>
<para>
Notice that it takes care of creating the KLibFactory for you, and
returns the part cast to type KParts::ReadOnlyPart.  The actual
part has a different class (derived from KParts::ReadOnlyPart),
and calls to openURL or openFile will use the part's overloaded
methods. Currently it isn't possible to call KParts::ReadOnlyPart::openURL
if it has been overloaded.
</para>
<para>
Usage: KParts.createReadOnlyPart (lib, parent, name, className, args)
</para>
</td></tr></table></td></tr></table></li><hr>
<li><b>createReadWritePart</b> (a0, a1 = 0, a2 = TQString .null, a3 = "KParts.ReadWritePart", a4 = TQStringList ())
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(KParts.ReadWritePart)</i></td></tr>
</table><table><tr  bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>a0</td><td>TQString</td><td></td></tr>
<tr><td>a1</td><td>TQObject</td><td>0</td></tr>
<tr><td>a2</td><td>TQString</td><td>TQString .null</td></tr>
<tr><td>a3</td><td>char</td><td>"KParts.ReadWritePart"</td></tr>
<tr><td>a4</td><td>TQStringList</td><td>TQStringList ()</td></tr>
</table>
</td><td width="50%"><table><tr><td><para>
This is a PyKDE-only function that handles the machinery necessary
to create a KParts::ReadWritePart. It executes the following C++ code:
</para>
<pre class="PROGRAMLISTING">
KParts::ReadWritePart *createReadWritePart (const TQString&amp; lib, TQObject *parent,
                                          const TQString&amp; name, const char *className,
                                          const TQStringList &amp;args)
{
    KLibFactory *factory = KLibLoader::self ()-&gt;factory ((const char *)lib);
    if (factory)
            return static_cast&lt;KParts::ReadWritePart*&gt; (factory-&gt;create (parent,
                                               (const char *)name, className, args));
        else
                return NULL;
</pre>
<para>
Notice that it takes care of creating the KLibFactory for you, and
returns the part cast to type KParts::ReadWritePart.  The actual
part has a different class (derived from KParts::ReadWritePart),
and calls to openURL or openFile will use the part's overloaded
methods. Currently it isn't possible to call KParts::ReadWritePart::openURL
if it has been overloaded.
</para>
<para>
Usage: KParts.createReadWritePart (lib, parent, name, className, args)
</para>
</td></tr></table></td></tr></table></li><hr>
<li><b>testTQMapTQCStringInt</b> (dict)
<table width = "100%"><tr><td width="50%" valign="top"><table><tr><td>returns <i>(TQMap<TQCString,int>),</i></td></tr>
</table><table><tr  bgcolor="#fff0ff"><th>Argument</th><th>Type</th><th>Default</th></tr>
<tr><td>dict</td><td>TQMap<TQCString,int></td><td></td></tr>
</table>
</td><td width="50%"><table><tr><td></td></tr></table></td></tr></table></li><hr>
</ul>

</body>
</html>