#include <vectordata.h>
All vector data is derived from this allowing easy handling of vector objects.
Definition at line 21 of file vectordata.h.
Public Types | |
enum | ShapeType { POINT, LINE, POLY } |
Public Slots | |
void | transformDataset () |
Signals | |
void | datasetChanged () |
Public Member Functions | |
VectorData (ShapeType type, Image *img=NULL) | |
virtual | ~VectorData () |
virtual bool | toXML (QDomDocument &doc, QDomElement &elem, std::string id)=0 |
virtual bool | fromXML (QDomElement &elem)=0 |
virtual void | addNode (Node &node, int inode=-1)=0 |
virtual void | insertNode (Node &node, int inode)=0 |
virtual void | delNode (int inode)=0 |
virtual void | moveNode (Node &node, int inode=-1)=0 |
virtual void | addLine (Node &node)=0 |
virtual void | delLine (int iline)=0 |
virtual void | breakLine (int iline, int inode)=0 |
virtual void | joinLine (int il1, int il2, int in1, int in2)=0 |
virtual void | addLineNode (Node &node, int iline, int inode=-1)=0 |
virtual void | insertLineNode (Node &node, int iline, int inode=-1)=0 |
virtual void | delLineNode (int iline, int inode)=0 |
virtual void | moveLineNode (int iline, int inode, Node &node)=0 |
virtual void | push ()=0 |
virtual void | pop ()=0 |
virtual void | redo ()=0 |
virtual void | pushSelection ()=0 |
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 | |
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< 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 |
Definition at line 6 of file vectordata.cpp.
virtual VectorData::~VectorData | ( | ) | [inline, virtual] |
Definition at line 60 of file vectordata.h.
virtual bool VectorData::toXML | ( | QDomDocument & | doc, | |
QDomElement & | elem, | |||
std::string | id | |||
) | [pure virtual] |
Implements XMLSerializeable.
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
virtual bool VectorData::fromXML | ( | QDomElement & | elem | ) | [pure virtual] |
Implements XMLSerializeable.
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
virtual void VectorData::addNode | ( | Node & | node, | |
int | inode = -1 | |||
) | [pure virtual] |
Implemented in GLIMSGIDData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMousePress().
virtual void VectorData::insertNode | ( | Node & | node, | |
int | inode | |||
) | [pure virtual] |
Implemented in GLIMSGIDData, SimpleLineData, and SimplePointData.
virtual void VectorData::delNode | ( | int | inode | ) | [pure virtual] |
Implemented in GLIMSGIDData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::delSel().
virtual void VectorData::moveNode | ( | Node & | node, | |
int | inode = -1 | |||
) | [pure virtual] |
Implemented in GLIMSGIDData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMouseMove().
virtual void VectorData::addLine | ( | Node & | node | ) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMousePress().
virtual void VectorData::delLine | ( | int | iline | ) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::delSel().
virtual void VectorData::breakLine | ( | int | iline, | |
int | inode | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::breakLine().
virtual void VectorData::joinLine | ( | int | il1, | |
int | il2, | |||
int | in1, | |||
int | in2 | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::joinLine().
virtual void VectorData::addLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode = -1 | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMousePress().
virtual void VectorData::insertLineNode | ( | Node & | node, | |
int | iline, | |||
int | inode = -1 | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMousePress().
virtual void VectorData::delLineNode | ( | int | iline, | |
int | inode | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::delSel().
virtual void VectorData::moveLineNode | ( | int | iline, | |
int | inode, | |||
Node & | node | |||
) | [pure virtual] |
Implemented in GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewMouseMove().
virtual void VectorData::push | ( | ) | [pure virtual] |
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewKeyPress(), and VectorEditor::viewMousePress().
virtual void VectorData::pop | ( | ) | [pure virtual] |
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewKeyPress().
virtual void VectorData::redo | ( | ) | [pure virtual] |
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::viewKeyPress().
virtual void VectorData::pushSelection | ( | ) | [pure virtual] |
Implemented in GLIMSGIDData, GLIMSLineData, SimpleLineData, and SimplePointData.
Referenced by VectorEditor::joinLine(), and VectorEditor::viewMousePress().
void VectorData::setImage | ( | Image * | img | ) | [inline] |
Definition at line 87 of file vectordata.h.
References mImg.
Referenced by GLIMSDataset::GLIMSDataset().
ShapeType VectorData::getType | ( | ) | [inline] |
Definition at line 90 of file vectordata.h.
References mType.
Referenced by VectorEditor::delSel(), GlacierConfigDlg::delSel(), VectorLayer::draw(), GtoSConverter::getSelectedShapeList(), VectorEditor::overSelNode(), VectorEditor::viewMouseMove(), and VectorEditor::viewSelChanged().
std::vector<Shape*>& VectorData::getXYSet | ( | ) | [inline] |
Definition at line 93 of file vectordata.h.
References 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] |
Definition at line 96 of file vectordata.h.
References mLLSet.
Referenced by GLIMSProject::exportGLIMSIngest(), and GtoSConverter::getSelectedShapeList().
unsigned int VectorData::size | ( | ) | [inline] |
Definition at line 99 of file vectordata.h.
References mLLSet.
Referenced by GLIMSGIDData::clearRedo(), GlacierConfigDlg::delSel(), GLIMSProject::importGLIMSIngestData(), GLIMSProject::importSegmentsFromShapefile(), transformDataset(), and VectorEditor::viewMousePress().
SelectionSet& VectorData::getSelSet | ( | ) | [inline] |
Definition at line 102 of file vectordata.h.
References mSelSet.
Referenced by VectorEditor::activeLayerChanged(), LineSelectorDlg::changeCurLine(), VectorEditor::clearAllLayerSelections(), GlacierConfigDlg::delSel(), GtoSConverter::getSelectedShapeList(), GlacierIDChooserDlg::setCurLines(), GlacierConfigDlg::setSelectedGID(), and GlacierConfigDlg::updateListSelection().
void VectorData::transformDataset | ( | ) | [slot] |
Definition at line 11 of file vectordata.cpp.
References Line::delNode(), Image::getXY(), mImg, mLLSet, mType, mXYSet, POINT, Line::size(), size(), Node::x, and Node::y.
Referenced by GLIMSLineData::addLineSetLL(), GLIMSLineData::fromXML(), and GLIMSGIDData::fromXML().
void VectorData::datasetChanged | ( | ) | [signal] |
Referenced by GLIMSGIDData::addGID(), GLIMSLineData::addLDF(), GLIMSLineData::addLine(), GLIMSLineData::addLineNode(), GLIMSGIDData::addNode(), GLIMSLineData::breakLine(), GLIMSLineData::delLineNode(), GLIMSGIDData::delNode(), GLIMSLineData::fromXML(), GLIMSGIDData::fromXML(), GLIMSLineData::getLDFSet(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::moveLineNode(), GLIMSGIDData::moveNode(), GLIMSGIDData::pop(), GLIMSLineData::push(), GLIMSGIDData::redo(), GLIMSLineData::reinsertLineNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::removeLineNode(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::restoreLine(), GLIMSLineData::restoreLineNode(), GLIMSLineData::restoreMovedLineNode(), GLIMSLineData::setGID(), GLIMSLineData::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().
std::vector<Shape*> VectorData::mLLSet [protected] |
Definition at line 31 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), GLIMSLineData::addLine(), GLIMSLineData::addLineSetLL(), GLIMSGIDData::addNode(), GLIMSLineData::breakLine(), GLIMSGIDData::clear(), GLIMSLineData::delLine(), GLIMSLineData::delLineNode(), GLIMSGIDData::delNode(), GLIMSLineData::fromXML(), GLIMSGIDData::fromXML(), getLLSet(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::moveLineNode(), GLIMSGIDData::moveNode(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), GLIMSGIDData::redo(), GLIMSLineData::reinsertLineNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::removeLine(), GLIMSLineData::removeLineNode(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::restoreLine(), GLIMSLineData::restoreMovedLineNode(), GLIMSLineData::setGID(), GLIMSLineData::setLDF(), size(), GLIMSLineData::toXML(), transformDataset(), and GLIMSLineData::validate().
std::vector<Shape*> VectorData::mXYSet [protected] |
Definition at line 32 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), GLIMSLineData::addLine(), GLIMSLineData::addLineSetLL(), GLIMSGIDData::addNode(), GLIMSLineData::breakLine(), GLIMSGIDData::clear(), GLIMSLineData::delLine(), GLIMSLineData::delLineNode(), GLIMSGIDData::delNode(), GLIMSLineData::fromXML(), GLIMSGIDData::fromXML(), getXYSet(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::moveLineNode(), GLIMSGIDData::moveNode(), GLIMSLineData::pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), GLIMSGIDData::redo(), GLIMSLineData::reinsertLineNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::removeLine(), GLIMSLineData::removeLineNode(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::restoreLine(), GLIMSLineData::restoreMovedLineNode(), GLIMSLineData::setGID(), GLIMSLineData::setLDF(), GLIMSLineData::startMoveLineNode(), and transformDataset().
SelectionSet VectorData::mSelSet [protected] |
Definition at line 33 of file vectordata.h.
Referenced by GLIMSLineData::addLine(), GLIMSLineData::breakLine(), GLIMSGIDData::clear(), GLIMSLineData::delLine(), GLIMSLineData::delLineNode(), getSelSet(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSGIDData::pushRedo(), GLIMSLineData::pushSelection(), GLIMSGIDData::redo(), GLIMSLineData::startMoveLineNode(), GLIMSLineData::validate(), and GLIMSGIDData::validate().
std::stack<std::vector<Shape*> > VectorData::mUndoLL [protected] |
Definition at line 35 of file vectordata.h.
Referenced by GLIMSGIDData::pop(), and GLIMSGIDData::push().
std::stack<std::vector<Shape*> > VectorData::mUndoXY [protected] |
Definition at line 38 of file vectordata.h.
Referenced by GLIMSGIDData::pop(), and GLIMSGIDData::push().
std::stack<SelectionSet> VectorData::mUndoSel [protected] |
Definition at line 41 of file vectordata.h.
Referenced by GLIMSLineData::addLine(), GLIMSLineData::breakLine(), GLIMSLineData::delLine(), GLIMSLineData::delLineNode(), GLIMSLineData::insertLineNode(), GLIMSLineData::joinLine(), GLIMSLineData::pop(), GLIMSGIDData::pop(), GLIMSGIDData::push(), GLIMSLineData::pushSelection(), GLIMSLineData::redo(), and GLIMSLineData::startMoveLineNode().
std::stack<std::vector<Shape*> > VectorData::mRedoLL [protected] |
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] |
Definition at line 48 of file vectordata.h.
Referenced by GLIMSGIDData::clearRedo(), GLIMSGIDData::pushRedo(), and GLIMSGIDData::redo().
std::stack<SelectionSet> VectorData::mRedoSel [protected] |
Definition at line 51 of file vectordata.h.
Referenced by GLIMSGIDData::clearRedo(), GLIMSLineData::pop(), GLIMSGIDData::pushRedo(), GLIMSLineData::redo(), and GLIMSGIDData::redo().
ShapeType VectorData::mType [protected] |
Image* VectorData::mImg [protected] |
Definition at line 56 of file vectordata.h.
Referenced by GLIMSGIDData::addGID(), GLIMSLineData::addLine(), GLIMSLineData::addLineLL(), GLIMSLineData::addLineNodeLL(), GLIMSGIDData::addNode(), GLIMSLineData::insertLineNode(), GLIMSLineData::moveLineNode(), GLIMSGIDData::moveNode(), GLIMSLineData::reinsertLineNode(), GLIMSLineData::rejoinLine(), GLIMSLineData::restoreJoinedLines(), GLIMSLineData::restoreLine(), GLIMSLineData::restoreMovedLineNode(), setImage(), GLIMSLineData::toXY(), and 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 |