Vidalia
0.3.1
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
PackageInfo.cpp
Go to the documentation of this file.
1
/*
2
** This file is part of Vidalia, and is subject to the license terms in the
3
** LICENSE file, found in the top level directory of this distribution. If you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** Vidalia source package distributed by the Vidalia Project at
6
** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7
** including this file, may be copied, modified, propagated, or distributed
8
** except according to the terms described in the LICENSE file.
9
*/
10
11
/*
12
** \file PackageInfo.cpp
13
** \brief Contains information about a single available updated software
14
** package.
15
*/
16
17
#include "Packageinfo.h"
18
19
20
PackageInfo::PackageInfo
()
21
{
22
}
23
24
bool
25
PackageInfo::isValid
()
const
26
{
27
return
(!
_name
.isEmpty() && !
_version
.isEmpty());
28
}
29
30
void
31
PackageInfo::setName
(
const
QString &name)
32
{
33
_name
=
name
;
34
}
35
36
QString
37
PackageInfo::name
()
const
38
{
39
return
_name
;
40
}
41
42
void
43
PackageInfo::setVersion
(
const
QString &version)
44
{
45
_version
=
version
;
46
}
47
48
QString
49
PackageInfo::version
()
const
50
{
51
return
_version
;
52
}
53
54
void
55
PackageInfo::setLongDescription
(
const
QString &lang,
const
QString &desc)
56
{
57
_longDescription
.insert(lang, desc);
58
}
59
60
QString
61
PackageInfo::longDescription
(
const
QString &lang)
const
62
{
63
return
_longDescription
.value(lang);
64
}
65
66
bool
67
PackageInfo::hasLongDescription
(
const
QString &lang)
const
68
{
69
return
_longDescription
.contains(lang);
70
}
71
72
void
73
PackageInfo::setShortDescription
(
const
QString &lang,
const
QString &desc)
74
{
75
_shortDescription
.insert(lang, desc);
76
}
77
78
79
QString
80
PackageInfo::shortDescription
(
const
QString &lang)
const
81
{
82
return
_shortDescription
.value(lang);
83
}
84
85
86
bool
87
PackageInfo::hasShortDescription
(
const
QString &lang)
const
88
{
89
return
_shortDescription
.contains(lang);
90
}
91
Generated on Mon Jan 14 2013 08:44:27 for Vidalia by
1.8.3