#include <kitmodel.hpp>
Public Member Functions | |
ModelCategory () | |
~ModelCategory () | |
virtual ModelItemContainer * | get_model_items () |
virtual ItemContainer * | get_items () |
Returns the list of items belonging to the Category. | |
virtual ItemContainer * | get_items (ItemFunctor &functor) |
Returns the list of items belonging to the Category, filtered by the passed functor. | |
virtual ItemMap * | get_removed_children () |
Returns a list of items that have been removed from the Category. | |
virtual ItemMap * | get_added_children () |
Returns a list of items that have been added to the Category. | |
virtual void | add_item (Item *) |
Adds the passed item to this ModelCategory. | |
virtual void | remove_item (Item *item) |
Removes the passed item from this ModelCategory. | |
virtual void | remove_items (ModelItemContainer *items) |
Removes all the passed items from this ModelCategory. | |
virtual void | reset () |
Resets the Category state. | |
virtual void | purge () |
Protected Attributes | |
ItemMap * | m_removed_children |
List of items removed from the Category. | |
ItemMap * | m_added_children |
List of items added to the Category. | |
Friends | |
class | KitModel |
Definition at line 94 of file kitmodel.hpp.
ModelCategory::ModelCategory | ( | ) |
ModelCategory::~ModelCategory | ( | ) |
ModelItemContainer * ModelCategory::get_model_items | ( | ) | [virtual] |
Returns the list of items belonging to the Category.
Items flagged as deleted are excluded.
Definition at line 134 of file kitmodel.cpp.
References GuiState::is_deleted(), and Category::m_items.
ItemContainer * ModelCategory::get_items | ( | ) | [virtual] |
Returns the list of items belonging to the Category.
Items flagged as deleted are excluded.
Definition at line 151 of file kitmodel.cpp.
References GuiState::is_deleted(), and Category::m_items.
Referenced by Service::get_filtered_items(), and Service::get_items().
ItemContainer * ModelCategory::get_items | ( | ItemFunctor & | functor | ) | [virtual] |
Returns the list of items belonging to the Category, filtered by the passed functor.
Items flagged as deleted are excluded.
functor | if the operator() method returns true the item is included in the returned list. |
Definition at line 172 of file kitmodel.cpp.
References GuiState::is_deleted(), and Category::m_items.
virtual ItemMap* ModelCategory::get_removed_children | ( | ) | [inline, virtual] |
Returns a list of items that have been removed from the Category.
Definition at line 107 of file kitmodel.hpp.
References m_removed_children.
virtual ItemMap* ModelCategory::get_added_children | ( | ) | [inline, virtual] |
Returns a list of items that have been added to the Category.
Definition at line 109 of file kitmodel.hpp.
References m_added_children.
void ModelCategory::add_item | ( | Item * | item | ) | [virtual] |
Adds the passed item to this ModelCategory.
Also updates the lists of removed and added items.
Reimplemented from Category.
Definition at line 88 of file kitmodel.cpp.
References Category::add_item(), Item::get_id(), m_added_children, and m_removed_children.
Referenced by KitModel::add_item(), KitModel::copy_items(), and KitParser::process_category_item().
void ModelCategory::remove_item | ( | Item * | item | ) | [virtual] |
Removes the passed item from this ModelCategory.
Also updates the lists of removed and added items.
Reimplemented from Category.
Definition at line 106 of file kitmodel.cpp.
References Item::get_id(), m_added_children, m_removed_children, and Category::remove_item().
Referenced by remove_items().
void ModelCategory::remove_items | ( | ModelItemContainer * | items | ) | [virtual] |
Removes all the passed items from this ModelCategory.
Also updates the lists of removed and added items.
Definition at line 122 of file kitmodel.cpp.
References remove_item().
Referenced by KitListGui::on_menu_cut().
void ModelCategory::reset | ( | ) | [virtual] |
Resets the Category state.
Removes any items flagged as deleted. Sets the GuiState to it's defaults and clears the lists of added and removed items.
Reimplemented from GuiState.
Definition at line 61 of file kitmodel.cpp.
References m_added_children, m_removed_children, and GuiState::reset().
Referenced by KitModel::reset().
void ModelCategory::purge | ( | ) | [virtual] |
Definition at line 68 of file kitmodel.cpp.
References Category::m_items.
Referenced by KitModel::purge().
friend class KitModel [friend] |
ItemMap* ModelCategory::m_removed_children [protected] |
List of items removed from the Category.
Definition at line 97 of file kitmodel.hpp.
Referenced by add_item(), get_removed_children(), ModelCategory(), remove_item(), reset(), and ~ModelCategory().
ItemMap* ModelCategory::m_added_children [protected] |
List of items added to the Category.
Definition at line 99 of file kitmodel.hpp.
Referenced by add_item(), get_added_children(), ModelCategory(), remove_item(), reset(), and ~ModelCategory().