Plasma
#include <Plasma/PackageMetadata>
Public Member Functions | |
PackageMetadata (const QString &path=QString()) | |
PackageMetadata (const PackageMetadata &other) | |
~PackageMetadata () | |
QString | application () const |
QString | author () const |
QString | category () const |
QString | description () const |
QString | email () const |
QString | icon () const |
QString | implementationApi () const |
bool | isValid () const |
QStringList | keywords () const |
QString | license () const |
QString | name () const |
PackageMetadata & | operator= (const PackageMetadata &other) |
QString | pluginName () const |
void | read (const QString &filename) |
KUrl | remoteLocation () const |
QString | requiredVersion () const |
QString | serviceType () const |
void | setApplication (const QString &) |
void | setAuthor (const QString &) |
void | setCategory (const QString &) |
void | setDescription (const QString &) |
void | setEmail (const QString &) |
void | setIcon (const QString &icon) |
void | setImplementationApi (const QString &api) |
void | setKeywords (const QStringList &keywords) |
void | setLicense (const QString &) |
void | setName (const QString &) |
void | setPluginName (const QString &name) |
void | setRemoteLocation (const KUrl &) |
void | setRequiredVersion (const QString &) |
void | setServiceType (const QString &) |
void | setType (const QString &type) |
void | setVersion (const QString &) |
void | setWebsite (const QString &) |
QString | type () const |
QString | version () const |
QString | website () const |
void | write (const QString &filename) const |
Detailed Description
Provides metadata for a Package.
Definition at line 39 of file packagemetadata.h.
Constructor & Destructor Documentation
|
explicit |
Constructs a metadata object using the values in the file at path.
- Parameters
-
path path to a metadata.desktop file
Definition at line 68 of file packagemetadata.cpp.
Plasma::PackageMetadata::PackageMetadata | ( | const PackageMetadata & | other | ) |
Copy constructor.
Definition at line 57 of file packagemetadata.cpp.
Plasma::PackageMetadata::~PackageMetadata | ( | ) |
Definition at line 74 of file packagemetadata.cpp.
Member Function Documentation
QString Plasma::PackageMetadata::application | ( | ) | const |
Definition at line 209 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::author | ( | ) | const |
Definition at line 174 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::category | ( | ) | const |
Definition at line 214 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::description | ( | ) | const |
Definition at line 164 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::email | ( | ) | const |
Definition at line 179 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::icon | ( | ) | const |
Returns the icon name associated with this package, or QString() if none.
- Since
- 4.5
Definition at line 184 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::implementationApi | ( | ) | const |
Definition at line 244 of file packagemetadata.cpp.
bool Plasma::PackageMetadata::isValid | ( | ) | const |
Definition at line 79 of file packagemetadata.cpp.
QStringList Plasma::PackageMetadata::keywords | ( | ) | const |
Definition at line 224 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::license | ( | ) | const |
Definition at line 204 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::name | ( | ) | const |
Definition at line 159 of file packagemetadata.cpp.
PackageMetadata & Plasma::PackageMetadata::operator= | ( | const PackageMetadata & | other | ) |
Definition at line 62 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::pluginName | ( | ) | const |
Definition at line 254 of file packagemetadata.cpp.
void Plasma::PackageMetadata::read | ( | const QString & | filename | ) |
Reads in metadata from a file, which should be a .desktop file.
It writes out the information in a format that is compatible with KPluginInfo
- See also
- KPluginInfo
- Parameters
-
filename path to the file to write to
Definition at line 113 of file packagemetadata.cpp.
KUrl Plasma::PackageMetadata::remoteLocation | ( | ) | const |
Definition at line 234 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::requiredVersion | ( | ) | const |
Definition at line 229 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::serviceType | ( | ) | const |
Definition at line 169 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setApplication | ( | const QString & | application | ) |
Set the name of the application this package may belongs to.
This is used only for display purposes so far.
Definition at line 304 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setAuthor | ( | const QString & | author | ) |
Set the name of the author of the package.
Definition at line 279 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setCategory | ( | const QString & | category | ) |
Sets the category this package belongs in.
Definition at line 309 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setDescription | ( | const QString & | description | ) |
Set the description used to provide some general information what the package is about.
Definition at line 269 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setEmail | ( | const QString & | ) |
Set the E-Mail address of the author or of the project that provided the package.
Definition at line 284 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setIcon | ( | const QString & | icon | ) |
Set the icon name to be used with this package.
- Since
- 4.5
Definition at line 189 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setImplementationApi | ( | const QString & | api | ) |
Set the implementation API this package uses.
Definition at line 249 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setKeywords | ( | const QStringList & | keywords | ) |
Set the keywords used to provide search and categorizations.
- Parameters
-
keywords the keywords to associate with this package
Definition at line 219 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setLicense | ( | const QString & | license | ) |
Set the license the package is distributed under.
Definition at line 299 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setName | ( | const QString & | name | ) |
Set the name of the package used to displayed a short describing name.
Definition at line 264 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setPluginName | ( | const QString & | name | ) |
Set the plugin name of the package.
The plugin name is used to locate the package;
Definition at line 259 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setRemoteLocation | ( | const KUrl & | location | ) |
Set the url where this package is hosted.
Definition at line 319 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setRequiredVersion | ( | const QString & | requiredVersion | ) |
Set the required version.
See also the setVersion() method.
Definition at line 314 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setServiceType | ( | const QString & | serviceType | ) |
Set the service-type which defines the X-KDE-ServiceTypes type within the desktop file.
If not defined this defaults to "Plasma/Applet,Plasma/Containment" in the desktop file.
Definition at line 274 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setType | ( | const QString & | type | ) |
Set the type of the package.
If not defined this defaults to "Service" in the desktop file.
Definition at line 324 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setVersion | ( | const QString & | version | ) |
Set the version of the package.
Definition at line 289 of file packagemetadata.cpp.
void Plasma::PackageMetadata::setWebsite | ( | const QString & | website | ) |
Set the website URL where the package is hosted or where additional details about the project are available.
Definition at line 294 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::type | ( | ) | const |
Definition at line 239 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::version | ( | ) | const |
Definition at line 194 of file packagemetadata.cpp.
QString Plasma::PackageMetadata::website | ( | ) | const |
Definition at line 199 of file packagemetadata.cpp.
void Plasma::PackageMetadata::write | ( | const QString & | filename | ) | const |
Writes out the metadata to filename, which should be a .desktop file.
It writes out the information in a format that is compatible with KPluginInfo
- See also
- KPluginInfo
- Parameters
-
filename path to the file to write to
Definition at line 87 of file packagemetadata.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.