KNS3.UploadDialog

KDE 4.5 PyKDE API Reference

- KDE's Python API

# UploadDialog Class Reference

`from PyKDE4.knewstuff import *`

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

## Detailed Description

KNewStuff file upload dialog.

Using this dialog, data can easily be uploaded to the Hotstuff servers.

Maintainer: Jeremy Whiting (jpwhiting@kde.org)

Since:
  4.4

## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, QString configFile, QWidget parent=0)
| accept (self)
| selectCategory (self, QString category)
| setChangelog (self, QString changelog)
| setDescription (self, QString description)
| setPrice (self, float price)
| setPriceEnabled (self, bool enabled)
| setPriceReason (self, QString reason)
| setUploadFile (self, KUrl payloadFile)
| setUploadName (self, QString name)
| setVersion (self, QString version)

## Method Documentation

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

Create a new upload dialog.

Parameters:

  | parent | the parent window

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

Create a new upload dialog.

Parameters:

  | parent | the parent window

accept | ( |  | self ) |

selectCategory | ( | self, |
|  | QString | category
| ) |  |  |

Set the suggested category for the upload. The .knsrc file may contain multiple upload categories, this sets which one is pre-selected. It does not add any new category to the list of available categories.

Parameters:

  | category | the suggested category for the upload

setChangelog | ( | self, |
|  | QString | changelog
| ) |  |  |

Set the suggested changelog displayed in the upload dialog. The user can still change this.

Parameters:

  | version | version

setDescription | ( | self, |
|  | QString | description
| ) |  |  |

Set the suggested description displayed in the upload dialog. The user can still change this.

Parameters:

  | description |

setPrice | ( | self, |
|  | float | price
| ) |  |  |

Set the suggested price displayed in the upload dialog. The user can still change this.

Parameters:

  | version | version

setPriceEnabled | ( | self, |
|  | bool | enabled
| ) |  |  |

Enable the UI to let the user to set a price for the uploaded item.

Parameters:

  | enabled | enable the price option - it is enabled by default

Since:
  4.5

setPriceReason | ( | self, |
|  | QString | reason
| ) |  |  |

Set the suggested rationale why this item costs something to download. The user can still change this.

Parameters:

  | version | version

setUploadFile | ( | self, |
|  | KUrl | payloadFile
| ) |  |  |

Set the file to be uploaded. This has to be set for the dialog to work, before displaying the dialog.

Parameters:

  | payloadFile | the payload data file

setUploadName | ( | self, |
|  | QString | name
| ) |  |  |

Set the suggested title for the upload. The application can suggest a title which can then be edited by the user before uploading. The name field will be left empty if no title was set.

Parameters:

  | name | the suggested name for the upload

setVersion | ( | self, |
|  | QString | version
| ) |  |  |

Set the suggested version displayed in the upload dialog. The user can still change this.

Parameters:

  | version |