KDE 4.5 PyKDE API Reference

- KDE's Python API

# DownloadDialog Class Reference

`from PyKDE4.knewstuff import *`

Inherits: KDialog → QDialog → QWidget → QObject
Namespace: KNS3

## Detailed Description

KNewStuff download dialog.

The download dialog will present items to the user for installation, updates and removal. Preview images as well as other meta information can be seen.

knsrc Files The Dialog is configured by a .knsrc file containing the KHotNewStuff configuration. Your application should install a file called: <em>$KDEDIR/share/config/appname.knsrc</em>

The file could look like this for wallpapers: <pre> [KNewStuff3] ProvidersUrl=http://download.kde.org/ocs/providers.xml Categories=KDE Wallpaper 1920x1200,KDE Wallpaper 1600x1200 StandardResource=wallpaper Uncompress=archive </pre>

Uncompress can be one of: always, never or archive: <ol> <li>always: assume all downloaded files are archives and need to be extracted</li> <li>never: never try to extract the file</li> <li>archive: if the file is an archive, uncompress it, otherwise just pass it on</li> </ol>

You have different options to set the target install directory: <ol><li>StandardResource: standard ressouce dir, such as <em>.kde/share/wallpapers</em>. This is what KStandardDirs.locateLocal(name) will return.</li> <li>TargetDir: a directory in the share/apps section, such as <em>.kde/share/apps/wallpapers</em>. This is what KStandardDirs.locateLocal("data", name) will return.</li> <li>XdgTargetDir: a directory in the $XDG_DATA_HOME directory such as <em>.local/share/wallpapers</em> (since 4.5). </ol>

Since:
  4.4

## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, QString configFile, QWidget parent=0)
[KNS3.Entry] | changedEntries (self)
[KNS3.Entry] | installedEntries (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Create a DownloadDialog that lets the user install, update and uninstall contents. It will try to find a appname.knsrc file with the configuration. Appname is the name of your application as provided in the about data->

Parameters:

  | parent | the parent of the dialog

__init__ | ( | self, |
|  | QString | configFile,
|  | QWidget | parent=0
| ) |  |  |

Create a DownloadDialog that lets the user install, update and uninstall contents. Manually specify the name of a .knsrc file where the KHotNewStuff configuration can be found.

Parameters:

  | configFile | the name of the configuration file
  | parent | the parent of the dialog

[KNS3.Entry] changedEntries | ( |  | self ) |

The list of entries with changed status (installed/uninstalled)

Returns:
  the list of entries

[KNS3.Entry] installedEntries | ( |  | self ) |

The list of entries that have been newly installed

Returns:
  the list of entries