#include <glimslinedata.h>
These mappings are integer indices into LineDefSet which is local and the set of GIDs that is stored in GLIMSGIDData. This provides routines for modifying the lines it contains as well as routines for bulk import.
Definition at line 51 of file glimslinedata.h.
Public Types | |
enum | ShapeType { POINT, LINE, POLY } |
Public Slots | |
void | transformDataset () |
Signals | |
void | datasetChanged () |
Public Member Functions | |
GLIMSLineData () | |
virtual bool | toXML (QDomDocument &doc, QDomElement &elem, std::string id="") |
Write Glacier Line information to the XML project file. | |
virtual bool | fromXML (QDomElement &elem) |
Read Glacier Line information from XML project file. | |
void | setDefGID (int gid) |
Set default Glacier ID. | |
void | setDefLDF (int ldf) |
Set default Line Definition. | |
void | setLDF (int iline, int ildf) |
Set Line Definition at index ildf in Line Definition Set to be associated to the line at index iline in the mXYSet and mLLSet. | |
void | setGID (int iline, int igid) |
Set the Glacier ID at index igid to be associated to the line at index iline in the mXYSet and mLLSet. | |
virtual void | addLine (Node &xynode) |
Create a new GlacierLine using the Node as the starting point. | |
virtual void | restoreLine (GlacierLine &line, int iline=-1) |
Restore a deleted GlacierLine. | |
virtual void | delLine (int iline) |
Delete an entire line. | |
virtual void | removeLine (int iline) |
Remove an entire line without history. | |
virtual void | breakLine (int iline, int inode) |
Break the line at index iline at the node at index inode into two lines. | |
virtual void | restoreJoinedLines (GlacierLine &line1, int iline1, GlacierLine &line2, int iline2, GlacierLineHistoryElement *h1, GlacierLineHistoryElement *h2) |
Undo a joinLine, restoring the original lines. | |
virtual void | joinLine (int il1, int il2, int in1, int in2) |
Join two lines into a single line. | |
virtual void | rejoinLine (GlacierLine &originalLine, int il1, int il2, GlacierLineHistoryElement *h1, GlacierLineHistoryElement *h2) |
Rejoin the two lines at indices il1 and il2 at the nodes at indices in1 and in2 into a single line. | |
virtual void | addLineNode (Node &node, int iline, int inode=-1) |
Add a Node to the line at index iline. | |
virtual void | restoreLineNode (Node &node, int iline, int inode) |
Restore a deleted Node to the line at index iline. | |
virtual void | delLineNode (int iline, int inode) |
Delete the Node at index inode in the line at index iline. | |
virtual void | removeLineNode (int iline, int inode) |
Remove the Node at index inode in the line at index iline without recording history information. | |
virtual void | moveLineNode (int iline, int inode, Node &xynode) |
Move the Node at index inode in the line at index iline to a new location relative to the base image. | |
virtual void | startMoveLineNode (int iline, int inode, Node &xynode) |
Push history information for moving the Node at index inode in the line at index iline to a new location relative to the base image. | |
virtual void | restoreMovedLineNode (int iline, int inode, Node &xynode) |
Restores a moved Node at index inode in the line at index iline to its original location, captured in xynode. | |
virtual void | insertLineNode (Node &node, int iline, int inode=-1) |
Insert a Node to the line at index iline. | |
virtual void | reinsertLineNode (Node &node, int iline, int inode=-1) |
Reinsert a deleted Node to the line at index iline. | |
virtual void | pop () |
Undo for GLIMSLineData implemented by making the top of the stack the current state, then popping the stacks so the top of the stacks are the previous state. | |
virtual void | redo () |
Redo for GLIMSLineData implemented by making the moving a history element from the redo stack to the current state and the undo stack. | |
virtual void | push () |
Saves the current selection state onto the selection set undo stack as part of history and undo functionality. | |
virtual void | pushSelection () |
Causes a history item to be recorded for a user selection/deselection of lines and/or nodes. | |
virtual void | addLineNodeLL (Node &n, int iline, int inode=-1) |
Add a node to line at position inode in line stored at iline, where the node was built using lat-lon instead of XY coordinates. | |
virtual void | addLineLL (Node &n) |
Add a line with a starting node built using lat-lon instead of XY. | |
virtual void | addLineSetLL (std::vector< GlacierLine > &glset) |
Add a line set built using lat-lon instead of XY. | |
void | addLDF (LineDef &ldf) |
Add a line definition, which contains metadata specific to the feature types it is designed to describe. | |
void | loadDefaultSet () |
Load the default line definition set. | |
LineDefSet & | getLDFSet () |
Get the default line definition set. | |
GlacierLine * | toXY (GlacierLine *gl) |
Get the XY coordinate version of the GlacierLine at gl, which is built with lat-lon coordinate information. | |
bool | validate (ValidationReport *valRep) |
Check that all lines have an associated glacier id, line definition, and at least 4 vertices. | |
virtual void | delNode (int) |
virtual void | moveNode (Node &, int=-1) |
virtual void | insertNode (Node &, int) |
virtual void | addNode (Node &, int=-1) |
void | setImage (Image *img) |
ShapeType | getType () |
std::vector< Shape * > & | getXYSet () |
std::vector< Shape * > & | getLLSet () |
unsigned int | size () |
SelectionSet & | getSelSet () |
virtual bool | toXMLFile (std::string fname, std::string docname) |
virtual bool | fromXMLFile (std::string fname, std::string docname) |
virtual void | setCurrentVersion (std::string versionString) |
virtual void | setCurrentVersion (QDate versionQDate) |
virtual QDate | getCurrentVersion () |
virtual std::string | getCurrentVersionStr () |
Protected Member Functions | |
void | setAttr (int iline) |
void | pop (GlacierLineHistory *historyUndo, GlacierLineHistory *historyRedo, std::stack< SelectionSet > *selSetUndo, std::stack< SelectionSet > *selSetRedo) |
Generic Un/Redo for GLIMSLineData implemented by making the top of the "undo" stack the current state, popping the stacks so the top of the stacks are the previous state and pushing that to the "redo" stack. | |
virtual bool | writeTextTag (QDomDocument &doc, QDomElement &elem, std::string tagName, std::string text, std::string id="") |
virtual bool | writeIntTag (QDomDocument &doc, QDomElement &elem, std::string tagName, int val, std::string id="") |
virtual bool | writeDoubleTag (QDomDocument &doc, QDomElement &elem, std::string tagName, double val, std::string id="") |
virtual std::string | readTextTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual int | readIntTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual double | readDoubleTag (QDomElement elem, std::string tagName="", std::string id="") |
virtual QDomElement | createBaseTag (QDomDocument &doc, QDomElement &elem, std::string id, std::string tagName) |
virtual QDomElement | getElemByTagName (QDomElement &elem, std::string name) |
virtual std::string | qDateToString (const QDate *aQDate) |
virtual bool | stringToQDate (const std::string aStrDate, QDate *aQDate) |
virtual std::string | qDateTimeToString (const QDateTime *aQDateTime) |
virtual bool | stringToQDateTime (const std::string aStrDateTime, QDateTime *aQDateTime) |
Protected Attributes | |
int | mDefGID |
Default Glacier ID. | |
int | mDefLDF |
Default Line Definition. | |
LineDefSet | mLDFSet |
Set of Line Definitions. | |
GlacierLineHistory | mHistory |
History of actions taken on GlacierLines. | |
GlacierLineHistory | mRedoHistory |
History of actions popped off the history stack. | |
std::vector< Shape * > | mLLSet |
std::vector< Shape * > | mXYSet |
SelectionSet | mSelSet |
std::stack< std::vector< Shape * > > | mUndoLL |
std::stack< std::vector< Shape * > > | mUndoXY |
std::stack< SelectionSet > | mUndoSel |
std::stack< std::vector< Shape * > > | mRedoLL |
std::stack< std::vector< Shape * > > | mRedoXY |
std::stack< SelectionSet > | mRedoSel |
ShapeType | mType |
Image * | mImg |
QDate | mCurrentVersion |
enum VectorData::ShapeType [inherited] |
GLIMSLineData::GLIMSLineData | ( | ) |
Definition at line 5 of file glimslinedata.cpp.
void GLIMSLineData::setAttr | ( | int | iline | ) | [protected] |
void GLIMSLineData::pop | ( | GlacierLineHistory * | historyUndo, | |
GlacierLineHistory * | historyRedo, | |||
std::stack< SelectionSet > * | selSetUndo, | |||
std::stack< SelectionSet > * | selSetRedo | |||
) | [protected] |
Generic Un/Redo for GLIMSLineData implemented by making the top of the "undo" stack the current state, popping the stacks so the top of the stacks are the previous state and pushing that to the "redo" stack.
Whether this is an "undo" or a "redo" depends on the order the mHistory and mRedoHistory stacks (and associated selection set stacks) are put into the function parameters.
Usage
Actions stored in doubles (e.g. join line, break line) will have their two elements reversed when they're pushed to "redo" stack so that the order of the elements is maintained no matter what.
historyUndo | The history stack to be popped | |
historyRedo | The history stack to have the popped history pushed to | |
selSetUndo | The selection stack to popped | |
selSetRedo | The selection stack to have the popped selection pushed to |
Definition at line 621 of file glimslinedata.cpp.
References addedLine, addedNode, brokeLine, SelectionSet::clear(), deletedLine, deletedNode, GlacierLineHistoryElement::getAction(), GlacierLineHistoryElement::getLineIndex(), GlacierLineHistoryElement::getNodeIndex(), GlacierLineHistoryElement::getShape(), insertedNode, joinedLines, mHistory, movedNode, VectorData::mSelSet, VectorData::mXYSet, GlacierLineHistory::peek(), GlacierLineHistory::pop(), GlacierLineHistory::push(), rejoinLine(), removeLine(), removeLineNode(), restoreJoinedLines(), restoreLine(), restoreLineNode(), restoreMovedLineNode(), selection, GlacierLineHistoryElement::setAction(), GlacierLineHistoryElement::setShape(), and GlacierLineHistory::size().
bool GLIMSLineData::toXML | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id = "" | |||
) | [virtual] |
Write Glacier Line information to the XML project file.
Implements SimpleLineData.
Definition at line 11 of file glimslinedata.cpp.
References mLDFSet, VectorData::mLLSet, GlacierLine::toXML(), and LineDefSet::toXML().
Referenced by GLIMSDataset::toXML().
bool GLIMSLineData::fromXML | ( | QDomElement & | elem | ) | [virtual] |
Read Glacier Line information from XML project file.
Implements SimpleLineData.
Definition at line 28 of file glimslinedata.cpp.
References GLIMSGlobals::AVAILCOLORS, DspAttr::color, VectorData::datasetChanged(), GlacierLine::fromXML(), LineDefSet::fromXML(), Shape::mAttr, GlacierLine::mLDF, mLDFSet, VectorData::mLLSet, VectorData::mXYSet, DspAttr::style, VectorData::transformDataset(), and DspAttr::width.
Referenced by GLIMSDataset::fromXML().
void GLIMSLineData::setDefGID | ( | int | gid | ) | [inline] |
Set default Glacier ID.
Definition at line 106 of file glimslinedata.h.
References mDefGID.
Referenced by GlacierIDChooserDlg::setSelectedGID(), and GlacierConfigDlg::setSelectedGID().
void GLIMSLineData::setDefLDF | ( | int | ldf | ) | [inline] |
Set default Line Definition.
Definition at line 113 of file glimslinedata.h.
References mDefLDF.
Referenced by LineSelectorDlg::makeDefaultLineDef().
void GLIMSLineData::setLDF | ( | int | iline, | |
int | ildf | |||
) |
Set Line Definition at index ildf in Line Definition Set to be associated to the line at index iline in the mXYSet and mLLSet.
Definition at line 835 of file glimslinedata.cpp.
References GLIMSGlobals::AVAILCOLORS, DspAttr::color, VectorData::datasetChanged(), Shape::getAttr(), GlacierLine::mLDF, mLDFSet, VectorData::mLLSet, VectorData::mXYSet, LineDefSet::size(), DspAttr::style, and DspAttr::width.
Referenced by LineSelectorDlg::changeCurLine(), GLIMSProject::importGLIMSIngestData(), and GLIMSProject::importSegmentsFromShapefile().
void GLIMSLineData::setGID | ( | int | iline, | |
int | igid | |||
) |
Set the Glacier ID at index igid to be associated to the line at index iline in the mXYSet and mLLSet.
Definition at line 853 of file glimslinedata.cpp.
References VectorData::datasetChanged(), GlacierLine::mGID, VectorData::mLLSet, and VectorData::mXYSet.
Referenced by GLIMSProject::importGLIMSIngestData(), GLIMSProject::importSegmentsFromShapefile(), and GlacierIDChooserDlg::setCurLines().
void GLIMSLineData::addLine | ( | Node & | xynode | ) | [virtual] |
Create a new GlacierLine using the Node as the starting point.
xynode | The starting point of the line, containing the XY coordinates of the image where the user clicked |
Implements SimpleLineData.
Definition at line 68 of file glimslinedata.cpp.
References addedLine, GLIMSGlobals::AVAILCOLORS, GlacierLineHistory::clear(), DspAttr::color, VectorData::datasetChanged(), Image::getLL(), LineDef::mColor, mDefGID, mDefLDF, mHistory, VectorData::mImg, mLDFSet, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, LineDef::mStyle, VectorData::mUndoSel, LineDef::mWidth, VectorData::mXYSet, Line::nodeset(), GlacierLineHistory::push(), Line::setAttr(), DspAttr::style, DspAttr::width, Node::x, and Node::y.
Referenced by addLineLL().
void GLIMSLineData::restoreLine | ( | GlacierLine & | line, | |
int | iline = -1 | |||
) | [virtual] |
Restore a deleted GlacierLine.
line | A line containing nodes with XY coordinates. Lat/Lon coordinates will be calculated as the line is added to the line set. No history information will be recorded by this function. | |
iline | Position in the line set to insert the line. If the default of -1 is taken, the line will be added to the end of the line set. |
Definition at line 101 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, and Line::size().
Referenced by pop().
void GLIMSLineData::delLine | ( | int | iline | ) | [virtual] |
Delete an entire line.
iline | The index of the line of the line to be deleted in the vector "sets" of line data mXYSet and mLLSet |
Implements SimpleLineData.
Definition at line 130 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), deletedLine, mHistory, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, and GlacierLineHistory::push().
Referenced by delLineNode().
void GLIMSLineData::removeLine | ( | int | iline | ) | [virtual] |
Remove an entire line without history.
Intended for use as an undo to addLine
iline | The index of the line of the line to be deleted in the vector "sets" of line data mXYSet and mLLSet |
Definition at line 144 of file glimslinedata.cpp.
References VectorData::mLLSet, and VectorData::mXYSet.
Referenced by joinLine(), pop(), rejoinLine(), and removeLineNode().
void GLIMSLineData::breakLine | ( | int | iline, | |
int | inode | |||
) | [virtual] |
Break the line at index iline at the node at index inode into two lines.
The node at inode will be duplicated as the ending point of one line and the starting point of the next.
iline | The index of the line of the line to be broken in the vector "sets" of line data mXYSet and mLLSet | |
inode | The index of the node where the line is to be broken |
Implements SimpleLineData.
Definition at line 152 of file glimslinedata.cpp.
References brokeLine, GlacierLineHistory::clear(), VectorData::datasetChanged(), Line::delNode(), GlacierLine::mGID, mHistory, GlacierLine::mLDF, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, Line::nodeset(), GlacierLineHistory::push(), and Line::size().
void GLIMSLineData::restoreJoinedLines | ( | GlacierLine & | line1, | |
int | iline1, | |||
GlacierLine & | line2, | |||
int | iline2, | |||
GlacierLineHistoryElement * | h1, | |||
GlacierLineHistoryElement * | h2 | |||
) | [virtual] |
Undo a joinLine, restoring the original lines.
Break the line at index iline at the node at index inode in order to restore the two original lines made into a single line by a join. The node at inode will be duplicated as the ending point of one line and the starting point of the next. No history information is stored. This is intended to be used as an undo function for joinLines.
line1 | Copy of the original line 1 before the join | |
line2 | Copy of the original line 2 before the join | |
iline1 | The index of line 1 to be restored. This line became the joined line. | |
iline2 | The index of line 2 to be restored. This line was removed from the active dataset after its vertices/nodes were added to line 1. | |
h1 | History associated with line 1 | |
h2 | History associated with line 2 |
Definition at line 205 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, Line::nodeset(), GlacierLineHistoryElement::setShape(), and Line::size().
Referenced by pop().
void GLIMSLineData::joinLine | ( | int | il1, | |
int | il2, | |||
int | in1, | |||
int | in2 | |||
) | [virtual] |
Join two lines into a single line.
Join the two lines at indices il1 and il2 at the nodes at indices in1 and in2 into a single line
il1 | The index of the first line to be joined | |
il2 | The index of the second line to be joined | |
in1 | The index of the node in the first line to be joined | |
in2 | The index of the node in the second line to be joined |
Implements SimpleLineData.
Definition at line 265 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), VectorData::datasetChanged(), joinedLines, mHistory, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, Line::nodeset(), GlacierLineHistory::push(), removeLine(), and Line::size().
void GLIMSLineData::rejoinLine | ( | GlacierLine & | originalLine, | |
int | il1, | |||
int | il2, | |||
GlacierLineHistoryElement * | h1, | |||
GlacierLineHistoryElement * | h2 | |||
) | [virtual] |
Rejoin the two lines at indices il1 and il2 at the nodes at indices in1 and in2 into a single line.
No history information is saved. Intended to be used as an undo function for breakLine.
originalLine | The original line before modified by the break | |
il1 | The index of the original line, modified by break | |
il2 | The index of the new line created from the break | |
h1 | History associated with line 1 | |
h2 | History associated with line 2 |
Definition at line 318 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, Line::nodeset(), removeLine(), GlacierLineHistoryElement::setShape(), and Line::size().
Referenced by pop().
void GLIMSLineData::addLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode = -1 | |||
) | [virtual] |
Add a Node to the line at index iline.
If inode is greater than 0, the Node will be inserted in the line after that index. If inode is -1, the Node will be added to the end of the line.
node | Node to be added to the line at index iline | |
iline | Index of the line to be added to | |
inode | Index of the Node to insert the new Node after |
Implements SimpleLineData.
Definition at line 362 of file glimslinedata.cpp.
References VectorData::datasetChanged(), and insertLineNode().
Referenced by addLineNodeLL().
void GLIMSLineData::restoreLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode | |||
) | [virtual] |
Restore a deleted Node to the line at index iline.
If inode is greater than 0, the Node will be inserted in the line after that index. If inode is -1, the Node will be added to the end of the line. No history information will be recorded.
node | Node to be added to the line at index iline | |
iline | Index of the line to be added to | |
inode | Index of the Node to insert the new Node after |
Definition at line 376 of file glimslinedata.cpp.
References VectorData::datasetChanged(), and reinsertLineNode().
Referenced by pop().
void GLIMSLineData::delLineNode | ( | int | iline, | |
int | inode | |||
) | [virtual] |
Delete the Node at index inode in the line at index iline.
iline | The index of the line containing the Node to be removed | |
inode | The index of the Node to remove |
Implements SimpleLineData.
Definition at line 391 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), VectorData::datasetChanged(), deletedNode, delLine(), Line::delNode(), mHistory, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, GlacierLineHistory::push(), and Line::size().
void GLIMSLineData::removeLineNode | ( | int | iline, | |
int | inode | |||
) | [virtual] |
Remove the Node at index inode in the line at index iline without recording history information.
Intended for use with history to remove an added node.
iline | The index of the line containing the Node to be removed | |
inode | The index of the Node to remove |
Definition at line 413 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Line::delNode(), VectorData::mLLSet, VectorData::mXYSet, removeLine(), and Line::size().
Referenced by pop().
void GLIMSLineData::moveLineNode | ( | int | iline, | |
int | inode, | |||
Node & | xynode | |||
) | [virtual] |
Move the Node at index inode in the line at index iline to a new location relative to the base image.
iline | The index of the line containing the Node to be moved | |
inode | The index of the Node to move | |
xynode | A copy of the node to be moved with modified position information. The attributes of xynode will be copied to the node to be moved. |
Implements SimpleLineData.
Definition at line 430 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, startMoveLineNode(), Node::x, and Node::y.
void GLIMSLineData::startMoveLineNode | ( | int | iline, | |
int | inode, | |||
Node & | xynode | |||
) | [virtual] |
Push history information for moving the Node at index inode in the line at index iline to a new location relative to the base image.
iline | The index of the line containing the Node to be moved | |
inode | The index of the Node to move | |
xynode | A copy of the original node before it was moved. The attributes of xynode will be stored before moving. |
Definition at line 457 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), GlacierLineHistoryElement::getAction(), GlacierLineHistoryElement::getLineIndex(), GlacierLineHistoryElement::getNodeIndex(), mHistory, movedNode, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, GlacierLineHistory::peek(), GlacierLineHistory::push(), and Node::x.
Referenced by moveLineNode().
void GLIMSLineData::restoreMovedLineNode | ( | int | iline, | |
int | inode, | |||
Node & | xynode | |||
) | [virtual] |
Restores a moved Node at index inode in the line at index iline to its original location, captured in xynode.
iline | The index of the line containing the Node to be moved | |
inode | The index of the Node to move | |
xynode | A copy of the original node before it was moved. The attributes of xynode will be copied to the node to be restored to its original position. |
Definition at line 488 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, Node::x, and Node::y.
Referenced by pop().
void GLIMSLineData::insertLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode = -1 | |||
) | [virtual] |
Insert a Node to the line at index iline.
If inode is greater than 0, the Node will be inserted in the line after that index. If inode is -1, the Node will be added to the end of the line.
node | Node to be inserted to the line at index iline | |
iline | Index of the line to have a node inserted into | |
inode | Index of the Node to insert the new Node after |
Implements SimpleLineData.
Definition at line 503 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), VectorData::datasetChanged(), Image::getLL(), insertedNode, mHistory, VectorData::mImg, VectorData::mLLSet, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, VectorData::mXYSet, Line::nodeset(), GlacierLineHistory::push(), Node::x, and Node::y.
Referenced by addLineNode().
void GLIMSLineData::reinsertLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode = -1 | |||
) | [virtual] |
Reinsert a deleted Node to the line at index iline.
If inode is greater than 0, the Node will be inserted in the line after that index. If inode is -1, the Node will be added to the end of the line. No history information will be recorded.
node | Node to be inserted to the line at index iline | |
iline | Index of the line to have a node inserted into | |
inode | Index of the Node to insert the new Node after |
Definition at line 542 of file glimslinedata.cpp.
References VectorData::datasetChanged(), Image::getLL(), VectorData::mImg, VectorData::mLLSet, VectorData::mXYSet, Line::nodeset(), Node::x, and Node::y.
Referenced by restoreLineNode().
void GLIMSLineData::pop | ( | ) | [virtual] |
Undo for GLIMSLineData implemented by making the top of the stack the current state, then popping the stacks so the top of the stacks are the previous state.
Implements SimpleLineData.
Definition at line 611 of file glimslinedata.cpp.
References mHistory, mRedoHistory, VectorData::mRedoSel, and VectorData::mUndoSel.
Referenced by redo().
void GLIMSLineData::redo | ( | ) | [virtual] |
Redo for GLIMSLineData implemented by making the moving a history element from the redo stack to the current state and the undo stack.
Implements SimpleLineData.
Definition at line 616 of file glimslinedata.cpp.
References mHistory, mRedoHistory, VectorData::mRedoSel, VectorData::mUndoSel, and pop().
void GLIMSLineData::push | ( | ) | [virtual] |
Saves the current selection state onto the selection set undo stack as part of history and undo functionality.
Implements SimpleLineData.
Definition at line 821 of file glimslinedata.cpp.
References VectorData::datasetChanged().
Referenced by addLineSetLL().
void GLIMSLineData::pushSelection | ( | ) | [virtual] |
Causes a history item to be recorded for a user selection/deselection of lines and/or nodes.
Implements SimpleLineData.
Definition at line 827 of file glimslinedata.cpp.
References GlacierLineHistory::clear(), mHistory, mRedoHistory, VectorData::mSelSet, VectorData::mUndoSel, GlacierLineHistory::push(), and selection.
virtual void GLIMSLineData::addLineNodeLL | ( | Node & | n, | |
int | iline, | |||
int | inode = -1 | |||
) | [inline, virtual] |
Add a node to line at position inode in line stored at iline, where the node was built using lat-lon instead of XY coordinates.
Used by shapefile import funtions.
Definition at line 467 of file glimslinedata.h.
References addLineNode(), Image::getXY(), VectorData::mImg, Node::x, and Node::y.
Referenced by GLIMSProject::importGLIMSIngestData(), and GLIMSProject::importSegmentsFromShapefile().
virtual void GLIMSLineData::addLineLL | ( | Node & | n | ) | [inline, virtual] |
Add a line with a starting node built using lat-lon instead of XY.
Used by shapefile import funtions.
Definition at line 476 of file glimslinedata.h.
References addLine(), Image::getXY(), VectorData::mImg, Node::x, and Node::y.
Referenced by GLIMSProject::importGLIMSIngestData(), and GLIMSProject::importSegmentsFromShapefile().
void GLIMSLineData::addLineSetLL | ( | std::vector< GlacierLine > & | glset | ) | [virtual] |
Add a line set built using lat-lon instead of XY.
Used by shapefile import funtions.
Definition at line 873 of file glimslinedata.cpp.
References VectorData::mLLSet, VectorData::mXYSet, push(), and VectorData::transformDataset().
Referenced by ImageCalculator::calculate().
void GLIMSLineData::addLDF | ( | LineDef & | ldf | ) | [inline] |
Add a line definition, which contains metadata specific to the feature types it is designed to describe.
Definition at line 491 of file glimslinedata.h.
References LineDefSet::add(), VectorData::datasetChanged(), and mLDFSet.
Referenced by GLIMSProject::importGLIMSIngestData(), GLIMSProject::importSegmentsFromShapefile(), and loadDefaultSet().
void GLIMSLineData::loadDefaultSet | ( | ) | [inline] |
Load the default line definition set.
Definition at line 499 of file glimslinedata.h.
References addLDF(), GLIMSGlobals::mGlbLDFSet, and LineDefSet::size().
Referenced by GLIMSProject::create().
LineDefSet& GLIMSLineData::getLDFSet | ( | ) | [inline] |
Get the default line definition set.
Definition at line 509 of file glimslinedata.h.
References VectorData::datasetChanged(), and mLDFSet.
Referenced by ImageCalculatorDialog::buildDialog(), LineDefDlg::butOkPress(), ImageCalculator::calculate(), LineSelectorDlg::exportFile(), GLIMSProject::exportGLIMSIngest(), LineSelectorDlg::importFile(), GLIMSProject::importGLIMSIngestData(), GLIMSProject::importSegmentsFromShapefile(), LineSelectorDlg::loadList(), and LineDefDlg::setSelected().
GlacierLine * GLIMSLineData::toXY | ( | GlacierLine * | gl | ) |
Get the XY coordinate version of the GlacierLine at gl, which is built with lat-lon coordinate information.
Used by shapefile import functions.
Definition at line 580 of file glimslinedata.cpp.
References GLIMSGlobals::AVAILCOLORS, DspAttr::color, Shape::getAttr(), Image::getXY(), LineDef::mColor, GlacierLine::mGID, VectorData::mImg, GlacierLine::mLDF, mLDFSet, LineDef::mStyle, LineDef::mWidth, Line::nodeset(), Line::size(), DspAttr::style, DspAttr::width, Node::x, and Node::y.
bool GLIMSLineData::validate | ( | ValidationReport * | valRep | ) |
Check that all lines have an associated glacier id, line definition, and at least 4 vertices.
Invalide lines will be highlighted (selected) on the screen. Also launches the line definition validation.
Definition at line 901 of file glimslinedata.cpp.
References SelectionSet::add(), ValidationReport::breakBegin(), ValidationReport::breakEnd(), SelectionSet::clear(), GlacierLine::mGID, GlacierLine::mLDF, mLDFSet, VectorData::mLLSet, VectorData::mSelSet, Line::nodeset(), SelectionSet::SelObj::obj, ValidationReport::reportError(), ValidationReport::reportWarning(), ValidationReport::subsectionBegin(), ValidationReport::subsectionEnd(), and LineDefSet::validate().
Referenced by GLIMSProject::validate().
virtual void SimpleLineData::delNode | ( | int | ) | [inline, virtual, inherited] |
virtual void SimpleLineData::moveNode | ( | Node & | , | |
int | = -1 | |||
) | [inline, virtual, inherited] |
virtual void SimpleLineData::insertNode | ( | Node & | , | |
int | ||||
) | [inline, virtual, inherited] |
virtual void SimpleLineData::addNode | ( | Node & | , | |
int | = -1 | |||
) | [inline, virtual, inherited] |
void VectorData::setImage | ( | Image * | img | ) | [inline, inherited] |
Definition at line 87 of file vectordata.h.
References VectorData::mImg.
Referenced by GLIMSDataset::GLIMSDataset().
ShapeType VectorData::getType | ( | ) | [inline, inherited] |
Definition at line 90 of file vectordata.h.
References VectorData::mType.
Referenced by VectorEditor::delSel(), GlacierConfigDlg::delSel(), VectorLayer::draw(), GtoSConverter::getSelectedShapeList(), VectorEditor::overSelNode(), VectorEditor::viewMouseMove(), and VectorEditor::viewSelChanged().
std::vector<Shape*>& VectorData::getXYSet | ( | ) | [inline, inherited] |
Definition at line 93 of file vectordata.h.
References VectorData::mXYSet.
Referenced by VectorEditor::breakLine(), VectorEditor::delSel(), GlacierConfigDlg::delSel(), VectorLayer::draw(), VectorEditor::joinLine(), VectorEditor::overSelNode(), GlacierConfigDlg::setSelectedGID(), GlacierConfigDlg::updateListSelection(), VectorEditor::viewMousePress(), and VectorEditor::viewSelChanged().
std::vector<Shape*>& VectorData::getLLSet | ( | ) | [inline, inherited] |
Definition at line 96 of file vectordata.h.
References VectorData::mLLSet.
Referenced by GLIMSProject::exportGLIMSIngest(), and GtoSConverter::getSelectedShapeList().
unsigned int VectorData::size | ( | ) | [inline, inherited] |
Definition at line 99 of file vectordata.h.
References VectorData::mLLSet.
Referenced by GLIMSGIDData::clearRedo(), GlacierConfigDlg::delSel(), GLIMSProject::importGLIMSIngestData(), GLIMSProject::importSegmentsFromShapefile(), VectorData::transformDataset(), and VectorEditor::viewMousePress().
SelectionSet& VectorData::getSelSet | ( | ) | [inline, inherited] |
Definition at line 102 of file vectordata.h.
References VectorData::mSelSet.
Referenced by VectorEditor::activeLayerChanged(), LineSelectorDlg::changeCurLine(), VectorEditor::clearAllLayerSelections(), GlacierConfigDlg::delSel(), GtoSConverter::getSelectedShapeList(), GlacierIDChooserDlg::setCurLines(), GlacierConfigDlg::setSelectedGID(), and GlacierConfigDlg::updateListSelection().
void VectorData::transformDataset | ( | ) | [slot, inherited] |
Definition at line 11 of file vectordata.cpp.
References Line::delNode(), Image::getXY(), VectorData::mImg, VectorData::mLLSet, VectorData::mType, VectorData::mXYSet, VectorData::POINT, Line::size(), VectorData::size(), Node::x, and Node::y.
Referenced by addLineSetLL(), fromXML(), and GLIMSGIDData::fromXML().
void VectorData::datasetChanged | ( | ) | [signal, inherited] |
Referenced by GLIMSGIDData::addGID(), addLDF(), addLine(), addLineNode(), GLIMSGIDData::addNode(), breakLine(), delLineNode(), GLIMSGIDData::delNode(), fromXML(), GLIMSGIDData::fromXML(), getLDFSet(), insertLineNode(), joinLine(), moveLineNode(), GLIMSGIDData::moveNode(), GLIMSGIDData::pop(), push(), GLIMSGIDData::redo(), reinsertLineNode(), rejoinLine(), removeLineNode(), restoreJoinedLines(), restoreLine(), restoreLineNode(), restoreMovedLineNode(), setGID(), setLDF(), and GLIMSGIDData::updateVersion().
bool XMLSerializeable::writeTextTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
std::string | text, | |||
std::string | id = "" | |||
) | [protected, virtual, inherited] |
Definition at line 7 of file xmlserializeable.cpp.
Referenced by ViewState::toXML(), Session::toXML(), Plugin::toXML(), LineDef::toXML(), ImageState::toXML(), ImageInf::toXML(), GlacierIDDef::toXML(), and Attr::toXML().
virtual bool XMLSerializeable::writeIntTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
int | val, | |||
std::string | id = "" | |||
) | [inline, protected, virtual, inherited] |
Definition at line 38 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), ViewState::toXML(), Session::toXML(), LineDef::toXML(), ImageState::toXML(), GlacierLine::toXML(), and GlacierIDDef::toXML().
virtual bool XMLSerializeable::writeDoubleTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | tagName, | |||
double | val, | |||
std::string | id = "" | |||
) | [inline, protected, virtual, inherited] |
Definition at line 49 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), Rect::toXML(), Node::toXML(), LineDef::toXML(), ImageInf::toXML(), and GlacierIDDef::toXML().
std::string XMLSerializeable::readTextTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [protected, virtual, inherited] |
Definition at line 21 of file xmlserializeable.cpp.
Referenced by ViewState::fromXML(), Session::fromXML(), Plugin::fromXML(), LineDef::fromXML(), ImageState::fromXML(), ImageInf::fromXML(), GlacierIDDef::fromXML(), and Attr::fromXML().
virtual int XMLSerializeable::readIntTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [inline, protected, virtual, inherited] |
Definition at line 65 of file xmlserializeable.h.
Referenced by ZoomAttr::fromXML(), ViewState::fromXML(), Session::fromXML(), LineDef::fromXML(), ImageState::fromXML(), GlacierLine::fromXML(), and GlacierIDDef::fromXML().
virtual double XMLSerializeable::readDoubleTag | ( | QDomElement | elem, | |
std::string | tagName = "" , |
|||
std::string | id = "" | |||
) | [inline, protected, virtual, inherited] |
Definition at line 72 of file xmlserializeable.h.
Referenced by ZoomAttr::fromXML(), Rect::fromXML(), Node::fromXML(), LineDef::fromXML(), ImageInf::fromXML(), and GlacierIDDef::fromXML().
virtual QDomElement XMLSerializeable::createBaseTag | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id, | |||
std::string | tagName | |||
) | [inline, protected, virtual, inherited] |
Definition at line 79 of file xmlserializeable.h.
Referenced by ZoomAttr::toXML(), ViewState::toXML(), Session::toXML(), and MainToolbar::toXML().
QDomElement XMLSerializeable::getElemByTagName | ( | QDomElement & | elem, | |
std::string | name | |||
) | [protected, virtual, inherited] |
std::string XMLSerializeable::qDateToString | ( | const QDate * | aQDate | ) | [protected, virtual, inherited] |
Definition at line 135 of file xmlserializeable.cpp.
Referenced by XMLSerializeable::getCurrentVersionStr(), XMLSerializeable::qDateTimeToString(), and XMLSerializeable::toXMLFile().
bool XMLSerializeable::stringToQDate | ( | const std::string | aStrDate, | |
QDate * | aQDate | |||
) | [protected, virtual, inherited] |
Definition at line 170 of file xmlserializeable.cpp.
Referenced by GLIMSProject::fromXML(), XMLSerializeable::setCurrentVersion(), and XMLSerializeable::stringToQDateTime().
std::string XMLSerializeable::qDateTimeToString | ( | const QDateTime * | aQDateTime | ) | [protected, virtual, inherited] |
Definition at line 149 of file xmlserializeable.cpp.
References XMLSerializeable::qDateToString().
bool XMLSerializeable::stringToQDateTime | ( | const std::string | aStrDateTime, | |
QDateTime * | aQDateTime | |||
) | [protected, virtual, inherited] |
Definition at line 205 of file xmlserializeable.cpp.
References XMLSerializeable::stringToQDate().
bool XMLSerializeable::toXMLFile | ( | std::string | fname, | |
std::string | docname | |||
) | [virtual, inherited] |
Definition at line 87 of file xmlserializeable.cpp.
References XMLSerializeable::mCurrentVersion, XMLSerializeable::qDateToString(), and XMLSerializeable::toXML().
Referenced by MainToolbar::closeEvent(), LineSelectorDlg::exportFile(), PluginSet::importPlugin(), GLIMSProject::save(), GLIMSProject::saveAs(), and MainToolbar::~MainToolbar().
bool XMLSerializeable::fromXMLFile | ( | std::string | fname, | |
std::string | docname | |||
) | [virtual, inherited] |
Definition at line 53 of file xmlserializeable.cpp.
References XMLSerializeable::fromXML().
Referenced by MainToolbar::buildViews(), LineSelectorDlg::importFile(), LineDefSet::LineDefSet(), GLIMSGlobals::loadGlobals(), GLIMSProject::open(), and PluginSet::PluginSet().
void XMLSerializeable::setCurrentVersion | ( | std::string | versionString | ) | [virtual, inherited] |
Definition at line 249 of file xmlserializeable.cpp.
References XMLSerializeable::mCurrentVersion, and XMLSerializeable::stringToQDate().
Referenced by MainToolbar::setupProj().
void XMLSerializeable::setCurrentVersion | ( | QDate | versionQDate | ) | [virtual, inherited] |
QDate XMLSerializeable::getCurrentVersion | ( | ) | [virtual, inherited] |
std::string XMLSerializeable::getCurrentVersionStr | ( | ) | [virtual, inherited] |
Definition at line 262 of file xmlserializeable.cpp.
References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().
int GLIMSLineData::mDefGID [protected] |
Default Glacier ID.
Definition at line 55 of file glimslinedata.h.
Referenced by addLine(), and setDefGID().
int GLIMSLineData::mDefLDF [protected] |
Default Line Definition.
Definition at line 56 of file glimslinedata.h.
Referenced by addLine(), and setDefLDF().
LineDefSet GLIMSLineData::mLDFSet [protected] |
Set of Line Definitions.
Definition at line 57 of file glimslinedata.h.
Referenced by addLDF(), addLine(), fromXML(), getLDFSet(), setLDF(), toXML(), toXY(), and validate().
GlacierLineHistory GLIMSLineData::mHistory [protected] |
History of actions taken on GlacierLines.
Definition at line 59 of file glimslinedata.h.
Referenced by addLine(), breakLine(), delLine(), delLineNode(), insertLineNode(), joinLine(), pop(), pushSelection(), redo(), and startMoveLineNode().
GlacierLineHistory GLIMSLineData::mRedoHistory [protected] |
History of actions popped off the history stack.
Definition at line 60 of file glimslinedata.h.
Referenced by addLine(), breakLine(), delLine(), delLineNode(), insertLineNode(), joinLine(), pop(), pushSelection(), redo(), and startMoveLineNode().
std::vector<Shape*> VectorData::mLLSet [protected, inherited] |
Definition at line 31 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), addLine(), addLineSetLL(), GLIMSGIDData::addNode(), breakLine(), GLIMSGIDData::clear(), delLine(), delLineNode(), GLIMSGIDData::delNode(), fromXML(), GLIMSGIDData::fromXML(), VectorData::getLLSet(), insertLineNode(), joinLine(), moveLineNode(), GLIMSGIDData::moveNode(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), GLIMSGIDData::redo(), reinsertLineNode(), rejoinLine(), removeLine(), removeLineNode(), restoreJoinedLines(), restoreLine(), restoreMovedLineNode(), setGID(), setLDF(), VectorData::size(), toXML(), VectorData::transformDataset(), and validate().
std::vector<Shape*> VectorData::mXYSet [protected, inherited] |
Definition at line 32 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), addLine(), addLineSetLL(), GLIMSGIDData::addNode(), breakLine(), GLIMSGIDData::clear(), delLine(), delLineNode(), GLIMSGIDData::delNode(), fromXML(), GLIMSGIDData::fromXML(), VectorData::getXYSet(), insertLineNode(), joinLine(), moveLineNode(), GLIMSGIDData::moveNode(), pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), GLIMSGIDData::redo(), reinsertLineNode(), rejoinLine(), removeLine(), removeLineNode(), restoreJoinedLines(), restoreLine(), restoreMovedLineNode(), setGID(), setLDF(), startMoveLineNode(), and VectorData::transformDataset().
SelectionSet VectorData::mSelSet [protected, inherited] |
Definition at line 33 of file vectordata.h.
Referenced by addLine(), breakLine(), GLIMSGIDData::clear(), delLine(), delLineNode(), VectorData::getSelSet(), insertLineNode(), joinLine(), pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), pushSelection(), GLIMSGIDData::redo(), startMoveLineNode(), validate(), and GLIMSGIDData::validate().
std::stack<std::vector<Shape*> > VectorData::mUndoLL [protected, inherited] |
Definition at line 35 of file vectordata.h.
Referenced by GLIMSGIDData::pop(), and GLIMSGIDData::push().
std::stack<std::vector<Shape*> > VectorData::mUndoXY [protected, inherited] |
Definition at line 38 of file vectordata.h.
Referenced by GLIMSGIDData::pop(), and GLIMSGIDData::push().
std::stack<SelectionSet> VectorData::mUndoSel [protected, inherited] |
Definition at line 41 of file vectordata.h.
Referenced by addLine(), breakLine(), delLine(), delLineNode(), insertLineNode(), joinLine(), pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), pushSelection(), redo(), and startMoveLineNode().
std::stack<std::vector<Shape*> > VectorData::mRedoLL [protected, inherited] |
Definition at line 45 of file vectordata.h.
Referenced by GLIMSGIDData::clearRedo(), GLIMSGIDData::pushRedo(), and GLIMSGIDData::redo().
std::stack<std::vector<Shape*> > VectorData::mRedoXY [protected, inherited] |
Definition at line 48 of file vectordata.h.
Referenced by GLIMSGIDData::clearRedo(), GLIMSGIDData::pushRedo(), and GLIMSGIDData::redo().
std::stack<SelectionSet> VectorData::mRedoSel [protected, inherited] |
Definition at line 51 of file vectordata.h.
Referenced by GLIMSGIDData::clearRedo(), pop(), GLIMSGIDData::pushRedo(), redo(), and GLIMSGIDData::redo().
ShapeType VectorData::mType [protected, inherited] |
Definition at line 55 of file vectordata.h.
Referenced by VectorData::getType(), and VectorData::transformDataset().
Image* VectorData::mImg [protected, inherited] |
Definition at line 56 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), addLine(), addLineLL(), addLineNodeLL(), GLIMSGIDData::addNode(), insertLineNode(), moveLineNode(), GLIMSGIDData::moveNode(), reinsertLineNode(), rejoinLine(), restoreJoinedLines(), restoreLine(), restoreMovedLineNode(), VectorData::setImage(), toXY(), and VectorData::transformDataset().
QDate XMLSerializeable::mCurrentVersion [protected, inherited] |
Definition at line 29 of file xmlserializeable.h.
Referenced by XMLSerializeable::getCurrentVersion(), XMLSerializeable::getCurrentVersionStr(), XMLSerializeable::setCurrentVersion(), and XMLSerializeable::toXMLFile().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |