# knewstuff Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KNS::DownloadDialog Class Reference

Common download dialog for data browsing and installation. More...

`#include <downloaddialog.h>`

Collaboration diagram for KNS::DownloadDialog:

[legend]
List of all members.

## Public Slots

void | slotProviders (Provider::List *list)

## Public Member Functions

| DownloadDialog (Engine *engine, QWidget *parent, const QString &caption)
| DownloadDialog (QWidget *parent, const QString &caption)
| ~DownloadDialog ()
void | setType (QString type)
void | load ()
void | setProviderList (const QString &providerList)
void | load (QString providerList)
void | addProvider (Provider *p)
void | addEntry (Entry *entry)
void | clear ()
| DownloadDialog (Engine *engine, QWidget *parent=0)
| DownloadDialog (QWidget *parent=0)

## Static Public Member Functions

static void | open (const QString &type, const QString &caption)
static void | open (QString type)

## Protected Slots

void | slotApply ()
void | slotOk ()

## Detailed Description

Common download dialog for data browsing and installation.

It provides an easy-to-use convenience method named open() which does all the work, unless a more complex operation is needed.

     KNewStuff::DownloadDialog::open("kdesktop/wallpapers");

Author:
  Josef Spillner (spillner@kde.org)

Maintainer:
  Josef Spillner (spillner@kde.org)

Definition at line 57 of file downloaddialog.h.

## Constructor & Destructor Documentation

KNS::DownloadDialog::DownloadDialog | ( | Engine * | engine,
|  | QWidget * | parent,
|  | const QString & | caption
| ) |

Constructor.

Parameters:

  | engine | a pre-built engine object, or NULL if the download dialog should create an engine on its own
  | parent | the parent window
  | caption | the dialog caption

KNS::DownloadDialog::DownloadDialog | ( | QWidget * | parent,
|  | const QString & | caption
| ) |

Alternative constructor.

Always uses an internal engine.

Parameters:

  | parent | the parent window
  | caption | the dialog caption

KNS::DownloadDialog::~DownloadDialog | ( |  | ) |

| Destructor.

KNS::DownloadDialog::DownloadDialog | ( | Engine * | engine,
|  | QWidget * | parent = `0`
| ) |

Constructor.

Parameters:

  | engine | a pre-built engine object, or NULL if the download dialog should create an engine on its own
  | parent | the parent window

KNS::DownloadDialog::DownloadDialog | ( | QWidget * | parent = `0` | ) |

Alternative constructor.

Always uses an internal engine.

Parameters:

  | parent | the parent window

## Member Function Documentation

void KNS::DownloadDialog::setType | ( | QString | type | ) |

Restricts the display of available data to a certain data type.

Parameters:

  | type | a Hotstuff data type such as "korganizer/calendar"

void KNS::DownloadDialog::load | ( |  | ) |

| Fetches descriptions of all available data, optionally considering a previously set type.

void KNS::DownloadDialog::setProviderList | ( | const QString & | providerList | ) |

Explicitly uses this provider list instead of the one read from the application configuration.

Parameters:

  | providerList | the URL of the provider list

Since:
  3.4

void KNS::DownloadDialog::load | ( | QString | providerList | ) |

Fetches descriptions of all available data, optionally considering a previously set type.

Parameters:

  | providerList | the URl to the list of providers; if empty we first try the ProvidersUrl from KGlobal::config, then we fall back to a hardcoded value.

void KNS::DownloadDialog::addProvider | ( | Provider * | p | ) |

Adds another provider to the download dialog.

This is normally done internally.

Parameters:

  | p | the Hotstuff provider to be added

void KNS::DownloadDialog::addEntry | ( | Entry * | entry | ) |

Adds an additional entry to the current provider.

This is normally done internally.

Parameters:

  | entry | a Hotstuff data entry to be added

void KNS::DownloadDialog::clear | ( |  | ) |

| Clears the entry list of the current provider. This is normally done internally.

static void KNS::DownloadDialog::open | ( | const QString & | type,
|  | const QString & | caption
| ) | `[static]`

Opens the download dialog.

This is a convenience method which automatically sets up the dialog.

See also:
  setType()

  load()

Parameters:

  | type | a data type such as "korganizer/calendar"
  | caption | the dialog caption

static void KNS::DownloadDialog::open | ( | QString | type | ) | `[static]`

Opens the download dialog.

This is a convenience method which automatically sets up the dialog.

See also:
  setType()

  load()

Parameters:

  | type | a data type such as "korganizer/calendar"

void KNS::DownloadDialog::slotProviders | ( | Provider::List * | list | ) | `[slot]`

Availability of the provider list.

Parameters:

  | list | list of Hotstuff providers

The documentation for this class was generated from the following file:

- downloaddialog.h

This file is part of the documentation for knewstuff Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:28:40 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003