GLIMSView Source Code Documentation

ZoomAttr Class Reference

#include <zoomattr.h>

Inheritance diagram for ZoomAttr:

Inheritance graph
[legend]

List of all members.


Detailed Description

A set of variables associated with the current state of a view's zoom.

A view may be FIXED so that no change of the zoom is possible by the user. Or, it may be WHOLE so that at any given moment the entire image is displayed. SCALE and FREE do the same thing right now where the zoom is always a divisible number such as .25 or 2. This allows less distortion in the image. FREE should be any zoom any time with the aid of a zoom select box.

Definition at line 16 of file zoomattr.h.


Public Types

enum  ZoomType { FIXED, SCALE, FREE, WHOLE }

Public Member Functions

virtual bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
virtual bool fromXML (QDomElement &elem)
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

double factor
ZoomType type
double min
double max

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

QDate mCurrentVersion

Member Enumeration Documentation

Enumerator:
FIXED 
SCALE 
FREE 
WHOLE 

Definition at line 18 of file zoomattr.h.


Member Function Documentation

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

Implements XMLSerializeable.

Definition at line 30 of file zoomattr.h.

References XMLSerializeable::createBaseTag(), factor, max, min, type, XMLSerializeable::writeDoubleTag(), and XMLSerializeable::writeIntTag().

Referenced by ViewState::toXML().

Here is the call graph for this function:

virtual bool ZoomAttr::fromXML ( QDomElement &  elem  )  [inline, virtual]

Implements XMLSerializeable.

Definition at line 43 of file zoomattr.h.

References factor, max, min, XMLSerializeable::readDoubleTag(), XMLSerializeable::readIntTag(), and type.

Referenced by ViewState::fromXML().

Here is the call graph for this function:

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]

Definition at line 79 of file xmlserializeable.h.

Referenced by toXML(), ViewState::toXML(), Session::toXML(), and MainToolbar::toXML().

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

double ZoomAttr::min

Definition at line 27 of file zoomattr.h.

Referenced by fromXML(), toXML(), and ViewState::ViewState().

double ZoomAttr::max

Definition at line 28 of file zoomattr.h.

Referenced by fromXML(), toXML(), and ViewState::ViewState().

QDate XMLSerializeable::mCurrentVersion [protected, inherited]


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

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