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

libplasma

Plasma::Package

Plasma::Package Class Reference

#include <package.h>

List of all members.


Detailed Description

Definition at line 38 of file package.h.


Public Member Functions

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

Static Public Member Functions

static QStringList knownPackages (const QString &packageRoot)
static bool installPackage (const QString &package, const QString &packageRoot)
static bool createPackage (const PackageMetadata &metadata, const QString &source, const QString &destination, const QString &icon=QString())

Constructor & Destructor Documentation

Plasma::Package::Package ( const QString &  packageRoot,
const QString &  package,
const PackageStructure &  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 70 of file package.cpp.

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

Construct a Package object.

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

Definition at line 76 of file package.cpp.

Plasma::Package::~Package (  ) 

Definition at line 81 of file package.cpp.


Member Function Documentation

bool Plasma::Package::isValid (  )  const

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

Definition at line 86 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 111 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 136 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 141 of file package.cpp.

const PackageMetadata * Plasma::Package::metadata (  )  const

Returns:
the package metadata object.

Definition at line 161 of file package.cpp.

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

Returns a list of all installed packages.

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

Definition at line 171 of file package.cpp.

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

Installs a package.

Parameters:
package path to the Plasmagik package
packageRoot path to the directory where the package should be installed to
Returns:
true on successful installation, false otherwise

Definition at line 192 of file package.cpp.

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 278 of file package.cpp.


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

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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