GLIMSView Source Code Documentation

GLIMSGIDData Class Reference

#include <glimsgiddata.h>

Inheritance diagram for GLIMSGIDData:

Inheritance graph
[legend]

List of all members.


Detailed Description

Point vector data specifically representing glacier ids described in the GLIMS specifications.

A glacier id is a single point within a glacier's boundaries that is universally unique to this glacier within the GLIMS database. Extending SimplePointData, this is also an XMLSerializable object.

Author:
Dan Mingus
History:
2005-07-23 Deborah Lee Soltesz Added ability to redo undone actions (i.e. popped data). New functions for managing data during undo/redo.
History:
2005-08-04 Deborah Lee Soltesz Added undo/redo for mDefSet (set of glacier definitions which hold the glacier attribute metadata)
What's New:
2007-06-14 Validation function checks for required metadata, and reports to ValidationReport. Provides warning for non-required invalid/missing items, and errors for required items.
What's New:
2005-07-23 Deborah Lee Soltesz Redo!!!

Definition at line 40 of file glimsgiddata.h.


Public Types

enum  ShapeType { POINT, LINE, POLY }

Public Slots

void transformDataset ()

Signals

void datasetChanged ()

Public Member Functions

 GLIMSGIDData ()
virtual ~GLIMSGIDData ()
virtual bool fromXML (QDomElement &elem)
virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
virtual void addNode (Node &node, int inode)
virtual void delNode (int inode)
virtual void moveNode (Node &node, int inode=-1)
virtual void insertNode (Node &node, int inode)
virtual void push ()
 Put history information on undo stacks.
virtual void pushSelection ()
 Copies on-screen selection to undo stack.
virtual void pop ()
 Undo: Sets current state to most recent state stored on undo stack, pushes old state onto redo stack.
virtual void redo ()
 Red: Sets current state to most recent state stored on redo stack, pushes old state onto undo stack.
void addGID (const GlacierIDDef &gid)
void updateVersion (QDate *projectVersion)
 fixes errors and makes changes to project file based on the project's version date
std::vector< GlacierIDDef > & getDefSet ()
bool validate (ValidationReport *valRep)
 Check that all glacier ids have required metadata.
virtual void delLineNode (int, int)
virtual void delLine (int)
virtual void addLineNode (Node &, int, int=-1)
virtual void joinLine (int, int, int, int)
virtual void breakLine (int, int)
virtual void moveLineNode (int, int, Node &)
virtual void addLine (Node &)
virtual void insertLineNode (Node &, int, int=-1)
void setImage (Image *img)
ShapeType getType ()
std::vector< Shape * > & getXYSet ()
std::vector< Shape * > & getLLSet ()
unsigned int size ()
SelectionSetgetSelSet ()
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

virtual void pushRedo ()
 Put current dataset on redo stack.
virtual void clear ()
 Clear out current data set.
virtual void clearRedo ()
 Clear out redo set.
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

std::vector< GlacierIDDefmDefSet
std::stack< std::vector
< GlacierIDDef > > 
mUndoGIDDef
std::stack< std::vector
< GlacierIDDef > > 
mRedoGIDDef
std::vector< Shape * > mLLSet
std::vector< Shape * > mXYSet
SelectionSet mSelSet
std::stack< std::vector< Shape * > > mUndoLL
std::stack< std::vector< Shape * > > mUndoXY
std::stack< SelectionSetmUndoSel
std::stack< std::vector< Shape * > > mRedoLL
std::stack< std::vector< Shape * > > mRedoXY
std::stack< SelectionSetmRedoSel
ShapeType mType
ImagemImg
QDate mCurrentVersion

Member Enumeration Documentation

enum VectorData::ShapeType [inherited]

Enumerator:
POINT 
LINE 
POLY 

Definition at line 24 of file vectordata.h.


Constructor & Destructor Documentation

GLIMSGIDData::GLIMSGIDData (  )  [inline]

Definition at line 69 of file glimsgiddata.h.

virtual GLIMSGIDData::~GLIMSGIDData (  )  [inline, virtual]

Definition at line 71 of file glimsgiddata.h.


Member Function Documentation

void GLIMSGIDData::pushRedo (  )  [protected, virtual]

Put current dataset on redo stack.

Author:
2005-07-23 Deborah Lee Soltesz

Definition at line 130 of file glimsgiddata.cpp.

References mDefSet, VectorData::mLLSet, mRedoGIDDef, VectorData::mRedoLL, VectorData::mRedoSel, VectorData::mRedoXY, VectorData::mSelSet, and VectorData::mXYSet.

Referenced by pop().

void GLIMSGIDData::clear (  )  [protected, virtual]

Clear out current data set.

Author:
2005-07-23 Deborah Lee Soltesz

Definition at line 228 of file glimsgiddata.cpp.

References SelectionSet::clear(), VectorData::mLLSet, VectorData::mSelSet, and VectorData::mXYSet.

Referenced by pop(), and redo().

Here is the call graph for this function:

void GLIMSGIDData::clearRedo (  )  [protected, virtual]

Clear out redo set.

Author:
2005-07-23 Deborah Lee Soltesz

Definition at line 201 of file glimsgiddata.cpp.

References mRedoGIDDef, VectorData::mRedoLL, VectorData::mRedoSel, VectorData::mRedoXY, and VectorData::size().

Referenced by addGID(), addNode(), and moveNode().

Here is the call graph for this function:

bool GLIMSGIDData::fromXML ( QDomElement &  elem  )  [virtual]

bool GLIMSGIDData::toXML ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id = "" 
) [virtual]

Implements SimplePointData.

Definition at line 32 of file glimsgiddata.cpp.

References mDefSet.

Referenced by GLIMSDataset::toXML().

void GLIMSGIDData::addNode ( Node node,
int  inode 
) [virtual]

void GLIMSGIDData::delNode ( int  inode  )  [virtual]

void GLIMSGIDData::moveNode ( Node node,
int  inode = -1 
) [virtual]

void GLIMSGIDData::insertNode ( Node node,
int  inode 
) [virtual]

Implements SimplePointData.

Definition at line 102 of file glimsgiddata.cpp.

void GLIMSGIDData::push (  )  [virtual]

Put history information on undo stacks.

Implements SimplePointData.

Definition at line 106 of file glimsgiddata.cpp.

References mDefSet, VectorData::mLLSet, VectorData::mSelSet, mUndoGIDDef, VectorData::mUndoLL, VectorData::mUndoSel, VectorData::mUndoXY, and VectorData::mXYSet.

Referenced by GlacierConfigDlg::keyPressEvent(), and redo().

virtual void GLIMSGIDData::pushSelection (  )  [inline, virtual]

Copies on-screen selection to undo stack.

Author:
2005-07-06 Deborah Lee Soltesz

Implements SimplePointData.

Definition at line 94 of file glimsgiddata.h.

void GLIMSGIDData::pop (  )  [virtual]

Undo: Sets current state to most recent state stored on undo stack, pushes old state onto redo stack.

Implements SimplePointData.

Definition at line 153 of file glimsgiddata.cpp.

References clear(), VectorData::datasetChanged(), mDefSet, VectorData::mLLSet, VectorData::mSelSet, mUndoGIDDef, VectorData::mUndoLL, VectorData::mUndoSel, VectorData::mUndoXY, VectorData::mXYSet, and pushRedo().

Here is the call graph for this function:

void GLIMSGIDData::redo (  )  [virtual]

Red: Sets current state to most recent state stored on redo stack, pushes old state onto undo stack.

Author:
2005-07-23 Deborah Lee Soltesz

Implements SimplePointData.

Definition at line 177 of file glimsgiddata.cpp.

References clear(), VectorData::datasetChanged(), mDefSet, VectorData::mLLSet, mRedoGIDDef, VectorData::mRedoLL, VectorData::mRedoSel, VectorData::mRedoXY, VectorData::mSelSet, VectorData::mXYSet, and push().

Here is the call graph for this function:

void GLIMSGIDData::addGID ( const GlacierIDDef gid  ) 

void GLIMSGIDData::updateVersion ( QDate *  projectVersion  ) 

fixes errors and makes changes to project file based on the project's version date

Definition at line 266 of file glimsgiddata.cpp.

References VectorData::datasetChanged(), and mDefSet.

Referenced by GLIMSDataset::updateVersion().

std::vector<GlacierIDDef>& GLIMSGIDData::getDefSet (  )  [inline]

bool GLIMSGIDData::validate ( ValidationReport valRep  )  [inline]

Check that all glacier ids have required metadata.

Returns:
bool true if all glacier ids are valid, and false if not

Definition at line 131 of file glimsgiddata.h.

References SelectionSet::add(), ValidationReport::breakBegin(), ValidationReport::breakEnd(), SelectionSet::clear(), mDefSet, VectorData::mSelSet, SelectionSet::SelObj::obj, ValidationReport::reportWarning(), and GlacierIDDef::validate().

Referenced by GLIMSProject::validate().

Here is the call graph for this function:

virtual void SimplePointData::delLineNode ( int  ,
int   
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 19 of file simplepointdata.h.

Referenced by GlacierConfigDlg::delSel().

virtual void SimplePointData::delLine ( int   )  [inline, virtual, inherited]

Implements VectorData.

Definition at line 21 of file simplepointdata.h.

Referenced by GlacierConfigDlg::delSel().

virtual void SimplePointData::addLineNode ( Node ,
int  ,
int  = -1 
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 23 of file simplepointdata.h.

virtual void SimplePointData::joinLine ( int  ,
int  ,
int  ,
int   
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 25 of file simplepointdata.h.

virtual void SimplePointData::breakLine ( int  ,
int   
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 27 of file simplepointdata.h.

virtual void SimplePointData::moveLineNode ( int  ,
int  ,
Node  
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 29 of file simplepointdata.h.

virtual void SimplePointData::addLine ( Node  )  [inline, virtual, inherited]

Implements VectorData.

Definition at line 31 of file simplepointdata.h.

virtual void SimplePointData::insertLineNode ( Node ,
int  ,
int  = -1 
) [inline, virtual, inherited]

Implements VectorData.

Definition at line 33 of file simplepointdata.h.

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]

std::vector<Shape*>& VectorData::getXYSet (  )  [inline, inherited]

std::vector<Shape*>& VectorData::getLLSet (  )  [inline, inherited]

unsigned int VectorData::size (  )  [inline, inherited]

SelectionSet& VectorData::getSelSet (  )  [inline, inherited]

void VectorData::transformDataset (  )  [slot, inherited]

void VectorData::datasetChanged (  )  [signal, inherited]

bool XMLSerializeable::writeTextTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
std::string  text,
std::string  id = "" 
) [protected, virtual, inherited]

virtual bool XMLSerializeable::writeIntTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
int  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual bool XMLSerializeable::writeDoubleTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  tagName,
double  val,
std::string  id = "" 
) [inline, protected, virtual, inherited]

std::string XMLSerializeable::readTextTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [protected, virtual, inherited]

virtual int XMLSerializeable::readIntTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual double XMLSerializeable::readDoubleTag ( QDomElement  elem,
std::string  tagName = "",
std::string  id = "" 
) [inline, protected, virtual, inherited]

virtual QDomElement XMLSerializeable::createBaseTag ( QDomDocument &  doc,
QDomElement &  elem,
std::string  id,
std::string  tagName 
) [inline, protected, virtual, inherited]

QDomElement XMLSerializeable::getElemByTagName ( QDomElement &  elem,
std::string  name 
) [protected, virtual, inherited]

Definition at line 119 of file xmlserializeable.cpp.

Referenced by GlacierIDDef::fromXML().

std::string XMLSerializeable::qDateToString ( const QDate *  aQDate  )  [protected, virtual, inherited]

bool XMLSerializeable::stringToQDate ( const std::string  aStrDate,
QDate *  aQDate 
) [protected, virtual, inherited]

std::string XMLSerializeable::qDateTimeToString ( const QDateTime *  aQDateTime  )  [protected, virtual, inherited]

Definition at line 149 of file xmlserializeable.cpp.

References XMLSerializeable::qDateToString().

Here is the call graph for this function:

bool XMLSerializeable::stringToQDateTime ( const std::string  aStrDateTime,
QDateTime *  aQDateTime 
) [protected, virtual, inherited]

Definition at line 205 of file xmlserializeable.cpp.

References XMLSerializeable::stringToQDate().

Here is the call graph for this function:

bool XMLSerializeable::toXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

bool XMLSerializeable::fromXMLFile ( std::string  fname,
std::string  docname 
) [virtual, inherited]

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

Here is the call graph for this function:

void XMLSerializeable::setCurrentVersion ( QDate  versionQDate  )  [virtual, inherited]

Definition at line 254 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

QDate XMLSerializeable::getCurrentVersion (  )  [virtual, inherited]

Definition at line 258 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion.

std::string XMLSerializeable::getCurrentVersionStr (  )  [virtual, inherited]

Definition at line 262 of file xmlserializeable.cpp.

References XMLSerializeable::mCurrentVersion, and XMLSerializeable::qDateToString().

Here is the call graph for this function:


Member Data Documentation

std::vector<GlacierIDDef> GLIMSGIDData::mDefSet [protected]

std::stack< std::vector <GlacierIDDef> > GLIMSGIDData::mUndoGIDDef [protected]

Definition at line 44 of file glimsgiddata.h.

Referenced by pop(), and push().

std::stack< std::vector <GlacierIDDef> > GLIMSGIDData::mRedoGIDDef [protected]

Definition at line 45 of file glimsgiddata.h.

Referenced by clearRedo(), pushRedo(), and redo().

std::vector<Shape*> VectorData::mLLSet [protected, inherited]

std::vector<Shape*> VectorData::mXYSet [protected, inherited]

SelectionSet VectorData::mSelSet [protected, inherited]

std::stack<std::vector<Shape*> > VectorData::mUndoLL [protected, inherited]

Definition at line 35 of file vectordata.h.

Referenced by pop(), and push().

std::stack<std::vector<Shape*> > VectorData::mUndoXY [protected, inherited]

Definition at line 38 of file vectordata.h.

Referenced by pop(), and push().

std::stack<SelectionSet> VectorData::mUndoSel [protected, inherited]

std::stack<std::vector<Shape*> > VectorData::mRedoLL [protected, inherited]

Definition at line 45 of file vectordata.h.

Referenced by clearRedo(), pushRedo(), and redo().

std::stack<std::vector<Shape*> > VectorData::mRedoXY [protected, inherited]

Definition at line 48 of file vectordata.h.

Referenced by clearRedo(), pushRedo(), and redo().

std::stack<SelectionSet> VectorData::mRedoSel [protected, inherited]

Definition at line 51 of file vectordata.h.

Referenced by clearRedo(), GLIMSLineData::pop(), pushRedo(), GLIMSLineData::redo(), and 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]

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


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

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov