Skip to content

Commit

Permalink
HaikuDepot: Make categories also accessible as List in Model
Browse files Browse the repository at this point in the history
  • Loading branch information
stippi committed Aug 10, 2013
1 parent f75ec10 commit 633ed4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/apps/haiku-depot/Model.cpp
Expand Up @@ -38,6 +38,13 @@ Model::Model()
BitmapRef(),
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);
}


Expand Down
5 changes: 5 additions & 0 deletions src/apps/haiku-depot/Model.h
Expand Up @@ -32,6 +32,9 @@ class Model {
const CategoryRef& CategoryCommandLine() const
{ return fCategoryCommandLine; }

const CategoryList& Categories() const
{ return fCategories; }

private:
BString fSearchTerms;

Expand All @@ -44,6 +47,8 @@ class Model {
CategoryRef fCategoryDevelopment;
CategoryRef fCategoryCommandLine;
// TODO: More categories

CategoryList fCategories;
};


Expand Down

0 comments on commit 633ed4c

Please sign in to comment.