KDE 4.4 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

BrowserOpenOrSaveQuestion Class Reference

from PyKDE4.kparts import *

Namespace: KParts.BrowserOpenOrSaveQuestion

Detailed Description

This class shows the dialog that asks the user whether to save a url or open a url in another application.

It also has the variant which asks "save or embed" (e.g. into konqueror).

Since:
4.4


Enumerations

Feature { BasicFeatures, ServiceSelection }
Result { Save, Open, Embed, Cancel }

Methods

 __init__ (self, QWidget parent, KUrl url, QString mimeType)
KParts.BrowserOpenOrSaveQuestion.Result askEmbedOrSave (self, int flags=0)
KParts.BrowserOpenOrSaveQuestion.Result askOpenOrSave (self)
KService.Ptr selectedService (self)
 setFeatures (self, KParts.BrowserOpenOrSaveQuestion.Features features)
 setSuggestedFileName (self, QString suggestedFileName)

Method Documentation

__init__ (  self,
QWidget  parent,
KUrl  url,
QString  mimeType
)
KParts.BrowserOpenOrSaveQuestion.Result askEmbedOrSave (  self,
int  flags=0
)

Ask the user whether to save or open a url in another application.

Parameters:
parent  parent widget for the dialog
flags  set to BrowserRun.AttachmentDisposition if suggested by the server This is used because by default text/html files are opened embedded in browsers, not saved. But if the server said "attachment", it means the user is download a file for saving it.

Returns:
Save, Embed or Cancel.

KParts.BrowserOpenOrSaveQuestion.Result askOpenOrSave (   self )

Ask the user whether to save or open a url in another application.

Parameters:
parent  parent widget for the dialog

Returns:
Save, Open or Cancel.

KService.Ptr selectedService (   self )

Returns:
the service that was selected during askOpenOrSave, if it returned Open. In all other cases (no associated application, Save or Cancel selected), this returns 0.

Requires setFeatures(BrowserOpenOrSaveQuestion.ServiceSelection).

setFeatures (  self,
KParts.BrowserOpenOrSaveQuestion.Features  features
)

Enables the given features in the dialog

setSuggestedFileName (  self,
QString  suggestedFileName
)

Sets the suggested filename, shown in the dialog.

Parameters:
suggestedFileName  optional file name suggested by the server (HTTP Content-Disposition)


Enumeration Documentation

Feature
Enumerator:

Result
Enumerator:

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • polkitqt
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal