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