HaikuDepot: Make categories also accessible as List in Model

This commit is contained in:
Stephan Aßmus
2013-08-10 20:37:06 +02:00
parent f75ec10dc6
commit 633ed4c48e
2 changed files with 12 additions and 0 deletions
+7
View File
@@ -38,6 +38,13 @@ Model::Model()
BitmapRef(), BitmapRef(),
B_TRANSLATE("Command line"), "command-line"), true) B_TRANSLATE("Command line"), "command-line"), true)
{ {
// Don't forget to add new categories to this list:
fCategories.Add(fCategoryAudio);
fCategories.Add(fCategoryVideo);
fCategories.Add(fCategoryGraphics);
fCategories.Add(fCategoryProductivity);
fCategories.Add(fCategoryDevelopment);
fCategories.Add(fCategoryCommandLine);
} }
+5
View File
@@ -32,6 +32,9 @@ public:
const CategoryRef& CategoryCommandLine() const const CategoryRef& CategoryCommandLine() const
{ return fCategoryCommandLine; } { return fCategoryCommandLine; }
const CategoryList& Categories() const
{ return fCategories; }
private: private:
BString fSearchTerms; BString fSearchTerms;
@@ -44,6 +47,8 @@ private:
CategoryRef fCategoryDevelopment; CategoryRef fCategoryDevelopment;
CategoryRef fCategoryCommandLine; CategoryRef fCategoryCommandLine;
// TODO: More categories // TODO: More categories
CategoryList fCategories;
}; };