diff options
| author | Tannin <devnull@localhost> | 2013-03-22 18:46:40 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-03-22 18:46:40 +0100 |
| commit | 0a19f0433992be5f9791c8869380d09cd06b66b8 (patch) | |
| tree | 12399954f7c1156ed1cacb24dac3a8574a513e7f /src/categories.cpp | |
| parent | 8b4e11060b37ad70754aa665ad59744eadd2dd1e (diff) | |
- support for grouping filters for mod list (incomplete)
- offering multiple options for mod names during installation
- support for renaming profiles
- updated installer plugins
- minor bugfixes
Diffstat (limited to 'src/categories.cpp')
| -rw-r--r-- | src/categories.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/categories.cpp b/src/categories.cpp index f8bc3530..7b765afe 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -144,6 +144,18 @@ void CategoryFactory::saveCategories() } +unsigned int CategoryFactory::countCategories(std::tr1::function<bool (const Category &category)> filter) +{ + unsigned int result = 0; + for (auto iter = m_Categories.begin(); iter != m_Categories.end(); ++iter) { + if (filter(*iter)) { + ++result; + } + } + return result; +} + + void CategoryFactory::addCategory(int id, const QString &name, const std::vector<int> &nexusIDs, int parentID) { int index = m_Categories.size(); |
