GuiState Class Reference

Class encapsulating state of an object in the data model. More...

#include <kitmodel.hpp>

Inheritance diagram for GuiState:

ModelCategory ModelItem

List of all members.

Public Member Functions

 GuiState ()
bool is_dirty ()
void set_dirty (bool dirty=true)
bool is_deleted ()
void set_deleted (bool deleted)
void set_new_flag (bool flag)
bool is_new ()
virtual void reset ()
 resets the state of each flag to it's default.

Protected Attributes

bool m_dirty
bool m_deleted
bool m_new


Detailed Description

Class encapsulating state of an object in the data model.

Provides additional flags to identityf whether the object is dirty, has been deleted or is new.

Definition at line 38 of file kitmodel.hpp.


Constructor & Destructor Documentation

GuiState::GuiState (  )  [inline]

Definition at line 44 of file kitmodel.hpp.


Member Function Documentation

bool GuiState::is_dirty (  )  [inline]

Definition at line 45 of file kitmodel.hpp.

References m_dirty.

void GuiState::set_dirty ( bool  dirty = true  )  [inline]

bool GuiState::is_deleted (  )  [inline]

void GuiState::set_deleted ( bool  deleted  )  [inline]

Definition at line 48 of file kitmodel.hpp.

References m_deleted.

Referenced by Service::delete_category(), and Service::delete_item().

void GuiState::set_new_flag ( bool  flag  )  [inline]

Definition at line 49 of file kitmodel.hpp.

References m_new.

Referenced by Service::create_category(), and Service::create_item().

bool GuiState::is_new (  )  [inline]

Definition at line 50 of file kitmodel.hpp.

References m_new.

void GuiState::reset (  )  [virtual]

resets the state of each flag to it's default.

The dirty, deleted and new flags are set to false.

Reimplemented in ModelCategory.

Definition at line 36 of file kitmodel.cpp.

References m_deleted, m_dirty, and m_new.

Referenced by KitModel::reset(), and ModelCategory::reset().


Member Data Documentation

bool GuiState::m_dirty [protected]

Definition at line 40 of file kitmodel.hpp.

Referenced by is_dirty(), reset(), and set_dirty().

bool GuiState::m_deleted [protected]

Definition at line 41 of file kitmodel.hpp.

Referenced by is_deleted(), reset(), and set_deleted().

bool GuiState::m_new [protected]

Definition at line 42 of file kitmodel.hpp.

Referenced by is_new(), reset(), and set_new_flag().


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

Copyright 2008-2010 Frank Dean