Plasma
packagestructure.cpp
Go to the documentation of this file.
294 QStringList PackageStructurePrivate::entryList(const QString &prefix, const QString &requestedPath)
331 void PackageStructure::addFileDefinition(const char *key, const QString &path, const QString &name)
630 } else if (mimetype->is("application/x-compressed-tar") || mimetype->is("application/x-gzip") ||
631 mimetype->is("application/x-xz-compressed-tar") || mimetype->is("application/x-lzma-compressed-tar") ||
635 kWarning() << "Could not open package file, unsupported archive format:" << d->path << mimetype->name();
643 // This is to help with the theme packages, which include an extra folder in their package archive.
645 // As in /path/Theme Name/Dir1/metadata.desktop and not /path/Theme Name/Dir1/Dir2/metadata.desktop
QList< const char * > files() const
The individual files, by key, that are defined for this package.
Definition: packagestructure.cpp:247
void write(KConfigBase *config) const
Write this package structure to a config file.
Definition: packagestructure.cpp:507
QString contentsPrefix() const
Definition: packagestructure.cpp:534
QStringList entryList(const char *key)
Get the list of files of a given type.
Definition: packagestructure.cpp:273
QStringList contentsPrefixPaths() const
Definition: packagestructure.cpp:545
void setServicePrefix(const QString &servicePrefix)
Sets service prefix.
Definition: packagestructure.cpp:597
void setDefaultMimetypes(QStringList mimetypes)
Defines the default mimetypes for any definitions that do not have associated mimetypes.
Definition: packagestructure.cpp:408
bool exists() const
void newWidgetBrowserFinished()
Emitted when the new widget browser process completes.
PackageStructure::Ptr defaultPackageStructure(ComponentType type)
Definition: scriptengine.cpp:254
static PackageStructure::Ptr packageStructure()
Definition: theme.cpp:590
void addFileDefinition(const char *key, const QString &path, const QString &name)
Adds a file to the structure of the package.
Definition: packagestructure.cpp:331
Definition: plasma.h:232
const char * name() const
static bool uninstallPackage(const QString &package, const QString &packageRoot, const QString &servicePrefix)
Uninstalls a package.
Definition: package.cpp:628
static bool installPackage(const QString &package, const QString &packageRoot, const QString &servicePrefix)
Installs a package.
Definition: package.cpp:464
PackageStructure & operator=(const PackageStructure &rhs)
Assignment operator.
Definition: packagestructure.cpp:205
void setRequired(const char *key, bool required)
Sets whether or not a given part of the structure is required or not.
Definition: packagestructure.cpp:388
void setContentsPrefix(const QString &prefix)
Sets the prefix that all the contents in this package should appear under.
Definition: packagestructure.cpp:539
bool isDir() const
virtual void createNewWidgetBrowser(QWidget *parent=0)
When called, the package plugin should display a window to the user that they can use to browser...
Definition: packagestructure.cpp:576
QString defaultPackageRoot() const
Definition: packagestructure.cpp:582
PackageStructure(QObject *parent=0, const QString &type=i18nc("A non-functional package","Invalid"))
Default constructor for a package structure definition.
Definition: packagestructure.cpp:108
void setDefaultPackageRoot(const QString &packageRoot)
Sets preferred package root.
Definition: packagestructure.cpp:592
bool isEmpty() const
QList< const char * > requiredFiles() const
The individual required files, by key, that are defined for this package.
Definition: packagestructure.cpp:260
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
virtual bool uninstallPackage(const QString &packageName, const QString &packageRoot)
Uninstalls a package matching this package structure.
Definition: packagestructure.cpp:571
bool exists() const
void addDirectoryDefinition(const char *key, const QString &path, const QString &name)
Adds a directory to the structure of the package.
Definition: packagestructure.cpp:312
QStringList mimetypes(const char *key) const
Definition: packagestructure.cpp:423
virtual void pathChanged()
Called whenever the path changes so that subclasses may take package specific actions.
Definition: packagestructure.cpp:470
void setContentsPrefixPaths(const QStringList &prefixPaths)
Sets the prefixes that all the contents in this package should appear under.
Definition: packagestructure.cpp:550
const Key key(const T &value) const
static PackageStructure::Ptr load(const QString &packageFormat)
Loads a package format by name.
Definition: packagestructure.cpp:119
QByteArray toLatin1() const
static QScriptValue type(QScriptContext *ctx, QScriptEngine *eng)
Definition: easingcurve.cpp:63
QString servicePrefix() const
Definition: packagestructure.cpp:587
QStringList searchPath(const char *key) const
Definition: packagestructure.cpp:366
void setAllowExternalPaths(bool allow)
Sets whether or not external paths/symlinks can be followed by a package.
Definition: packagestructure.cpp:685
virtual bool installPackage(const QString &archivePath, const QString &packageRoot)
Installs a package matching this package structure.
Definition: packagestructure.cpp:566
void removeDefinition(const char *key)
Removes a definition from the structure of the package.
Definition: packagestructure.cpp:349
bool isRequired(const char *key) const
Definition: packagestructure.cpp:398
void setMimetypes(const char *key, QStringList mimetypes)
Define mimetypes for a given part of the structure The path must already have been added using addDir...
Definition: packagestructure.cpp:413
QString absolutePath() const
bool allowExternalPaths() const
Definition: packagestructure.cpp:680
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
void read(const KConfigBase *config)
Read a package structure from a config file.
Definition: packagestructure.cpp:475
virtual PackageMetadata metadata()
Definition: packagestructure.cpp:617
QList< const char * > requiredDirectories() const
The required directories defined for this package.
Definition: packagestructure.cpp:233
A description of the expected file structure of a given package type.
Definition: packagestructure.h:72
const T value(const Key &key) const
QList< const char * > directories() const
The directories defined for this package.
Definition: packagestructure.cpp:220
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.