#include <glacierline.h>
This also provides easy serialization routines.
Definition at line 14 of file glacierline.h.
Public Member Functions | |
GlacierLine () | |
Construct line not associated with a line definition or glacier ID. | |
GlacierLine (int igid, int ildf) | |
Construct line associated with a line definition or glacier ID. | |
virtual bool | fromXML (QDomElement &elem) |
Read line information from project XML file. | |
virtual bool | toXML (QDomDocument &doc, QDomElement &elem, std::string id="") |
Write line information to project XML file. | |
void | operator= (const GlacierLine &gline) |
Copy attributes of another line to this line. | |
void | setAttr (DspAttr &attr) |
Node & | operator[] (int inode) const |
Node & | getNode (int inode) const |
std::vector< Node > & | nodeset () |
unsigned int | size () const |
void | delNode (unsigned int inode) |
virtual DspAttr & | getAttr () |
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 () |
Public Attributes | |
int | mGID |
glacier config listbox index associated with this line | |
int | mLDF |
line definition listbox index associated with this line | |
DspAttr | mAttr |
Protected Member Functions | |
virtual bool | nodesetFromXML (QDomElement &elem) |
virtual bool | nodesetToXML (QDomDocument &doc, QDomElement &elem) |
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< Node > | mNodeSet |
QDate | mCurrentVersion |
GlacierLine::GlacierLine | ( | ) | [inline] |
Construct line not associated with a line definition or glacier ID.
Definition at line 22 of file glacierline.h.
GlacierLine::GlacierLine | ( | int | igid, | |
int | ildf | |||
) | [inline] |
Construct line associated with a line definition or glacier ID.
igid | listbox index of associated glacier ID | |
ildf | listbox index of associated line definition |
Definition at line 30 of file glacierline.h.
virtual bool GlacierLine::fromXML | ( | QDomElement & | elem | ) | [inline, virtual] |
Read line information from project XML file.
elem | XML document structure |
Reimplemented from Line.
Definition at line 38 of file glacierline.h.
References Line::nodesetFromXML(), and XMLSerializeable::readIntTag().
Referenced by GLIMSLineData::fromXML().
virtual bool GlacierLine::toXML | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id = "" | |||
) | [inline, virtual] |
Write line information to project XML file.
doc | XML document | |
elem | XML document structure | |
id | glacier id (?) |
Reimplemented from Line.
Definition at line 56 of file glacierline.h.
References Line::nodesetToXML(), and XMLSerializeable::writeIntTag().
Referenced by GLIMSLineData::toXML().
void GlacierLine::operator= | ( | const GlacierLine & | gline | ) | [inline] |
Copy attributes of another line to this line.
gline | line to copy attributes from |
Definition at line 74 of file glacierline.h.
References Shape::mAttr, mGID, mLDF, and Line::size().
bool Line::nodesetFromXML | ( | QDomElement & | elem | ) | [protected, virtual, inherited] |
Definition at line 14 of file line.cpp.
References Node::fromXML(), and Line::mNodeSet.
Referenced by Line::fromXML(), and fromXML().
bool Line::nodesetToXML | ( | QDomDocument & | doc, | |
QDomElement & | elem | |||
) | [protected, virtual, inherited] |
Definition at line 3 of file line.cpp.
References Line::mNodeSet, and Line::toXML().
Referenced by Line::toXML(), and toXML().
void Line::setAttr | ( | DspAttr & | attr | ) | [inline, inherited] |
Definition at line 120 of file shape.h.
Referenced by GLIMSLineData::addLine(), and ImageCalculator::calculate().
Node& Line::operator[] | ( | int | inode | ) | const [inline, inherited] |
std::vector<Node>& Line::nodeset | ( | ) | [inline, inherited] |
Definition at line 132 of file shape.h.
Referenced by GLIMSLineData::addLine(), GLIMSLineData::breakLine(), ImageCalculator::calculate(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::reinsertLineNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::toXY(), and GLIMSLineData::validate().
unsigned int Line::size | ( | ) | const [inline, inherited] |
Definition at line 135 of file shape.h.
Referenced by VectorEditor::breakLine(), GLIMSLineData::breakLine(), GLIMSLineData::delLineNode(), VectorEditor::delSel(), GlacierConfigDlg::delSel(), VectorLayer::draw(), GLIMSProject::exportGLIMSIngest(), GtoSConverter::getSelectedShapes(), VectorEditor::joinLine(), GLIMSLineData::joinLine(), operator=(), VectorEditor::overSelNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::removeLineNode(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::restoreLine(), GLIMSLineData::toXY(), VectorData::transformDataset(), VectorEditor::viewMousePress(), and VectorEditor::viewSelChanged().
void Line::delNode | ( | unsigned int | inode | ) | [inline, inherited] |
Definition at line 138 of file shape.h.
Referenced by GLIMSLineData::breakLine(), GLIMSLineData::delLineNode(), GLIMSLineData::removeLineNode(), and VectorData::transformDataset().
virtual DspAttr& Shape::getAttr | ( | ) | [inline, virtual, inherited] |
Definition at line 43 of file shape.h.
Referenced by ImageCalculator::calculate(), VectorLayer::draw(), GLIMSLineData::setLDF(), and GLIMSLineData::toXY().
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(), 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(), 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().
glacier config listbox index associated with this line
Definition at line 16 of file glacierline.h.
Referenced by GLIMSLineData::breakLine(), GLIMSProject::exportGLIMSIngest(), operator=(), GLIMSLineData::setGID(), GlacierConfigDlg::setSelectedGID(), GLIMSLineData::toXY(), GlacierConfigDlg::updateListSelection(), and GLIMSLineData::validate().
line definition listbox index associated with this line
Definition at line 17 of file glacierline.h.
Referenced by GLIMSLineData::breakLine(), GLIMSProject::exportGLIMSIngest(), GLIMSLineData::fromXML(), operator=(), GLIMSLineData::setLDF(), GLIMSLineData::toXY(), and GLIMSLineData::validate().
std::vector<Node> Line::mNodeSet [protected, inherited] |
Definition at line 103 of file shape.h.
Referenced by Line::nodesetFromXML(), and Line::nodesetToXML().
DspAttr Shape::mAttr [inherited] |
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 |