By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1790
Collapse All | Expand All

(-)b/app_templates/kcontrol_module/src/kcontrol_module.py (-1 / +1 lines)
Lines 20-26 Link Here
20
from tdecore import *
20
from tdecore import *
21
from tdeui import *
21
from tdeui import *
22
22
23
import kdedesigner
23
import tdedesigner
24
from KcontrolModuleWidgetUI import *
24
from KcontrolModuleWidgetUI import *
25
25
26
description = "A Kcontrol module"
26
description = "A Kcontrol module"
(-)b/app_templates/kdeutility/src/kdeutility.py (-1 / +1 lines)
Lines 19-25 Link Here
19
from qt import *
19
from qt import *
20
from tdecore import *
20
from tdecore import *
21
from tdeui import *
21
from tdeui import *
22
import kdedesigner
22
import tdedesigner
23
from KDEUtilityDialogUI import *
23
from KDEUtilityDialogUI import *
24
24
25
description = "A KDE Utility"
25
description = "A KDE Utility"
(-)b/doc/en/index.docbook (-42 / +42 lines)
Lines 1-12 Link Here
1
<?xml version="1.0" ?>
1
<?xml version="1.0" ?>
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
2
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3
  <!ENTITY appname "<application>PyKDE Extensions</application>">
3
  <!ENTITY appname "<application>PyTDE Extensions</application>">
4
  <!ENTITY kappname "&appname;"><!-- Do *not* replace kappname-->
4
  <!ENTITY kappname "&appname;"><!-- Do *not* replace kappname-->
5
  <!ENTITY package "kde-module"><!-- tdebase, tdeadmin, etc -->
5
  <!ENTITY package "kde-module"><!-- tdebase, tdeadmin, etc -->
6
  <!ENTITY % addindex "IGNORE">
6
  <!ENTITY % addindex "IGNORE">
7
  <!ENTITY % English "INCLUDE"><!-- change language only here -->
7
  <!ENTITY % English "INCLUDE"><!-- change language only here -->
8
  
8
9
  
9
10
  <!-- Do not define any other entities; instead, use the entities
10
  <!-- Do not define any other entities; instead, use the entities
11
       from kde-genent.entities and $LANG/user.entities. -->
11
       from kde-genent.entities and $LANG/user.entities. -->
12
]>
12
]>
Lines 61-74 Link Here
61
</abstract>
61
</abstract>
62
62
63
<!-- This is a set of Keywords for indexing by search engines.
63
<!-- This is a set of Keywords for indexing by search engines.
64
Please at least include KDE, the KDE package it is in, the name
64
Please at least include TDE, the TDE package it is in, the name
65
 of your application, and a few relevant keywords. -->
65
 of your application, and a few relevant keywords. -->
66
66
67
<keywordset>
67
<keywordset>
68
<keyword>KDE</keyword>
68
<keyword>TDE</keyword>
69
<keyword>PyKDE Extensions</keyword>
69
<keyword>PyTDE Extensions</keyword>
70
<keyword>python</keyword>
70
<keyword>python</keyword>
71
<keyword>PyKDE</keyword>
71
<keyword>PyTDE</keyword>
72
</keywordset>
72
</keywordset>
73
73
74
</bookinfo>
74
</bookinfo>
Lines 88-98 Link Here
88
<title>Installation &amp; Distutils support</title>
88
<title>Installation &amp; Distutils support</title>
89
89
90
<para>
90
<para>
91
C++ projects on KDE traditionally use 
91
C++ projects on TDE traditionally use
92
<ulink url="http://www.gnu.org/software/autoconf/">autoconf</ulink>,
92
<ulink url="http://www.gnu.org/software/autoconf/">autoconf</ulink>,
93
<ulink url="http://www.gnu.org/software/automake/">automake</ulink>
93
<ulink url="http://www.gnu.org/software/automake/">automake</ulink>
94
and <ulink url="http://www.gnu.org/software/libtool/">libtool</ulink>
94
and <ulink url="http://www.gnu.org/software/libtool/">libtool</ulink>
95
to handle the building and installation. These tools 
95
to handle the building and installation. These tools
96
and difficult to use, even for experianced developers.
96
and difficult to use, even for experianced developers.
97
</para>
97
</para>
98
98
Lines 100-111 Link Here
100
Fortunately Python has a its own system for building and installing
100
Fortunately Python has a its own system for building and installing
101
modules and software. <ulink url="http://docs.python.org/lib/module-distutils.html">Distutils</ulink>
101
modules and software. <ulink url="http://docs.python.org/lib/module-distutils.html">Distutils</ulink>
102
is a standard Python package and comes with every Python installation.
102
is a standard Python package and comes with every Python installation.
103
&appname; builds on Distutils with extensions tailored for handling KDE
103
&appname; builds on Distutils with extensions tailored for handling TDE
104
programs.
104
programs.
105
</para>
105
</para>
106
106
107
<para>
107
<para>
108
A typical KDE program comes not only with the program itself but also
108
A typical TDE program comes not only with the program itself but also
109
extra files such as a manual written in <ulink url="http://i18n.kde.org/doc/markup/">Docbook
109
extra files such as a manual written in <ulink url="http://i18n.kde.org/doc/markup/">Docbook
110
format</ulink>, <ulink url="http://i18n.kde.org/translation-howto/">translation files</ulink>,
110
format</ulink>, <ulink url="http://i18n.kde.org/translation-howto/">translation files</ulink>,
111
icons, images and other auxiliary data files. &appname; provides support for
111
icons, images and other auxiliary data files. &appname; provides support for
Lines 113-134 Link Here
113
</para>
113
</para>
114
114
115
<sect1 id="distutils-using">
115
<sect1 id="distutils-using">
116
<title>Using Distutils with KDE programs</title>
116
<title>Using Distutils with TDE programs</title>
117
<para>
117
<para>
118
It is advised that you first read the standard
118
It is advised that you first read the standard
119
<ulink url="http://docs.python.org/lib/module-distutils.html">Distutils documentation</ulink>
119
<ulink url="http://docs.python.org/lib/module-distutils.html">Distutils documentation</ulink>
120
to learn about how it works. &appname; adds some KDE specific extensions which are documented
120
to learn about how it works. &appname; adds some TDE specific extensions which are documented
121
below.
121
below.
122
</para>
122
</para>
123
123
124
<para>
124
<para>
125
Distutils is based around writing a <filename>setup.py</filename> file which
125
Distutils is based around writing a <filename>setup.py</filename> file which
126
then uses the distutils package
126
then uses the distutils package
127
To use the KDE extensions, the first thing you need to do in your <filename>setup.py
127
To use the TDE extensions, the first thing you need to do in your <filename>setup.py
128
</filename> file is include the <symbol>tdedistutils</symbol> package.
128
</filename> file is include the <symbol>tdedistutils</symbol> package.
129
<programlisting>
129
<programlisting>
130
#!/usr/bin/env python
130
#!/usr/bin/env python
131
# Setup.py file for MyKDEApplication
131
# Setup.py file for MyTDEApplication
132
132
133
import tdedistutils
133
import tdedistutils
134
</programlisting>
134
</programlisting>
Lines 149-155 Link Here
149
</programlisting>
149
</programlisting>
150
150
151
<symbol>min_kde_version</symbol> and <symbol>min_qt_version</symbol> specify
151
<symbol>min_kde_version</symbol> and <symbol>min_qt_version</symbol> specify
152
the minimum versions of the Qt library and KDE needed to install and run
152
the minimum versions of the Qt library and TDE needed to install and run
153
the software. These requirements are checked during install.
153
the software. These requirements are checked during install.
154
</para>
154
</para>
155
155
Lines 163-169 Link Here
163
<sect1 id="distutils-files">
163
<sect1 id="distutils-files">
164
<title>Application data files</title>
164
<title>Application data files</title>
165
<para>
165
<para>
166
Each KDE application as a data directory of it's own for storing any extra
166
Each TDE application as a data directory of it's own for storing any extra
167
data files it may need to run.
167
data files it may need to run.
168
</para>
168
</para>
169
169
Lines 191-197 Link Here
191
191
192
<para>
192
<para>
193
Even with all of the python files in the Application data directory, it is
193
Even with all of the python files in the Application data directory, it is
194
still desirable to have your application's "executables" available in KDE's
194
still desirable to have your application's "executables" available in TDE's
195
<filename>bin</filename> directory. &appname; provides an easy way for creating
195
<filename>bin</filename> directory. &appname; provides an easy way for creating
196
symbolic links from the "bin" directory to scripts in the application
196
symbolic links from the "bin" directory to scripts in the application
197
directory.
197
directory.
Lines 208-214 Link Here
208
<sect1 id="distutils-uninstall">
208
<sect1 id="distutils-uninstall">
209
<title>Uninstall command</title>
209
<title>Uninstall command</title>
210
<para>
210
<para>
211
Standard Distutils does not feature an uninstall command. &appname; does 
211
Standard Distutils does not feature an uninstall command. &appname; does
212
and it can be easily invoked with:
212
and it can be easily invoked with:
213
<screen>
213
<screen>
214
python setup.py uninstall
214
python setup.py uninstall
Lines 229-235 Link Here
229
More information about using Docbook to write manuals and documentation using
229
More information about using Docbook to write manuals and documentation using
230
Docbook is <ulink url="http://i18n.kde.org/doc/markup/">here</ulink>.
230
Docbook is <ulink url="http://i18n.kde.org/doc/markup/">here</ulink>.
231
Manuals are written in the Docbook format, but need to be converted
231
Manuals are written in the Docbook format, but need to be converted
232
into HTML when installed and made available for the KDE Help Center.
232
into HTML when installed and made available for the TDE Help Center.
233
</para>
233
</para>
234
234
235
<para>
235
<para>
Lines 270-291 Link Here
270
application. This can be manually done using the <command>pyuic</command>
270
application. This can be manually done using the <command>pyuic</command>
271
command from the shell. But it is a lot more convenient to let &appname;
271
command from the shell. But it is a lot more convenient to let &appname;
272
to this automatically for you. All you need to do is import the
272
to this automatically for you. All you need to do is import the
273
<symbol>qtdesigner</symbol> or <symbol>kdedesigner</symbol> module, depending
273
<symbol>qtdesigner</symbol> or <symbol>tdedesigner</symbol> module, depending
274
on whether your application is pure Qt or uses KDE, and then you can import
274
on whether your application is pure Qt or uses TDE, and then you can import
275
your user interface files as though they were normal Python files.
275
your user interface files as though they were normal Python files.
276
276
277
<programlisting>
277
<programlisting>
278
#!/usr/bin/env python
278
#!/usr/bin/env python
279
from tdeui import *
279
from tdeui import *
280
280
281
import kdedesigner     # This module lets us import .ui file directly.
281
import tdedesigner     # This module lets us import .ui file directly.
282
from MyWindow import * # Loads MyWindow.ui
282
from MyWindow import * # Loads MyWindow.ui
283
283
284
# Subclass the Qt-designer form.
284
# Subclass the Qt-designer form.
285
class MyWindowCode(MyWindow):
285
class MyWindowCode(MyWindow):
286
    # Implement extra functionality and methods.
286
    # Implement extra functionality and methods.
287
</programlisting>
287
</programlisting>
288
The <symbol>kdedesigner</symbol>/<symbol>qtdesigner</symbol> module converts
288
The <symbol>tdedesigner</symbol>/<symbol>qtdesigner</symbol> module converts
289
<literal role="extension">.ui</literal> on demand to
289
<literal role="extension">.ui</literal> on demand to
290
<literal role="extension">.py</literal> files.
290
<literal role="extension">.py</literal> files.
291
</para>
291
</para>
Lines 298-305 Link Here
298
<para>
298
<para>
299
i18n (an abbreviation of internationalization) is the process of translating
299
i18n (an abbreviation of internationalization) is the process of translating
300
the user interface and documentation of a piece of software into another
300
the user interface and documentation of a piece of software into another
301
language. <ulink url="i18n.kde.org">i18n.kde.org</ulink> is the central 
301
language. <ulink url="i18n.kde.org">i18n.kde.org</ulink> is the central
302
information point for the effort to translate KDE software into other
302
information point for the effort to translate TDE software into other
303
languages.
303
languages.
304
</para>
304
</para>
305
305
Lines 339-345 Link Here
339
that should contain the <literal role="extension">.pot</literal> and
339
that should contain the <literal role="extension">.pot</literal> and
340
<literal role="extension">.po</literal> files. The argument for
340
<literal role="extension">.po</literal> files. The argument for
341
<symbol>i18n</symbol> is a tuple. The first item is the relative path
341
<symbol>i18n</symbol> is a tuple. The first item is the relative path
342
to the directory where the translation files should be stored. The 
342
to the directory where the translation files should be stored. The
343
second item is a list of directories that should be scanned for Python source
343
second item is a list of directories that should be scanned for Python source
344
files containing translatable strings.
344
files containing translatable strings.
345
<programlisting>
345
<programlisting>
Lines 370-401 Link Here
370
<chapter id="kcontrol-modules">
370
<chapter id="kcontrol-modules">
371
<title>TDE Control Center Modules</title>
371
<title>TDE Control Center Modules</title>
372
<para>
372
<para>
373
&appname; can also help create modules for the TDE Control Center. 
373
&appname; can also help create modules for the TDE Control Center.
374
C++ glue code is needed when writing in module in Python. Fortunately
374
C++ glue code is needed when writing in module in Python. Fortunately
375
&appname; can generate this glue for you automatically.
375
&appname; can generate this glue for you automatically.
376
</para>
376
</para>
377
<para>
377
<para>
378
The best way to start learning about creating modules is to read the 
378
The best way to start learning about creating modules is to read the
379
<ulink url="http://developer.kde.org/documentation/other/kcm_howto.html">TDEConfig
379
<ulink url="http://developer.kde.org/documentation/other/kcm_howto.html">TDEConfig
380
Module HOWTO</ulink>. It is written for C++, but the concepts are the same for
380
Module HOWTO</ulink>. It is written for C++, but the concepts are the same for
381
Python.
381
Python.
382
</para>
382
</para>
383
<para>
383
<para>
384
In your <filename>setup.py</filename> file you can specify the list of kcontrol
384
In your <filename>setup.py</filename> file you can specify the list of kcontrol
385
modules that need to be installed. 
385
modules that need to be installed.
386
<programlisting>
386
<programlisting>
387
    kcontrol_modules = [ ('src/kcontrol_module.desktop','kcontrol_module.py')] )
387
    kcontrol_modules = [ ('src/kcontrol_module.desktop','kcontrol_module.py')] )
388
</programlisting>
388
</programlisting>
389
This is just a list of tuples. The first item is name of the
389
This is just a list of tuples. The first item is name of the
390
<literal role="extension">.desktop</literal> file that you've made for your
390
<literal role="extension">.desktop</literal> file that you've made for your
391
module. The second item is the name of the Python program to run when the
391
module. The second item is the name of the Python program to run when the
392
user views the module in kcontrol. This program is expected to be in 
392
user views the module in kcontrol. This program is expected to be in
393
the application's data files directory.
393
the application's data files directory.
394
</para>
394
</para>
395
<para>
395
<para>
396
The <ulink url="http://developer.kde.org/documentation/standards/kde/kcontrol_style/index.html">
396
The <ulink url="http://developer.kde.org/documentation/standards/kde/kcontrol_style/index.html">
397
KControl Module Guidelines</ulink> provides useful information about how to
397
KControl Module Guidelines</ulink> provides useful information about how to
398
design a KControl module that fits into the rest of KDE.
398
design a KControl module that fits into the rest of TDE.
399
</para>
399
</para>
400
400
401
<tip>
401
<tip>
Lines 434-447 Link Here
434
</para>
434
</para>
435
<para>
435
<para>
436
In your <filename>setup.py</filename> file you can specify the list of tdeioslaves
436
In your <filename>setup.py</filename> file you can specify the list of tdeioslaves
437
that need to be installed. 
437
that need to be installed.
438
<programlisting>
438
<programlisting>
439
    tdeioslaves = [ ('src/tdeioslave.protocol','tdeioslave.py')] )
439
    tdeioslaves = [ ('src/tdeioslave.protocol','tdeioslave.py')] )
440
</programlisting>
440
</programlisting>
441
This is just a list of tuples. The first item is name of the
441
This is just a list of tuples. The first item is name of the
442
<literal role="extension">.protocol</literal> file that you've made for your
442
<literal role="extension">.protocol</literal> file that you've made for your
443
tdeio-slave. The second item is the name of the Python program to run when the
443
tdeio-slave. The second item is the name of the Python program to run when the
444
user views the module in kcontrol. This program is expected to be in 
444
user views the module in kcontrol. This program is expected to be in
445
the application's data files directory.
445
the application's data files directory.
446
</para>
446
</para>
447
</chapter>
447
</chapter>
Lines 453-459 Link Here
453
<para>
453
<para>
454
The <filename>app_templates</filename> directory contains a number of
454
The <filename>app_templates</filename> directory contains a number of
455
application templates. An <quote>application template</quote> is just a collection of files
455
application templates. An <quote>application template</quote> is just a collection of files
456
in a directory structure that should be copied and used as starting point 
456
in a directory structure that should be copied and used as starting point
457
when developing a new application. An application template typically contains
457
when developing a new application. An application template typically contains
458
default documentation files, icons, source file and <filename>setup.py
458
default documentation files, icons, source file and <filename>setup.py
459
</filename> file which can later be modified.
459
</filename> file which can later be modified.
Lines 551-566 Link Here
551
</para>
551
</para>
552
552
553
<sect1 id="app-template-simple">
553
<sect1 id="app-template-simple">
554
<title>Simple KDE utility template</title>
554
<title>Simple TDE utility template</title>
555
<para>
555
<para>
556
The <filename>kdeutility</filename> application template is a simple utility
556
The <filename>kdeutility</filename> application template is a simple utility
557
that uses an interface designed in Qt-Designer. It doesn't have a menubar 
557
that uses an interface designed in Qt-Designer. It doesn't have a menubar
558
or toolbar.
558
or toolbar.
559
</para>
559
</para>
560
</sect1>
560
</sect1>
561
561
562
<sect1 id="app-template-application">
562
<sect1 id="app-template-application">
563
<title>KDE application template</title>
563
<title>TDE application template</title>
564
<para>
564
<para>
565
The <filename>kdeapp</filename> application template is an application with
565
The <filename>kdeapp</filename> application template is an application with
566
menubar, toolbar and separated document and view classes. The menubar and toolbars
566
menubar, toolbar and separated document and view classes. The menubar and toolbars
Lines 581-587 Link Here
581
<title>TDEIO-slave Application Template</title>
581
<title>TDEIO-slave Application Template</title>
582
<para>
582
<para>
583
The <filename>tdeioslave</filename> application template is a simple
583
The <filename>tdeioslave</filename> application template is a simple
584
TDEIO-slave that implements a simple RAM disk. Once installed it can be 
584
TDEIO-slave that implements a simple RAM disk. Once installed it can be
585
accessed using tdeioslave:/ in konqueror. It is initially empty. Files and
585
accessed using tdeioslave:/ in konqueror. It is initially empty. Files and
586
directories can be made and deposited. <filename>tdeioslave.py</filename>
586
directories can be made and deposited. <filename>tdeioslave.py</filename>
587
contains more information and comments.
587
contains more information and comments.
Lines 629-635 Link Here
629
<refpurpose>remove a list of children from a parent widget's managed
629
<refpurpose>remove a list of children from a parent widget's managed
630
list.
630
list.
631
<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
631
<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
632
<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm> 
632
<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
633
</refpurpose>
633
</refpurpose>
634
634
635
</refnamediv>
635
</refnamediv>
Lines 779-785 Link Here
779
779
780
<!-- Include credits for the programmers, documentation writers, and
780
<!-- Include credits for the programmers, documentation writers, and
781
contributors here. The license for your software should then be included below
781
contributors here. The license for your software should then be included below
782
the credits with a reference to the appropriate license file included in the KDE
782
the credits with a reference to the appropriate license file included in the TDE
783
distribution. -->
783
distribution. -->
784
784
785
<title>Credits and License</title>
785
<title>Credits and License</title>
Lines 869-874 Link Here
869
sgml-indent-data:nil
869
sgml-indent-data:nil
870
End:
870
End:
871
871
872
vim:tabstop=2:shiftwidth=2:expandtab 
872
vim:tabstop=2:shiftwidth=2:expandtab
873
-->
873
-->
874
874
(-)b/setup.py (-1 / +1 lines)
Lines 35-41 Link Here
35
        min_qt_version = "3.0.0",
35
        min_qt_version = "3.0.0",
36
        license = "LGPL",
36
        license = "LGPL",
37
        package_dir = {'': 'src'},
37
        package_dir = {'': 'src'},
38
        py_modules = ["tdedistutils","qtuicompiler","qtdesigner","kdedesigner"],
38
        py_modules = ["tdedistutils","qtuicompiler","qtdesigner","tdedesigner"],
39
        application_data = ["app_templates","AUTHORS","ChangeLog","COPYING","INSTALL","NEWS"],
39
        application_data = ["app_templates","AUTHORS","ChangeLog","COPYING","INSTALL","NEWS"],
40
        docbooks = [ ('doc/en','en') ],
40
        docbooks = [ ('doc/en','en') ],
41
        cmdclass = {
41
        cmdclass = {
(-)b/src/kdedesigner.py (-25 lines)
Lines 1-25 Link Here
1
#!/usr/bin/python
2
############################################################################
3
# kdedesigner - description                                               #
4
# ------------------------------                                          #
5
# begin     : Thu Apr 21 2005                                             #
6
# copyright : (C) 2005 by Simon Edwards                                   #
7
# email     : simon@simonzone.com                                         #
8
#                                                                         #
9
###########################################################################
10
#                                                                         #
11
#   This program is free software; you can redistribute it and/or modify  #
12
#   it under the terms of the GNU Library General Public License as       #
13
#   published by the Free Software Foundation; either version 2 of the    #
14
#   License, or (at your option) any later version.                       #
15
#                                                                         #
16
###########################################################################
17
18
import __builtin__
19
import qtuicompiler
20
21
python_import = __builtin__.__import__
22
def load(*args):
23
    qtuicompiler.DynamicImport(args,True)
24
    return apply(python_import,args)
25
__builtin__.__import__ = load
(-)b/src/tdedesigner.py (+25 lines)
Line 0 Link Here
1
#!/usr/bin/python
2
############################################################################
3
# tdedesigner - description                                               #
4
# ------------------------------                                          #
5
# begin     : Thu Apr 21 2005                                             #
6
# copyright : (C) 2005 by Simon Edwards                                   #
7
# email     : simon@simonzone.com                                         #
8
#                                                                         #
9
###########################################################################
10
#                                                                         #
11
#   This program is free software; you can redistribute it and/or modify  #
12
#   it under the terms of the GNU Library General Public License as       #
13
#   published by the Free Software Foundation; either version 2 of the    #
14
#   License, or (at your option) any later version.                       #
15
#                                                                         #
16
###########################################################################
17
18
import __builtin__
19
import qtuicompiler
20
21
python_import = __builtin__.__import__
22
def load(*args):
23
    qtuicompiler.DynamicImport(args,True)
24
    return apply(python_import,args)
25
__builtin__.__import__ = load

Return to bug 1790