KNS3.Button

KDE 4.9 PyKDE API Reference

- KDE's Python API

# Button Class Reference

`from PyKDE4.knewstuff import *`

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

## 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.

Since:
  4.4

## Signals
| aboutToShowDialog ()
| dialogFinished ([KNS3.Entry] changedEntries)
## Methods
| __init__ (self, QString text, QString configFile, QWidget parent)
| __init__ (self, QWidget parent)
| setButtonText (self, QString text)
| setConfigFile (self, QString configFile)
| 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 | ( | [KNS3.Entry] | changedEntries
| ) |  |  |

emitted when the Hot New Stuff dialog has been closed

Signal syntax:
  `QObject.connect(source, SIGNAL("dialogFinished(const KNS3::Entry::List&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QString | text,
|  | QString | configFile,
|  | QWidget | parent
| ) |  |  |

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

Parameters:

  | text | describing what is being downloaded. It should be a text beginning with "Download New ..." for consistency
  | configFile | the name of the .knsrc file
  | parent | the parent 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 | text
| ) |  |  |

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

setConfigFile | ( | self, |
|  | QString | configFile
| ) |  |  |

set the name of the .knsrc file to use

showDialog | ( |  | self ) |