Plasma
packagemetadata.h
Go to the documentation of this file.
00001 /****************************************************************************** 00002 * Copyright 2007 by Riccardo Iaconelli <riccardo@kde.org> * 00003 * * 00004 * This library is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU Library General Public * 00006 * License as published by the Free Software Foundation; either * 00007 * version 2 of the License, or (at your option) any later version. * 00008 * * 00009 * This library is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00012 * Library General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU Library General Public License * 00015 * along with this library; see the file COPYING.LIB. If not, write to * 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00017 * Boston, MA 02110-1301, USA. * 00018 *******************************************************************************/ 00019 00020 #ifndef PLASMA_PACKAGEMETADATA_H 00021 #define PLASMA_PACKAGEMETADATA_H 00022 00023 #include <QtCore/QString> 00024 00025 #include <plasma/plasma_export.h> 00026 00027 #include <kurl.h> 00028 00029 namespace Plasma 00030 { 00031 00032 class PackageMetadataPrivate; 00033 00039 class PLASMA_EXPORT PackageMetadata 00040 { 00041 public: 00047 explicit PackageMetadata(const QString &path = QString()); 00048 00052 PackageMetadata(const PackageMetadata &other); 00053 00054 ~PackageMetadata(); 00055 00056 PackageMetadata &operator=(const PackageMetadata &other); 00057 00058 bool isValid() const; 00059 00068 void write(const QString &filename) const; 00069 00078 void read(const QString &filename); 00079 00080 QString name() const; 00081 QString description() const; 00082 QStringList keywords() const; 00083 QString serviceType() const; 00084 QString author() const; 00085 QString email() const; 00086 QString version() const; 00087 QString website() const; 00088 QString license() const; 00089 QString application() const; 00090 QString category() const; 00091 QString requiredVersion() const; 00092 QString pluginName() const; 00093 QString implementationApi() const; 00094 KUrl remoteLocation() const; 00095 00096 QString type() const; 00097 00102 void setName(const QString &); 00103 00108 void setDescription(const QString &); 00109 00114 QString icon() const; 00115 00120 void setIcon(const QString &icon); 00121 00126 void setKeywords(const QStringList &keywords); 00127 00134 void setServiceType(const QString &); 00135 00139 void setAuthor(const QString &); 00140 00145 void setEmail(const QString &); 00146 00150 void setVersion(const QString &); 00151 00156 void setWebsite(const QString &); 00157 00161 void setLicense(const QString &); 00162 00168 void setApplication(const QString &); 00169 00173 void setCategory(const QString &); 00174 00179 void setRequiredVersion(const QString &); 00180 00184 void setRemoteLocation(const KUrl &); 00185 00190 void setType(const QString &type); 00191 00201 void setPluginName(const QString &name); 00202 00206 void setImplementationApi(const QString &api); 00207 00208 private: 00209 PackageMetadataPrivate * const d; 00210 }; 00211 00212 } 00213 #endif
KDE 4.6 API Reference