GLIMSView Source Code Documentation

MainToolbar Class Reference

#include <maintoolbar.h>

Inheritance diagram for MainToolbar:

Inheritance graph
[legend]

List of all members.


Detailed Description

The MainToolbar is really the applcation level of the program where the program starts and ends.

This contains the menu system and the toolbar that allows creation of a project and forwards toolbar and menu system events to it. Upon creation this attempts to fromXML() the file gvstate.xml which holds position of views and image information. This allows the program to return to the state it was in when last exited. Upon destruction or exit, this state is saved to the same file.

History:
2005-08-04 deborah lee soltesz Tweaked close event to accept a don't close (false) from GLIMSProject::close()
History:
2006-01-21 deborah lee soltesz Added project filename readout to status bar
What's New:
2006-01-21 Project filename is now displayed in the status bar
What's New:
2008-05-28 Improved shapefile importing available from Import Shapefile submenu
Todo:
2005-08-05 deborah lee soltesz Set window title to project filename. May involve making the mainWidget something other than a QToolBar

Definition at line 64 of file maintoolbar.h.


Public Slots

void newProject ()
void openProject ()
void saveProject ()
void saveProjectAs ()
void importGLIMSIngest ()
void exportGLIMSIngest ()
void importSegmentsFromShapefile ()
void importGIDsFromShapefile ()
void openConfigDlg ()
void openGtoSDlg ()
void openImgCalcDlg ()
void closeApp ()
void closeProject ()
void print ()
void openBandSel ()
void openHistDlg ()
void repaintViews (bool)
void setMemBuf ()
void setNN ()
void setBI ()
void setBC ()
void openAbout ()
void openManual ()
void setFocusWidget (QWidget *)
void setPanHand ()
void setZoomInInc ()
void setZoomOutInc ()
void setLineTool ()
void setSelTool ()
void setGIDTool ()
void setCoordLbls (View::MousePos ll, View::MousePos xy)
void setProjectFileName (QString fn)
void imgCalcEnd ()
void ingestEnd ()

Public Member Functions

 MainToolbar ()
virtual ~MainToolbar ()

Protected Member Functions

void buildMenu ()
void buildToolbar ()
void buildViews ()
void buildDefaultViews ()
void loadProject (GLIMSProject *)
void setupProj (GLIMSProject *)
bool fromXML (QDomElement &elem)
bool toXML (QDomDocument &doc, QDomElement &elem, std::string id="")
void closeEvent (QCloseEvent *)

Protected Attributes

GLIMSProjectmProject
bool mInit
QWorkspace * mWorkspace
QToolBar * mFileToolbar
QToolBar * mNavToolbar
QToolBar * mEditToolbar
QToolBar * mToolToolbar
QActionGroup * mActGrp
QActionGroup * mViewActGroup
QActionmBreakAction
QActionmJoinAction
QActionmOpenConfigAction
QActionmOpenVectorLayerAction
QActionmValidateProject
QActionmMemBufAction
QStatusBar * mStatBar
ImageCalculatorDialogimgCalcDlg
BandChooserDlgmBandChooser
HistogramDlgmHistDlg
ViewSet mViewSet
QLabel * mLblLL
QLabel * mLblXY
QLabel * mLblProjFile
PluginSetmPlugSet

Static Protected Attributes

static const char * VIEW_FILE = "viewfile.vlb"

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

Private Attributes

QDate mCurrentVersion

Constructor & Destructor Documentation

MainToolbar::MainToolbar (  ) 

MainToolbar::~MainToolbar (  )  [virtual]

Definition at line 67 of file maintoolbar.cpp.

References XMLSerializeable::toXMLFile().

Here is the call graph for this function:


Member Function Documentation

void MainToolbar::buildMenu (  )  [protected]

void MainToolbar::buildToolbar (  )  [protected]

void MainToolbar::buildViews (  )  [protected]

void MainToolbar::buildDefaultViews (  )  [protected]

void MainToolbar::loadProject ( GLIMSProject  )  [protected]

void MainToolbar::setupProj ( GLIMSProject proj  )  [protected]

bool MainToolbar::fromXML ( QDomElement &  elem  )  [protected, virtual]

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

Implements XMLSerializeable.

Definition at line 199 of file maintoolbar.cpp.

References XMLSerializeable::createBaseTag(), Rect::h, ViewState::mGeom, mViewSet, ViewSet::size(), ViewState::toXML(), Rect::toXML(), Rect::w, Rect::x, and Rect::y.

Here is the call graph for this function:

void MainToolbar::closeEvent ( QCloseEvent *   )  [inline, protected]

Definition at line 118 of file maintoolbar.h.

References GLIMSProject::close(), mProject, and XMLSerializeable::toXMLFile().

Referenced by closeApp().

Here is the call graph for this function:

void MainToolbar::newProject (  )  [slot]

void MainToolbar::openProject (  )  [slot]

void MainToolbar::saveProject (  )  [slot]

Definition at line 710 of file maintoolbar.cpp.

References mProject, and GLIMSProject::save().

Referenced by buildMenu(), and buildToolbar().

void MainToolbar::saveProjectAs (  )  [slot]

Definition at line 715 of file maintoolbar.cpp.

References mProject, and GLIMSProject::saveAs().

Referenced by buildMenu().

void MainToolbar::importGLIMSIngest (  )  [slot]

void MainToolbar::exportGLIMSIngest (  )  [slot]

Definition at line 773 of file maintoolbar.cpp.

References GLIMSProject::exportGLIMSIngest(), and mProject.

Referenced by buildMenu().

void MainToolbar::importSegmentsFromShapefile (  )  [slot]

History:
2008-05-28 deborah lee soltesz Created two new slots from importFromShapefile. importFromShapefile removed.

Definition at line 778 of file maintoolbar.cpp.

References GLIMSProject::importSegmentsFromShapefile(), and mProject.

Referenced by buildMenu().

void MainToolbar::importGIDsFromShapefile (  )  [slot]

History:
2008-05-28 deborah lee soltesz Created two new slots from importFromShapefile. importFromShapefile removed.

Definition at line 787 of file maintoolbar.cpp.

References GLIMSProject::importGIDsFromShapefile(), and mProject.

Referenced by buildMenu().

void MainToolbar::openConfigDlg (  )  [slot]

Definition at line 720 of file maintoolbar.cpp.

References mProject, and GLIMSProject::openConfigDlg().

Referenced by buildMenu(), and setupProj().

void MainToolbar::openGtoSDlg (  )  [slot]

Definition at line 728 of file maintoolbar.cpp.

References mProject.

Referenced by buildMenu().

void MainToolbar::openImgCalcDlg (  )  [slot]

Definition at line 741 of file maintoolbar.cpp.

References imgCalcDlg, imgCalcEnd(), and mProject.

Referenced by buildMenu().

void MainToolbar::closeApp (  )  [slot]

Definition at line 627 of file maintoolbar.cpp.

References closeEvent().

Referenced by buildMenu().

void MainToolbar::closeProject (  )  [slot]

Definition at line 631 of file maintoolbar.cpp.

References setProjectFileName().

void MainToolbar::print (  )  [slot]

Definition at line 635 of file maintoolbar.cpp.

void MainToolbar::openBandSel (  )  [slot]

Definition at line 637 of file maintoolbar.cpp.

References mBandChooser.

Referenced by buildMenu().

void MainToolbar::openHistDlg (  )  [slot]

Definition at line 644 of file maintoolbar.cpp.

References mHistDlg.

Referenced by buildMenu().

void MainToolbar::repaintViews ( bool   )  [slot]

Definition at line 650 of file maintoolbar.cpp.

References mViewSet, and ViewSet::repaintViews().

void MainToolbar::setMemBuf (  )  [slot]

Definition at line 796 of file maintoolbar.cpp.

References GLIMSProject::getImage(), mMemBufAction, mProject, and Image::setMemBuf().

Referenced by buildMenu().

void MainToolbar::setNN (  )  [slot]

Definition at line 811 of file maintoolbar.cpp.

References mViewSet, ImageFormat::SCALE_NN, and ViewSet::setRSM().

Referenced by buildMenu().

void MainToolbar::setBI (  )  [slot]

Definition at line 815 of file maintoolbar.cpp.

References mViewSet, ImageFormat::SCALE_BI, and ViewSet::setRSM().

Referenced by buildMenu().

void MainToolbar::setBC (  )  [slot]

Definition at line 819 of file maintoolbar.cpp.

References mViewSet, ImageFormat::SCALE_BC, and ViewSet::setRSM().

void MainToolbar::openAbout (  )  [slot]

Definition at line 823 of file maintoolbar.cpp.

Referenced by buildMenu().

void MainToolbar::openManual (  )  [slot]

Definition at line 828 of file maintoolbar.cpp.

Referenced by buildMenu().

void MainToolbar::setFocusWidget ( QWidget w  )  [slot]

Definition at line 706 of file maintoolbar.cpp.

Referenced by MainToolbar().

void MainToolbar::setPanHand (  )  [slot]

Definition at line 654 of file maintoolbar.cpp.

References View::mTool, and View::PAN_HAND.

Referenced by buildToolbar().

void MainToolbar::setZoomInInc (  )  [slot]

Definition at line 658 of file maintoolbar.cpp.

References View::mTool, and View::ZOOMIN_INC.

Referenced by buildToolbar().

void MainToolbar::setZoomOutInc (  )  [slot]

Definition at line 662 of file maintoolbar.cpp.

References View::mTool, and View::ZOOMOUT_INC.

Referenced by buildToolbar().

void MainToolbar::setLineTool (  )  [slot]

void MainToolbar::setSelTool (  )  [slot]

Definition at line 672 of file maintoolbar.cpp.

References View::mTool, and View::SELECTION.

Referenced by buildToolbar().

void MainToolbar::setGIDTool (  )  [slot]

void MainToolbar::setCoordLbls ( View::MousePos  ll,
View::MousePos  xy 
) [slot]

Definition at line 686 of file maintoolbar.cpp.

References mLblLL, mLblXY, View::MousePos::x, and View::MousePos::y.

Referenced by buildViews().

void MainToolbar::setProjectFileName ( QString  fn  )  [slot]

Definition at line 682 of file maintoolbar.cpp.

References mLblProjFile.

Referenced by closeProject(), newProject(), and openProject().

void MainToolbar::imgCalcEnd (  )  [slot]

Definition at line 751 of file maintoolbar.cpp.

Referenced by openImgCalcDlg().

void MainToolbar::ingestEnd (  )  [slot]

Definition at line 839 of file maintoolbar.cpp.

References mBandChooser, and mProject.

Referenced by importGLIMSIngest().

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 ZoomAttr::toXML(), ViewState::toXML(), Session::toXML(), and 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 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

const char * MainToolbar::VIEW_FILE = "viewfile.vlb" [static, protected]

Definition at line 67 of file maintoolbar.h.

bool MainToolbar::mInit [protected]

Definition at line 71 of file maintoolbar.h.

Referenced by MainToolbar().

QWorkspace* MainToolbar::mWorkspace [protected]

QToolBar* MainToolbar::mFileToolbar [protected]

Definition at line 74 of file maintoolbar.h.

Referenced by buildToolbar(), and MainToolbar().

QToolBar* MainToolbar::mNavToolbar [protected]

Definition at line 75 of file maintoolbar.h.

Referenced by buildToolbar(), and MainToolbar().

QToolBar* MainToolbar::mEditToolbar [protected]

Definition at line 76 of file maintoolbar.h.

Referenced by buildToolbar(), and MainToolbar().

QToolBar* MainToolbar::mToolToolbar [protected]

Definition at line 77 of file maintoolbar.h.

Referenced by buildToolbar(), and MainToolbar().

QActionGroup* MainToolbar::mActGrp [protected]

Definition at line 78 of file maintoolbar.h.

Referenced by buildToolbar(), and MainToolbar().

QActionGroup* MainToolbar::mViewActGroup [protected]

Definition at line 79 of file maintoolbar.h.

Referenced by buildMenu().

Definition at line 81 of file maintoolbar.h.

Referenced by buildToolbar(), and setupProj().

Definition at line 82 of file maintoolbar.h.

Referenced by buildToolbar(), and setupProj().

Definition at line 83 of file maintoolbar.h.

Referenced by buildToolbar(), and setupProj().

Definition at line 84 of file maintoolbar.h.

Definition at line 85 of file maintoolbar.h.

Referenced by buildToolbar(), and setupProj().

Definition at line 86 of file maintoolbar.h.

Referenced by buildMenu(), setMemBuf(), and setupProj().

QStatusBar* MainToolbar::mStatBar [protected]

Definition at line 88 of file maintoolbar.h.

Referenced by MainToolbar().

Definition at line 90 of file maintoolbar.h.

Referenced by openImgCalcDlg().

Definition at line 92 of file maintoolbar.h.

Referenced by importGLIMSIngest(), ingestEnd(), MainToolbar(), openBandSel(), and setupProj().

Definition at line 93 of file maintoolbar.h.

Referenced by buildViews(), MainToolbar(), and openHistDlg().

QLabel* MainToolbar::mLblLL [protected]

Definition at line 96 of file maintoolbar.h.

Referenced by MainToolbar(), and setCoordLbls().

QLabel* MainToolbar::mLblXY [protected]

Definition at line 97 of file maintoolbar.h.

Referenced by MainToolbar(), and setCoordLbls().

QLabel* MainToolbar::mLblProjFile [protected]

Definition at line 98 of file maintoolbar.h.

Referenced by MainToolbar(), and setProjectFileName().

Definition at line 100 of file maintoolbar.h.

Referenced by buildMenu(), and setupProj().

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