#include <GlacierLineHistory.h>
The modified Shape (GlacierLine or a Node it contains), location indices in the original data structures, and type of action taken are stored so a deleted or otherwise modified Shape can be restored to its previous state.
Definition at line 42 of file GlacierLineHistory.h.
Public Member Functions | |
GlacierLineHistoryElement () | |
Default constructor for an empty history element. | |
GlacierLineHistoryElement (GlacierLine &shp, int iline, int inode, HistoryAction action) | |
Constructor a new history element with information to be stored for a GlacierLine. | |
GlacierLineHistoryElement (Node &shp, int iline, int inode, HistoryAction action) | |
Constructor a new history element with information to be stored for a Node in a line. | |
virtual | ~GlacierLineHistoryElement () |
HistoryAction | getAction () |
Get/Set the action information from the history element. | |
void | setAction (HistoryAction newAction) |
Shape * | getShape () |
Get/Set the shape (GlacierLine or Node) from the history element. | |
void | setShape (GlacierLine *newShape) |
void | setShape (Node *newShape) |
int | getLineIndex () |
Get/Set the index to the line where the shape was stored from the history element. | |
void | setLineIndex (int li) |
int | getNodeIndex () |
Get/Set the index of the Node in the line where the shape was stored from the history element. | |
void | setNodeIndex (int ni) |
Private Attributes | |
Shape * | mGlacierLineComponent |
Pointer to a GlacierLine or Node. | |
int | mLineIndex |
Location in the GLIMSLineData stack of the line/node that was changed. | |
int | mNodeIndex |
Location in the GlacierLine stack where the changed node was located. | |
HistoryAction | mAction |
Action taken by user on this shape. |
GlacierLineHistoryElement::GlacierLineHistoryElement | ( | ) | [inline] |
Default constructor for an empty history element.
Definition at line 57 of file GlacierLineHistory.h.
References mAction, mGlacierLineComponent, mLineIndex, mNodeIndex, and noAction.
GlacierLineHistoryElement::GlacierLineHistoryElement | ( | GlacierLine & | shp, | |
int | iline, | |||
int | inode, | |||
HistoryAction | action | |||
) | [inline] |
Constructor a new history element with information to be stored for a GlacierLine.
shp | The shape (GlacierLine) modified by user action for which the class will store history information | |
iline | The line's original position in the line set before modificaiton | |
inode | The position of a node in the line (-1 for "not applicable) | |
action | The action taken on this line by the user to cause a history element to be stored |
Definition at line 74 of file GlacierLineHistory.h.
References mAction, mGlacierLineComponent, mLineIndex, and mNodeIndex.
GlacierLineHistoryElement::GlacierLineHistoryElement | ( | Node & | shp, | |
int | iline, | |||
int | inode, | |||
HistoryAction | action | |||
) | [inline] |
Constructor a new history element with information to be stored for a Node in a line.
shp | The shape (Node) modified by user action for which the class will store history information | |
iline | The line (referenced by index) the node belonged to before modificaiton | |
inode | The position of the node in the line | |
action | The action taken on this node by the user to cause a history element to be stored |
Definition at line 96 of file GlacierLineHistory.h.
References mAction, mGlacierLineComponent, mLineIndex, and mNodeIndex.
virtual GlacierLineHistoryElement::~GlacierLineHistoryElement | ( | ) | [inline, virtual] |
Definition at line 105 of file GlacierLineHistory.h.
HistoryAction GlacierLineHistoryElement::getAction | ( | ) | [inline] |
Get/Set the action information from the history element.
Definition at line 110 of file GlacierLineHistory.h.
References mAction.
Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().
void GlacierLineHistoryElement::setAction | ( | HistoryAction | newAction | ) | [inline] |
Definition at line 111 of file GlacierLineHistory.h.
References mAction.
Referenced by GLIMSLineData::pop().
Shape* GlacierLineHistoryElement::getShape | ( | ) | [inline] |
Get/Set the shape (GlacierLine or Node) from the history element.
Definition at line 116 of file GlacierLineHistory.h.
References mGlacierLineComponent.
Referenced by GLIMSLineData::pop().
void GlacierLineHistoryElement::setShape | ( | GlacierLine * | newShape | ) | [inline] |
Definition at line 118 of file GlacierLineHistory.h.
References mGlacierLineComponent.
Referenced by GLIMSLineData::pop(), GLIMSLineData::rejoinLine(), and GLIMSLineData::restoreJoinedLines().
void GlacierLineHistoryElement::setShape | ( | Node * | newShape | ) | [inline] |
int GlacierLineHistoryElement::getLineIndex | ( | ) | [inline] |
Get/Set the index to the line where the shape was stored from the history element.
Definition at line 133 of file GlacierLineHistory.h.
References mLineIndex.
Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().
void GlacierLineHistoryElement::setLineIndex | ( | int | li | ) | [inline] |
int GlacierLineHistoryElement::getNodeIndex | ( | ) | [inline] |
Get/Set the index of the Node in the line where the shape was stored from the history element.
If the shape is a line or the action was a selection, this will return -1.
Definition at line 140 of file GlacierLineHistory.h.
References mNodeIndex.
Referenced by GLIMSLineData::pop(), and GLIMSLineData::startMoveLineNode().
void GlacierLineHistoryElement::setNodeIndex | ( | int | ni | ) | [inline] |
Pointer to a GlacierLine or Node.
Used to hold a copy of a Shape object so it can be restored later.
Definition at line 45 of file GlacierLineHistory.h.
Referenced by getShape(), GlacierLineHistoryElement(), and setShape().
int GlacierLineHistoryElement::mLineIndex [private] |
Location in the GLIMSLineData stack of the line/node that was changed.
Definition at line 47 of file GlacierLineHistory.h.
Referenced by getLineIndex(), GlacierLineHistoryElement(), and setLineIndex().
int GlacierLineHistoryElement::mNodeIndex [private] |
Location in the GlacierLine stack where the changed node was located.
If the shape is a line or the action was a selection, the value should be -1.
Definition at line 48 of file GlacierLineHistory.h.
Referenced by getNodeIndex(), GlacierLineHistoryElement(), and setNodeIndex().
Action taken by user on this shape.
Definition at line 50 of file GlacierLineHistory.h.
Referenced by getAction(), GlacierLineHistoryElement(), and setAction().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |