HistoryComponent class describes the component information (name, type) stored in the history. More...
#include <HistoryComponent.h>
Public Types | |
enum | Type { IMAGE_COMPONENT, MESH_COMPONENT, OTHER } |
Public Member Functions | |
Constructors | |
HistoryComponent (Component *component) | |
Construct a new History component from the input component. More... | |
Accessors | |
QString | getName () const |
Get the the name of the Component associated to this item. More... | |
Type | getType () const |
Get the Type of the Component associated to this item. More... | |
Private Attributes | |
Private properties | |
QString | name |
The name of the Component. More... | |
Type | type |
The component's Type. More... | |
HistoryComponent class describes the component information (name, type) stored in the history.
In CamiTK, every Action are stored in a history, which can be saved as a XML file.
Each history entry is an instance of HistoryItem and provides information about the processed action :
History items are mainly useful for getting back to a previous state by undoing an action or for scripting by storing in a file a pipeline of actions written in Python.
The history is stored in the Application class and uses the "construct on first use" idiom/design-pattern (with singletons).
It therefore avoids the infamous "static initialization order fiasco", see http://www.parashift.com/c++-faq/ctors.html
The different Type (of representation) of the associated Component. Use getType() to get the information about a specific HistoryComponent.
Enumerator | |
---|---|
IMAGE_COMPONENT | this Component represents a volumic image and its subcomponents can be displayed as slices. |
MESH_COMPONENT | this Component represent a 3D mesh, it has a 3D representation which can be displayed in the 3D viewer. |
OTHER | this Component has no defined representation. |
HistoryComponent::HistoryComponent | ( | Component * | component | ) |
Construct a new History component from the input component.
component | The Component associated to the HistoryComponent. |
References camitk::Component::getName(), IMAGE_COMPONENT, MESH_COMPONENT, name, OTHER, and type.
QString HistoryComponent::getName | ( | ) | const |
Get the the name of the Component associated to this item.
References name.
Referenced by camitk::Application::saveHistoryAsSXML().
HistoryComponent::Type HistoryComponent::getType | ( | ) | const |
Get the Type of the Component associated to this item.
References type.
Referenced by camitk::Application::saveHistoryAsSXML().
|
private |
The name of the Component.
Referenced by getName(), and HistoryComponent().
|
private |
The component's Type.
Type is a persistent information, stored in the XML.
Referenced by getType(), and HistoryComponent().