From 875ae8e38bc3663e5057ca910e7ebe4b2994edb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Sep 2010 19:47:20 +0000 Subject: Updated python directory git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1175349 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- python/pykde/doc/static.html | 183 ------------------------------------------- 1 file changed, 183 deletions(-) delete mode 100644 python/pykde/doc/static.html (limited to 'python/pykde/doc/static.html') diff --git a/python/pykde/doc/static.html b/python/pykde/doc/static.html deleted file mode 100644 index 0ee4ef76..00000000 --- a/python/pykde/doc/static.html +++ /dev/null @@ -1,183 +0,0 @@ - - -Types and Related Topics - - - -

Types and Related Topics

-

Static Member Functions

-

-Static member functions are implemented as Python class functions. -For example the C++ static member function -TQObject::connect() -is called from Python as -TQObject.connect() or -self.connect() -if called from a sub-class of -TQObject. -

-

None and NULL

-

Throughout the bindings, the -None -value can be specified wherever -NULL -is acceptable to the underlying C++ code.

-

Equally, -NULL -is converted to -None -whenever it is returned by the underlying C++ code -

- -

Enumerated Types

-

-Enumerated types are implemented as a set of simple variables corresponding to -the separate enumerated values. -

-

-When using an enumerated value the name of the class (or a sub-class) in which -the enumerated type was defined in must be included. For example: -

- - - - -
-
-Qt.SolidPattern
-TQWidget.TabFocus
-TQFrame.TabFocus
-
-
- -

Namespaces

-

-The C++ code in KDE makes extensive use of namespaces (especially in the kio, kjs, -khtml, kfile, and kparts modules). In PyKDE, namespaces are treated as a "superclass". -For example, "from kparts import KParts" will import the KParts namespace and all -its members. To reference a class in the namespace, use <namespace name>..<classname>, -for example, KParts.ReadOnlyPart. It isn't necessary to import the <classname> (ReadOnlyPart -in the example). -

-

Return and Argument Types

-

-Some return types or argument types may be different than those in the C++ KDE libs. This is -done for convenience (eg returning/taking Python lists or dicts), because arguments are -scalar (non-object) types passed by reference (eg int*, bool&), or because there is no -way to express the C++ type in Python (eg template types) -

-

-Please check the Class Reference Docs which list all classes -and methods in Python format. -

-

Version Information

New in PyKDE-3.11

-

-PyKDE provides methods for determining both the KDE version being run and the PyKDE -version being run. The version methods are: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return typeKDEExamplePyKDEExample
intKDE.versionMajor ()3PyKDE.versionMajor ()3
intKDE.versionMinor ()1PyKDE.versionMinor ()8
intKDE.versionRelease ()4PyKDE.versionRelease ()0
stringKDE.versionString ()"3.1.4"PyKDE.versionString ()"3.11.0"
- -

Abstract Classes and Pure Virtual Methods

-

-C++ allows the use of abstract classes. Abstract classes cannot be used in programs -(instantiated) directly; their only purpose is to serve as a base class from which -programmers can derive other classes that can be used. -

-

-An abstract class in C++ is defined as a class that has one or more 'pure virtual' -methods. These can be identified in the C++ header files or C++ docs as methods set -equal to 0, for example: -

- - - - -
-
-virtual int somePureVirtualMethod (int a) = 0;
-
-
-

-To derive a useful class from the abstract class, the programmer has to write methods -to overload each of the pure virtual methods. Following a suggestion on the mailing -list, the docs attempt to flag all abstract classes and identify the pure virtual -methods which must be overloaded in the derived class. Derived classes can be created -in Python by writing Python methods to overload the pure virtual methods - no C++ code -is required. -

- - - - - -- cgit v1.2.3