• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Plasma

Plasma::Package

Plasma::Package Class Reference

object representing an installed Plasmagik package More...

#include <Plasma/Package>

List of all members.


Public Member Functions

QStringList entryList (const char *fileType) const
QString filePath (const char *fileType) const
QString filePath (const char *fileType, const QString &filename) const
bool isValid () const
PackageMetadata metadata () const
 Package (const QString &packagePath, PackageStructure::Ptr structure)
 Package (const QString &packageRoot, const QString &package, PackageStructure::Ptr structure)
const QString path () const
const PackageStructure::Ptr structure () const
 ~Package ()

Static Public Member Functions

static bool createPackage (const PackageMetadata &metadata, const QString &source, const QString &destination, const QString &icon=QString())
static bool installPackage (const QString &package, const QString &packageRoot, const QString &servicePrefix)
static QStringList listInstalled (const QString &packageRoot)
static QStringList listInstalledPaths (const QString &packageRoot)
static bool registerPackage (const PackageMetadata &data, const QString &iconPath)
static bool uninstallPackage (const QString &package, const QString &packageRoot, const QString &servicePrefix)

Detailed Description

object representing an installed Plasmagik package

Definition at line 41 of file package.h.


Constructor & Destructor Documentation

Plasma::Package::Package ( const QString &  packageRoot,
const QString &  package,
PackageStructure::Ptr  structure 
)

Default constructor.

  • packageRoot path to the package installation root
  • package the name of the package
  • structure the package structure describing this package

Definition at line 77 of file package.cpp.

Plasma::Package::Package ( const QString &  packagePath,
PackageStructure::Ptr  structure 
)

Construct a Package object.

  • packagePath full path to the package directory
  • structure the package structure describing this package

Definition at line 84 of file package.cpp.

Plasma::Package::~Package (  ) 

Definition at line 90 of file package.cpp.


Member Function Documentation

bool Plasma::Package::createPackage ( const PackageMetadata &  metadata,
const QString &  source,
const QString &  destination,
const QString &  icon = QString() 
) [static]

Creates a package based on the metadata from the files contained in the source directory.

  • metadata description of the package to create
  • source path to local directory containing the individual files to be added to the package
  • destination path to the package that should be created
  • icon path to the package icon

Definition at line 451 of file package.cpp.

QStringList Plasma::Package::entryList ( const char *  fileType  )  const

Get the list of files of a given type.

  • fileType the type of file to look for, as defined in the package structure.
    Returns:
    list of files by name, suitable for passing to filePath

Definition at line 164 of file package.cpp.

QString Plasma::Package::filePath ( const char *  fileType  )  const

Get the path to a given file.

  • fileType the type of file to look for, as defined in the package structure. The type must refer to a file in the package structure and not a directory.
    Returns:
    path to the file on disk. QString() if not found

Definition at line 159 of file package.cpp.

QString Plasma::Package::filePath ( const char *  fileType,
const QString &  filename 
) const

Get the path to a given file.

  • fileType the type of file to look for, as defined in the package structure
  • filename the name of the file
    Returns:
    path to the file on disk. QString() if not found.

Definition at line 121 of file package.cpp.

bool Plasma::Package::installPackage ( const QString &  package,
const QString &  packageRoot,
const QString &  servicePrefix 
) [static]

Installs a package.

Parameters:
package path to the Plasmagik package
packageRoot path to the directory where the package should be installed to
servicePrefix the prefix for the desktop file, so as not to interfere with unrelated services (eg: "plasma-applet-")
Returns:
true on successful installation, false otherwise

Definition at line 251 of file package.cpp.

bool Plasma::Package::isValid (  )  const

Returns:
true if all the required components as defined in the PackageStructure exist

Definition at line 95 of file package.cpp.

QStringList Plasma::Package::listInstalled ( const QString &  packageRoot  )  [static]

Returns a list of all installed packages by name.

Parameters:
packageRoot path to the directory where Plasmagik packages have been installed to
Returns:
a list of installed Plasmagik packages

Definition at line 210 of file package.cpp.

QStringList Plasma::Package::listInstalledPaths ( const QString &  packageRoot  )  [static]

Returns a list of all paths of installed packages in the given root.

Parameters:
packageRoot path to the directory where Plasmagik packages have been installed to
Returns:
a list of installed Plasmagik packages by path

Definition at line 231 of file package.cpp.

PackageMetadata Plasma::Package::metadata (  )  const

Returns:
the package metadata object.

Definition at line 193 of file package.cpp.

const QString Plasma::Package::path (  )  const

Returns:
the path to the root of this particular package

Definition at line 198 of file package.cpp.

bool Plasma::Package::registerPackage ( const PackageMetadata &  data,
const QString &  iconPath 
) [static]

Registers a package described by the given desktop file.

  • the full path to the desktop file (must be KPluginInfo compatible)
    Returns:
    true on success, false on failure

Definition at line 418 of file package.cpp.

const PackageStructure::Ptr Plasma::Package::structure (  )  const

Returns:
the PackageStructure use in this Package

Definition at line 203 of file package.cpp.

bool Plasma::Package::uninstallPackage ( const QString &  package,
const QString &  packageRoot,
const QString &  servicePrefix 
) [static]

Uninstalls a package.

Parameters:
package path to the Plasmagik package
packageRoot path to the directory where the package should be installed to
servicePrefix the prefix for the desktop file, so as not to interfere with unrelated services (eg: "plasma-applet-")
Returns:
true on successful uninstallation, false otherwise

Definition at line 385 of file package.cpp.


The documentation for this class was generated from the following files:
  • package.h
  • package.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal