Vidalia 0.2.15
|
#include <PackageInfo.h>
Public Member Functions | |
PackageInfo () | |
bool | isValid () const |
void | setName (const QString &name) |
QString | name () const |
void | setVersion (const QString &version) |
QString | version () const |
void | setLongDescription (const QString &lang, const QString &desc) |
bool | hasLongDescription (const QString &lang) const |
QString | longDescription (const QString &lang) const |
void | setShortDescription (const QString &lang, const QString &desc) |
bool | hasShortDescription (const QString &lang) const |
QString | shortDescription (const QString &lang) const |
Private Attributes | |
QString | _name |
QString | _version |
QHash< QString, QString > | _longDescription |
QHash< QString, QString > | _shortDescription |
Definition at line 25 of file PackageInfo.h.
PackageInfo::PackageInfo | ( | ) |
Default constructor.
Definition at line 20 of file PackageInfo.cpp.
bool PackageInfo::hasLongDescription | ( | const QString & | lang | ) | const |
Returns true if there is a long description for this software package currently set for language lang.
Definition at line 67 of file PackageInfo.cpp.
References _longDescription.
Referenced by UpdatesAvailableDialog::loadPackagesTable().
bool PackageInfo::hasShortDescription | ( | const QString & | lang | ) | const |
Returns true if there is a short description of this software package currently set for language lang.
Definition at line 87 of file PackageInfo.cpp.
References _shortDescription.
Referenced by UpdatesAvailableDialog::loadPackagesTable().
bool PackageInfo::isValid | ( | ) | const |
Returns true if this PackageInfo object is valid. A valid PackageInfo object must have a name and a version number set. All other fields are optional.
Definition at line 25 of file PackageInfo.cpp.
References _name, and _version.
Referenced by UpdateProcess::readStandardError().
QString PackageInfo::longDescription | ( | const QString & | lang | ) | const |
Returns long description of this software package for language lang. If a description is not currently set for the specified language, a null QString object is returned.
Definition at line 61 of file PackageInfo.cpp.
References _longDescription.
Referenced by UpdatesAvailableDialog::loadPackagesTable().
QString PackageInfo::name | ( | ) | const |
Returns the name of this software package.
Definition at line 37 of file PackageInfo.cpp.
References _name.
Referenced by setName().
void PackageInfo::setLongDescription | ( | const QString & | lang, |
const QString & | desc | ||
) |
Sets the long description of this software package to desc for the language lang.
Definition at line 55 of file PackageInfo.cpp.
References _longDescription.
Referenced by UpdateProcess::packageInfoFromXml().
void PackageInfo::setName | ( | const QString & | name | ) |
Sets the name of this software package to name.
Definition at line 31 of file PackageInfo.cpp.
Referenced by UpdateProcess::packageInfoFromXml().
void PackageInfo::setShortDescription | ( | const QString & | lang, |
const QString & | desc | ||
) |
Sets the short description of this software package to desc for the language lang.
Definition at line 73 of file PackageInfo.cpp.
References _shortDescription.
Referenced by UpdateProcess::packageInfoFromXml().
void PackageInfo::setVersion | ( | const QString & | version | ) |
Sets the version of this software package to version.
Definition at line 43 of file PackageInfo.cpp.
References _version, and version().
Referenced by UpdateProcess::packageInfoFromXml().
QString PackageInfo::shortDescription | ( | const QString & | lang | ) | const |
Returns the short description of this software package for language lang. If a description is not currently set for the specified language, a null QString object is returned.
Definition at line 80 of file PackageInfo.cpp.
References _shortDescription.
Referenced by UpdatesAvailableDialog::loadPackagesTable().
QString PackageInfo::version | ( | ) | const |
Returns the version of this software package.
Definition at line 49 of file PackageInfo.cpp.
References _version.
Referenced by UpdatesAvailableDialog::loadPackagesTable(), and setVersion().
QHash<QString,QString> PackageInfo::_longDescription [private] |
Definition at line 88 of file PackageInfo.h.
Referenced by hasLongDescription(), longDescription(), and setLongDescription().
QString PackageInfo::_name [private] |
Definition at line 86 of file PackageInfo.h.
QHash<QString,QString> PackageInfo::_shortDescription [private] |
Definition at line 89 of file PackageInfo.h.
Referenced by hasShortDescription(), setShortDescription(), and shortDescription().
QString PackageInfo::_version [private] |
Definition at line 87 of file PackageInfo.h.
Referenced by isValid(), setVersion(), and version().