ModelCategory Class Reference

Represents a Category combined with GuiState attributes. More...

#include <kitmodel.hpp>

Inheritance diagram for ModelCategory:

Category GuiState

List of all members.

Public Member Functions

 ModelCategory ()
 ~ModelCategory ()
virtual ModelItemContainerget_model_items ()
virtual ItemContainerget_items ()
 Returns the list of items belonging to the Category.
virtual ItemMapget_removed_children ()
 Returns a list of items that have been removed from the Category.
virtual ItemMapget_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

ItemMapm_removed_children
 List of items removed from the Category.
ItemMapm_added_children
 List of items added to the Category.

Friends

class KitModel


Detailed Description

Represents a Category combined with GuiState attributes.

Definition at line 94 of file kitmodel.hpp.


Constructor & Destructor Documentation

ModelCategory::ModelCategory (  ) 

Definition at line 43 of file kitmodel.cpp.

References m_added_children, and m_removed_children.

ModelCategory::~ModelCategory (  ) 

Definition at line 49 of file kitmodel.cpp.

References m_added_children, and m_removed_children.


Member Function Documentation

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_items().

virtual ItemMap* ModelCategory::get_removed_children (  )  [inline, virtual]

Returns a list of items that have been removed from the Category.

Definition at line 106 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 108 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().


Friends And Related Function Documentation

friend class KitModel [friend]

Reimplemented from Category.

Definition at line 114 of file kitmodel.hpp.


Member Data Documentation

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().

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().


The documentation for this class was generated from the following files:

Copyright 2008, 2009 Frank Dean