HaikuDepot: Added ability to store screenshots in PackageInfo.
This commit is contained in:
parent
168c3c8b34
commit
9ecd9f0294
@ -373,7 +373,8 @@ PackageInfo::PackageInfo()
|
||||
fShortDescription(),
|
||||
fFullDescription(),
|
||||
fChangelog(),
|
||||
fUserRatings()
|
||||
fUserRatings(),
|
||||
fScreenshots()
|
||||
{
|
||||
}
|
||||
|
||||
@ -390,7 +391,8 @@ PackageInfo::PackageInfo(const BitmapRef& icon, const BString& title,
|
||||
fShortDescription(shortDescription),
|
||||
fFullDescription(fullDescription),
|
||||
fChangelog(changelog),
|
||||
fUserRatings()
|
||||
fUserRatings(),
|
||||
fScreenshots()
|
||||
{
|
||||
}
|
||||
|
||||
@ -404,7 +406,8 @@ PackageInfo::PackageInfo(const PackageInfo& other)
|
||||
fShortDescription(other.fShortDescription),
|
||||
fFullDescription(other.fFullDescription),
|
||||
fChangelog(other.fChangelog),
|
||||
fUserRatings(other.fUserRatings)
|
||||
fUserRatings(other.fUserRatings),
|
||||
fScreenshots(other.fScreenshots)
|
||||
{
|
||||
}
|
||||
|
||||
@ -420,6 +423,7 @@ PackageInfo::operator=(const PackageInfo& other)
|
||||
fFullDescription = other.fFullDescription;
|
||||
fChangelog = other.fChangelog;
|
||||
fUserRatings = other.fUserRatings;
|
||||
fScreenshots = other.fScreenshots;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -434,7 +438,8 @@ PackageInfo::operator==(const PackageInfo& other) const
|
||||
&& fShortDescription == other.fShortDescription
|
||||
&& fFullDescription == other.fFullDescription
|
||||
&& fChangelog == other.fChangelog
|
||||
&& fUserRatings == other.fUserRatings;
|
||||
&& fUserRatings == other.fUserRatings
|
||||
&& fScreenshots == other.fScreenshots;
|
||||
}
|
||||
|
||||
|
||||
@ -494,6 +499,13 @@ PackageInfo::CalculateRatingSummary() const
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
PackageInfo::AddScreenshot(const BitmapRef& screenshot)
|
||||
{
|
||||
return fScreenshots.Add(screenshot);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
|
@ -42,6 +42,7 @@ private:
|
||||
|
||||
|
||||
typedef BReference<SharedBitmap> BitmapRef;
|
||||
typedef List<BitmapRef, false> BitmapList;
|
||||
|
||||
|
||||
class UserInfo {
|
||||
@ -181,6 +182,11 @@ public:
|
||||
|
||||
RatingSummary CalculateRatingSummary() const;
|
||||
|
||||
bool AddScreenshot(const BitmapRef& screenshot);
|
||||
|
||||
const BitmapList& Screenshots() const
|
||||
{ return fScreenshots; }
|
||||
|
||||
private:
|
||||
BitmapRef fIcon;
|
||||
BString fTitle;
|
||||
@ -190,6 +196,7 @@ private:
|
||||
BString fFullDescription;
|
||||
BString fChangelog;
|
||||
UserRatingList fUserRatings;
|
||||
BitmapList fScreenshots;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user