KDE 4.9 PyKDE API Reference

- KDE's Python API

# Button Class Reference

`from PyKDE4.knewstuff import *`

Inherits: KPushButton → QPushButton → QAbstractButton → QWidget → QObject
Namespace: KNS

## Detailed Description

KHotNewStuff push button that makes using KHNS in an application more convenient by encapsulating most of the details involved in using KHotNewStuff in the button itself.*

Deprecated, use knewstuff3!

## Signals

| aboutToShowDialog ()
| dialogFinished ()

## Methods

| __init__ (self, QString what, QString providerList, QString resourceType, QWidget parent)
| __init__ (self, QWidget parent)
| setButtonText (self, QString what)
| setProviderList (self, QString providerList)
| setResourceType (self, QString resourceType)
| showDialog (self)

## Signal Documentation

aboutToShowDialog | ( |  | ) |

emitted when the Hot New Stuff dialog is about to be shown, usually as a result of the user having click on the button

Signal syntax:
  `QObject.connect(source, SIGNAL("aboutToShowDialog()"), target_slot)`

dialogFinished | ( |  | ) |

emitted when the Hot New Stuff dialog has been closed

Signal syntax:
  `QObject.connect(source, SIGNAL("dialogFinished()"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QString | what,
|  | QString | providerList,
|  | QString | resourceType,
|  | QWidget | parent
| ) |  |  |

Constructor used when the details of the KHotNewStuff download is known when the button is created.

Parameters:

  | what | text describing what is being downloaded. will be shown on the button as "Download New <what>"
  | 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
  | resourceType | the Hotstuff data type for this downlaod such as "korganizer/calendar"
  | parent | the parent widget
  | name | the name to be used for this widget

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

Constructor used when the details of the KHotNewStuff download is not known in advance of the button being created.

Parameters:

  | parent | the parent widget

setButtonText | ( | self, |
|  | QString | what
| ) |  |  |

set the text that should appear on the button. will be prefaced with i18n("Download New")

setProviderList | ( | self, |
|  | QString | providerList
| ) |  |  |

set the URL to the list of providers for this button to use

setResourceType | ( | self, |
|  | QString | resourceType
| ) |  |  |

the Hotstuff data type for this downlaod such as "korganizer/calendar"

showDialog | ( |  | self ) |