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

Mrl Class Reference

from PyKDE4.phonon import *

Inherits: QUrl
Namespace: Phonon

Detailed Description

\class Mrl mrl.h phonon/Mrl Media Resource Locator - A QUrl particularly for MediaSources.

Whenever working with URLs/URIs that actually are referencing a media resource a Mrl should be used rather than a QUrl. Mrl has functions particularly made for a media related use case and additionally overloads some of QUrl's functions to work more reasonable in a Phonon context.

A Mrl can be used just like a QUrl.

Author:
Harald Sitter <sitter@kde.org>


Methods

 __init__ (self)
 __init__ (self, Phonon.Mrl copy)
 __init__ (self, QUrl url)
 __init__ (self, QString url)
QByteArray toEncoded (self, QUrl::FormattingOptions options=QUrl.None)

Method Documentation

__init__ (   self )
__init__ (  self,
Phonon.Mrl  copy
)
__init__ (  self,
QUrl  url
)
__init__ (  self,
QString  url
)
QByteArray toEncoded (  self,
QUrl::FormattingOptions  options=QUrl.None
)

Returns the encoded representation of the MRL if it's valid; otherwise an empty QByteArray is returned. The output can be customized by passing flags with options.

If the MRL is a local file it will first be encoded using the local encoding, otherwise it gets converted to UTF-8, and all non-ASCII characters are then percent encoded.

\arg options QUrl.FormattingOptions to manipulate what the output should look like

Returns:
the encoded MRL or an empty QByteArray if the MRL was invalid

  • 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